Handle revs that don't have a name.
* magit.el (magit-name-rev): Return original rev if name-rev returns "undefined". Shouldn't happen, but does. Bug in git?
This commit is contained in:
parent
e5b55cbce0
commit
d48fd13d27
1 changed files with 4 additions and 1 deletions
5
magit.el
5
magit.el
|
@ -200,7 +200,10 @@ Many Magit faces inherit from this one by default."
|
|||
|
||||
(defun magit-name-rev (rev)
|
||||
(and rev
|
||||
(magit-shell "git name-rev --always --name-only %s" rev)))
|
||||
(let ((name (magit-shell "git name-rev --always --name-only %s" rev)))
|
||||
(if (or (not name) (string= name "undefined"))
|
||||
rev
|
||||
name))))
|
||||
|
||||
(defun magit-put-line-property (prop val)
|
||||
(put-text-property (line-beginning-position) (line-beginning-position 2)
|
||||
|
|
Loading…
Reference in a new issue