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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user