Message ID | 43c04749513d07733f5fa2c15a694d99d31fe6e3.1707324462.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | merge-tree: handle missing objects correctly | expand |
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes: > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > The first thing the `parse_tree()` function does is to return early if > the tree has already been parsed. Therefore we do not need to guard the > `parse_tree()` call behind a check of that flag. Makes sense, and it doubly makes sense to keep this separate from the change done to the same location in [4/5]. Will queue.
diff --git a/cache-tree.c b/cache-tree.c index c6508b64a5c..78d6ba92853 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -779,7 +779,7 @@ static void prime_cache_tree_rec(struct repository *r, struct cache_tree_sub *sub; struct tree *subtree = lookup_tree(r, &entry.oid); - if (!subtree->object.parsed && parse_tree(subtree) < 0) + if (parse_tree(subtree) < 0) exit(128); sub = cache_tree_sub(it, entry.path); sub->cache_tree = cache_tree();