summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f961c1)
raw | patch | inline | side by side (parent: 1f961c1)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 19 Sep 2005 08:12:18 +0000 (01:12 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Sep 2005 02:20:26 +0000 (19:20 -0700) |
We may end up trying to print a commit we do not actually have but we
know about its existence only because another commit we do have refers
to it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from b204feab9371040982d2c60611925e7693106c84 commit)
know about its existence only because another commit we do have refers
to it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from b204feab9371040982d2c60611925e7693106c84 commit)
show-branch.c | patch | blob | history |
diff --git a/show-branch.c b/show-branch.c
index 262acf5cefc8053a012b2251bfbfb86177f80a90..8cc0755e0af511fd2151daeaceb7bcd5a7ec28b3 100644 (file)
--- a/show-branch.c
+++ b/show-branch.c
{
char pretty[128], *cp;
struct commit_name *name = commit->object.util;
- pretty_print_commit(CMIT_FMT_ONELINE, commit->buffer, ~0,
- pretty, sizeof(pretty));
+ if (commit->object.parsed)
+ pretty_print_commit(CMIT_FMT_ONELINE, commit->buffer, ~0,
+ pretty, sizeof(pretty));
+ else
+ strcpy(pretty, "(unavailable)");
if (!strncmp(pretty, "[PATCH] ", 8))
cp = pretty + 8;
else