aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-01-22 19:36:13 -0500
committerJunio C Hamano <gitster@pobox.com>2025-01-22 17:52:44 -0800
commitb224e8e36cf22df3c058990cfdd8c1d5c51fc5ae (patch)
tree4456c741ddeb550f53f92aed3fe14d4c6802316a
parent71edf6c3c8161a2f102b69ca318ca1784ba29a58 (diff)
downloadgit-b224e8e36cf22df3c058990cfdd8c1d5c51fc5ae.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--path-walk.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/path-walk.c b/path-walk.c
index 136ec08fb0..9715a5550e 100644
--- a/path-walk.c
+++ b/path-walk.c
@@ -126,7 +126,6 @@ static int add_tree_entries(struct path_walk_context *ctx,
strbuf_addstr(&path, base_path);
base_len = path.len;
- parse_tree(tree);
init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);
while (tree_entry(&desc, &entry)) {
struct type_and_oid_list *list;