aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-08-18 15:38:02 -0400
committerKyle Meyer <kyle@kyleam.com>2015-08-18 15:38:02 -0400
commit80aea7a6f1daf485337116f615640bcc7090190a (patch)
treefc781f469f9dc89253edd52ba37ee8a515434a6e /lisp
parent9a4b55a92d2e65dd07e6207d7936c80bc09e5ad8 (diff)
magit-get-next-tag: fix handling of nil rev
Although 'git describe' is the same as 'git describe HEAD', 'git describe --contains' does not output anything and is not the same as 'git describe --contains HEAD' (at least with git 2.5.0). magit-insert-tags-header calls magit-get-next-tag with nil as the REV argument, so the next tag was not being inserted even when it existed.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/magit-git.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 25ba7aa..26c9b90 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -676,7 +676,7 @@ If no such tag can be found or if the distance is 0 (in which
case it is the current tag, not the next) return nil instead.
If optional WITH-DISTANCE is non-nil then return (TAG COMMITS)
where COMMITS is the number of commits in TAG but not in REV."
- (--when-let (magit-git-string "describe" "--contains" rev)
+ (--when-let (magit-git-string "describe" "--contains" (or rev "HEAD"))
(save-match-data
(when (string-match "^[^^~]+" it)
(setq it (match-string 0 it))