Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'show-branch.c')
-rw-r--r--show-branch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/show-branch.c b/show-branch.c
index 262acf5cef..8cc0755e0a 100644
--- a/show-branch.c
+++ b/show-branch.c
@@ -196,8 +196,11 @@ static void show_one_commit(struct commit *commit)
{
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