From: Jonas Fonseca Date: Mon, 11 Sep 2006 04:04:02 +0000 (+0200) Subject: Fix git-describe reference adding when there are no tags and thus no output X-Git-Tag: tig-0.5~36 X-Git-Url: https://git.distorted.org.uk/~mdw/tig/commitdiff_plain/d42c8a35f25564c6c95500db3a6b0aebcd0a8f22 Fix git-describe reference adding when there are no tags and thus no output --- diff --git a/tig.c b/tig.c index 44fcb1b..bcff66f 100644 --- 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: + /* Add -g "fake" reference. */ if (!add_describe_ref(buf, &bufpos, commit_id, sep)) return; } + if (bufpos == 0) + return; + if (!realloc_lines(view, view->line_size + 1)) return;