Skip to content

Commit f1d02da

Browse files
matvoregitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9202489 commit f1d02da

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

list-objects.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,14 @@ static void process_tree(struct traversal_context *ctx,
143143
struct rev_info *revs = ctx->revs;
144144
int baselen = base->len;
145145
enum list_objects_filter_result r = LOFR_MARK_SEEN | LOFR_DO_SHOW;
146-
int gently = revs->ignore_missing_links ||
147-
revs->exclude_promisor_objects;
148146

149147
if (!revs->tree_objects)
150148
return;
151149
if (!obj)
152150
die("bad tree object");
153151
if (obj->flags & (UNINTERESTING | SEEN))
154152
return;
155-
if (parse_tree_gently(tree, gently) < 0) {
153+
if (parse_tree_gently(tree, 1) < 0) {
156154
if (revs->ignore_missing_links)
157155
return;
158156

0 commit comments

Comments
 (0)