Skip to content

Commit b224e8e

Browse files
peffgitster
authored andcommitted
path-walk: drop redundant parse_tree() call
This call to parse_tree() was flagged by Coverity for ignoring the return value. But if we look a little further up the function, we can see that there is already a call to parse_tree_gently(), and we'll return early if that fails. So by this point the tree will always be parsed, and the call is redundant. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 71edf6c commit b224e8e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

path-walk.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ static int add_tree_entries(struct path_walk_context *ctx,
126126
strbuf_addstr(&path, base_path);
127127
base_len = path.len;
128128

129-
parse_tree(tree);
130129
init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);
131130
while (tree_entry(&desc, &entry)) {
132131
struct type_and_oid_list *list;

0 commit comments

Comments
 (0)