Prefer symbolic names for default revisions.
* magit.el (magit-name-rev): Do nothing when given nil. (magit-default-rev): Pass commit thru magit-name-rev.
This commit is contained in:
parent
7853395831
commit
87a437fab9
1 changed files with 3 additions and 2 deletions
5
magit.el
5
magit.el
|
@ -199,7 +199,8 @@ Many Magit faces inherit from this one by default."
|
|||
dir)))
|
||||
|
||||
(defun magit-name-rev (rev)
|
||||
(magit-shell "git name-rev --always --name-only %s" rev))
|
||||
(and rev
|
||||
(magit-shell "git name-rev --always --name-only %s" rev)))
|
||||
|
||||
(defun magit-put-line-property (prop val)
|
||||
(put-text-property (line-beginning-position) (line-beginning-position 2)
|
||||
|
@ -307,7 +308,7 @@ Many Magit faces inherit from this one by default."
|
|||
(format "%s at %s" things (magit-rev-describe (car range))))))
|
||||
|
||||
(defun magit-default-rev ()
|
||||
(magit-commit-at-point t))
|
||||
(magit-name-rev (magit-commit-at-point t)))
|
||||
|
||||
;;; Sections
|
||||
|
||||
|
|
Loading…
Reference in a new issue