Skip to content

Commit 2ede838

Browse files
gitsterdscho
authored andcommitted
Merge branch 'jk/fetch-check-graph-objects-fix'
Under a race against another process that is repacking the repository, especially a partially cloned one, "git fetch" may mistakenly think some objects we do have are missing, which has been corrected. * jk/fetch-check-graph-objects-fix: fetch-pack: re-scan when double-checking graph objects
2 parents 62df672 + 8f32a5a commit 2ede838

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fetch-pack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
143143
commit = lookup_commit_in_graph(the_repository, oid);
144144
if (commit) {
145145
if (mark_tags_complete_and_check_obj_db) {
146-
if (!odb_has_object(the_repository->objects, oid, 0))
146+
if (!odb_has_object(the_repository->objects, oid,
147+
HAS_OBJECT_RECHECK_PACKED))
147148
die_in_commit_graph_only(oid);
148149
}
149150
return commit;

0 commit comments

Comments
 (0)