summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-git.el
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-10-15 00:06:25 +0200
committerPhilip Kaludercic <philipk@posteo.net>2022-10-15 17:22:49 +0200
commit5933055a3e7387b0095f0df7876a208ab15f4f45 (patch)
tree185fb48a146ff28f9212948e447aa223036b873b /lisp/vc/vc-git.el
parent1f4b234a5c166552e14f387515642de632a2b1a3 (diff)
downloademacs-5933055a3e7387b0095f0df7876a208ab15f4f45.tar.gz
emacs-5933055a3e7387b0095f0df7876a208ab15f4f45.tar.bz2
emacs-5933055a3e7387b0095f0df7876a208ab15f4f45.zip
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined
Diffstat (limited to 'lisp/vc/vc-git.el')
-rw-r--r--lisp/vc/vc-git.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 0eae7dd6b85..3c6afec0378 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -2038,16 +2038,15 @@ allowed to include revision specifications like \"master~8\"
branch), otherwise such revision specifications are rejected, and
the function returns nil."
(and commit
- (let ((name (with-temp-buffer
- (and
- (vc-git--out-ok "name-rev" "--name-only" commit)
- (goto-char (point-min))
- (or force (not (looking-at "^.*[~^].*$" t)))
- (= (forward-line 2) 1)
- (bolp)
- (buffer-substring-no-properties (point-min)
- (1- (point-max)))))))
- (and name (not (string= name "undefined")) name))))
+ (with-temp-buffer
+ (and
+ (vc-git--out-ok "name-rev" "--no-undefined" "--name-only" commit)
+ (goto-char (point-min))
+ (or force (not (looking-at "^.*[~^].*$" t)))
+ (= (forward-line 2) 1)
+ (bolp)
+ (buffer-substring-no-properties (point-min)
+ (1- (point-max)))))))
(defvar-keymap vc-dir-git-mode-map
"z c" #'vc-git-stash