Fix ref ambiguity detection.
This commit is contained in:
parent
daa3ab8987
commit
8cc37dcb99
1 changed files with 3 additions and 1 deletions
4
magit.el
4
magit.el
|
@ -510,7 +510,9 @@ return nil."
|
||||||
|
|
||||||
(defun magit-ref-ambiguous-p (ref)
|
(defun magit-ref-ambiguous-p (ref)
|
||||||
"Return whether or not REF is ambiguous."
|
"Return whether or not REF is ambiguous."
|
||||||
(/= (magit-git-exit-code "rev-parse" "--abbrev-ref" ref) 0))
|
;; If REF is ambiguous, rev-parse just prints errors,
|
||||||
|
;; so magit-git-string returns nil.
|
||||||
|
(not (magit-git-string "rev-parse" "--abbrev-ref" ref)))
|
||||||
|
|
||||||
(defun magit-name-rev (rev)
|
(defun magit-name-rev (rev)
|
||||||
"Return a human-readable name for REV.
|
"Return a human-readable name for REV.
|
||||||
|
|
Loading…
Reference in a new issue