Commit 4c0383b
committed
fixup! index-pack: avoid immediate object fetch while parsing packfile
The previous fixup (cdaf540) replaced OBJECT_INFO_FOR_PREFETCH with
HAS_OBJECT_FETCH_PROMISOR, reasoning that the former flag "never
worked." However, these are flags for two different functions:
OBJECT_INFO_FOR_PREFETCH was for odb_read_object_info_extended() (which
the old oid_object_info_extended() forwarded to), while
HAS_OBJECT_FETCH_PROMISOR is for odb_has_object().
The call site was migrated to odb_has_object() as part of the upstream
refactoring, but odb_has_object(odb, oid, HAS_OBJECT_FETCH_PROMISOR)
sets only OBJECT_INFO_QUICK without OBJECT_INFO_SKIP_FETCH_OBJECT,
which means it WILL trigger remote fetches via gvfs-helper. This
defeats the purpose of the original commit, which was to prevent
index-pack from individually fetching every object it encounters during
the collision check.
Passing 0 instead gives us both OBJECT_INFO_QUICK and
OBJECT_INFO_SKIP_FETCH_OBJECT, which is the correct equivalent of the
original OBJECT_INFO_FOR_PREFETCH behavior.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent c4a5879 commit 4c0383b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| |||
0 commit comments