From 824d31e3bf22d57bc8f8011e6719b15059bea55b Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 26 Nov 2021 16:03:30 +0300 Subject: [PATCH] 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 2d35061b269..4b6cd930744 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 -- 2.39.5