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>
Matthew DeVore committed
Aug 14, 2018 at 17:22 UTC
f1d02daacfe657fd175634174b4928a645d537f4
1 file changed
+1
-3
list-objects.c
+1
-3
@@ -143,8 +143,6 @@ static void process_tree(struct traversal_context *ctx,
143
struct rev_info *revs = ctx->revs;
144
int baselen = base->len;
145
enum list_objects_filter_result r = LOFR_MARK_SEEN | LOFR_DO_SHOW;
146
- int gently = revs->ignore_missing_links ||
147
- revs->exclude_promisor_objects;
146
147
if (!revs->tree_objects)
148
return;
@@ -152,7 +150,7 @@ static void process_tree(struct traversal_context *ctx,
150
die("bad tree object");
151
if (obj->flags & (UNINTERESTING | SEEN))
152
return;
155
- if (parse_tree_gently(tree, gently) < 0) {
153
+ if (parse_tree_gently(tree, 1) < 0) {
154
if (revs->ignore_missing_links)
155
return;
156