diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-08-20 18:52:04 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-21 00:31:40 +0200 |
commit | 454ea2e4d7036862e8b2f69ef2dea640f8787510 (patch) | |
tree | 5c7d2c447869707b7519770b1a1b992555d63e14 /fast-import.c | |
parent | packfile: add all_packs list (diff) | |
download | git-454ea2e4d7036862e8b2f69ef2dea640f8787510.tar.xz git-454ea2e4d7036862e8b2f69ef2dea640f8787510.zip |
treewide: use get_all_packs
There are many places in the codebase that want to iterate over
all packfiles known to Git. The purposes are wide-ranging, and
those that can take advantage of the multi-pack-index already
do. So, use get_all_packs() instead of get_packed_git() to be
sure we are iterating over all packfiles.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fast-import.c b/fast-import.c index 89bb0c9db3..f8c3acd3b5 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1068,7 +1068,7 @@ static int store_object( duplicate_count_by_type[type]++; return 1; } else if (find_sha1_pack(oid.hash, - get_packed_git(the_repository))) { + get_all_packs(the_repository))) { e->type = type; e->pack_id = MAX_PACK_ID; e->idx.offset = 1; /* just not zero! */ @@ -1266,7 +1266,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark) truncate_pack(&checkpoint); } else if (find_sha1_pack(oid.hash, - get_packed_git(the_repository))) { + get_all_packs(the_repository))) { e->type = OBJ_BLOB; e->pack_id = MAX_PACK_ID; e->idx.offset = 1; /* just not zero! */ |