diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-28 11:28:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-28 11:28:58 -0700 |
| commit | 56072ff0384da5d874fc378d36e089a18f28f1e3 (patch) | |
| tree | f368a8c4c81cbb86d88b8fa2ade0445c60210b71 /fetch-pack.c | |
| parent | Merge branch 'sg/line-log-merge-optim' (diff) | |
| parent | fetch-pack: re-scan when double-checking graph objects (diff) | |
| download | git-56072ff0384da5d874fc378d36e089a18f28f1e3.tar.gz git-56072ff0384da5d874fc378d36e089a18f28f1e3.zip | |
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
Diffstat (limited to 'fetch-pack.c')
| -rw-r--r-- | fetch-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 20e5533b21..6ed5662951 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -143,7 +143,8 @@ static struct commit *deref_without_lazy_fetch(const struct object_id *oid, commit = lookup_commit_in_graph(the_repository, oid); if (commit) { if (mark_tags_complete_and_check_obj_db) { - if (!odb_has_object(the_repository->objects, oid, 0)) + if (!odb_has_object(the_repository->objects, oid, + HAS_OBJECT_RECHECK_PACKED)) die_in_commit_graph_only(oid); } return commit; |
