~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix git-describe reference adding when there are no tags and thus no output
[tig]
/
tig.c
diff --git
a/tig.c
b/tig.c
index
44fcb1b
..
bcff66f
100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-2333,10
+2333,14
@@
add_pager_refs(struct view *view, struct line *line)
if (!is_tag && view == VIEW(REQ_VIEW_DIFF)) {
try_add_describe_ref:
if (!is_tag && view == VIEW(REQ_VIEW_DIFF)) {
try_add_describe_ref:
+ /* Add <tag>-g<commit_id> "fake" reference. */
if (!add_describe_ref(buf, &bufpos, commit_id, sep))
return;
}
if (!add_describe_ref(buf, &bufpos, commit_id, sep))
return;
}
+ if (bufpos == 0)
+ return;
+
if (!realloc_lines(view, view->line_size + 1))
return;
if (!realloc_lines(view, view->line_size + 1))
return;