summaryrefslogtreecommitdiff
path: root/list-objects.c
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2018-08-15 00:22:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-15 16:26:21 (GMT)
commitf1d02daacfe657fd175634174b4928a645d537f4 (patch)
tree8fdf1930e34b1c600996d4c9616faf0e337073ed /list-objects.c
parent9202489174a110f82867edbac601f12480a4e284 (diff)
downloadgit-f1d02daacfe657fd175634174b4928a645d537f4.zip
git-f1d02daacfe657fd175634174b4928a645d537f4.tar.gz
git-f1d02daacfe657fd175634174b4928a645d537f4.tar.bz2
list-objects: always parse trees gently
If parsing fails when revs->ignore_missing_links and revs->exclude_promisor_objects are both false, we print the OID anyway in the die("bad tree object...") call, so any message printed by parse_tree_gently() is superfluous. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.c')
-rw-r--r--list-objects.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/list-objects.c b/list-objects.c
index ccc529e..f9b51db 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -143,8 +143,6 @@ static void process_tree(struct traversal_context *ctx,
struct rev_info *revs = ctx->revs;
int baselen = base->len;
enum list_objects_filter_result r = LOFR_MARK_SEEN | LOFR_DO_SHOW;
- int gently = revs->ignore_missing_links ||
- revs->exclude_promisor_objects;
if (!revs->tree_objects)
return;
@@ -152,7 +150,7 @@ static void process_tree(struct traversal_context *ctx,
die("bad tree object");
if (obj->flags & (UNINTERESTING | SEEN))
return;
- if (parse_tree_gently(tree, gently) < 0) {
+ if (parse_tree_gently(tree, 1) < 0) {
if (revs->ignore_missing_links)
return;