emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 824d31e: Remove empty lines from stash read prompt


From: Dmitry Gutov
Subject: master 824d31e: Remove empty lines from stash read prompt
Date: Fri, 26 Nov 2021 08:04:10 -0500 (EST)

branch: master
commit 824d31e3bf22d57bc8f8011e6719b15059bea55b
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Remove empty lines from stash read prompt
    
    * lisp/vc/vc-git.el (vc-git-stash-read): Pass OMIT-NULLS (bug#52119).
    (vc-git-stash-list): Simplify.
---
 lisp/vc/vc-git.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 2d35061..4b6cd93 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1688,7 +1688,7 @@ This command shares argument histories with \\[rgrep] and 
\\[grep]."
   (let ((stash (completing-read
                  prompt
                  (split-string
-                  (or (vc-git--run-command-string nil "stash" "list") "") "\n")
+                  (or (vc-git--run-command-string nil "stash" "list") "") "\n" 
t)
                  nil :require-match nil 'vc-git-stash-read-history)))
     (if (string-equal stash "")
         (user-error "Not a stash")
@@ -1733,12 +1733,11 @@ This command shares argument histories with \\[rgrep] 
and \\[grep]."
 
 (defun vc-git-stash-list ()
   (when-let ((out (vc-git--run-command-string nil "stash" "list")))
-    (delete
-     ""
-     (split-string
-      (replace-regexp-in-string
-       "^stash@" "             " out)
-      "\n"))))
+    (split-string
+     (replace-regexp-in-string
+      "^stash@" "             " out)
+     "\n"
+     t)))
 
 (defun vc-git-stash-get-at-point (point)
   (save-excursion



reply via email to

[Prev in Thread] Current Thread [Next in Thread]