summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
committerJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
commit90c3302173c5a02189f5fe9091c0d07f7b7ebe89 (patch)
tree3488c30e5932a751c344083bfd289c0c48de2ba9 /builtin-log.c
parent8befc50c49e8a271fd3cd7fb34258fe88d1dfcad (diff)
parent87c8a56e4f71cc7e22c16caa4adc2ae17f6aa93d (diff)
downloadgit-90c3302173c5a02189f5fe9091c0d07f7b7ebe89.tar.gz
Merge branch 'maint'
* maint: fast-import: close pack before unlinking it pager: do not dup2 stderr if it is already redirected git-show: do not segfault when showing a bad tag
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 840daf9078..99d1137b08 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -340,7 +340,13 @@ int cmd_show(int argc, const char **argv, const char *prefix)
t->tag,
diff_get_color_opt(&rev.diffopt, DIFF_RESET));
ret = show_object(o->sha1, 1, &rev);
- objects[i].item = parse_object(t->tagged->sha1);
+ if (ret)
+ break;
+ o = parse_object(t->tagged->sha1);
+ if (!o)
+ ret = error("Could not read object %s",
+ sha1_to_hex(t->tagged->sha1));
+ objects[i].item = o;
i--;
break;
}