mirror of
https://github.com/git-for-windows/git.git
synced 2026-05-31 12:28:51 -05:00
fixup! path-walk API: avoid adding a root tree more than once
Ooops. Must not risk a segmentation fault in a partial clone missing trees... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -360,11 +360,11 @@ int walk_objects_by_path(struct path_walk_info *info)
|
||||
oid = get_commit_tree_oid(c);
|
||||
t = lookup_tree(info->revs->repo, oid);
|
||||
|
||||
if (t->object.flags & SEEN)
|
||||
continue;
|
||||
t->object.flags |= SEEN;
|
||||
|
||||
if (t) {
|
||||
if (t->object.flags & SEEN)
|
||||
continue;
|
||||
t->object.flags |= SEEN;
|
||||
|
||||
if (!oidset_insert(&root_tree_set, oid))
|
||||
oid_array_append(&root_tree_list->oids, oid);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user