diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2020-08-20 10:51:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-20 13:18:27 -0700 |
commit | 1b03df5f1e98b64b3bdc8a59c56697eaf675daca (patch) | |
tree | 30c8a74444a0d6e59d49e190283dff044228509d /t/t9002-column.sh | |
parent | Ninth batch (diff) | |
download | tgif-1b03df5f1e98b64b3bdc8a59c56697eaf675daca.tar.xz |
fetch-pack: in partial clone, pass --promisor
When fetching a pack from a promisor remote, the corresponding .promisor
file needs to be created. "fetch-pack" originally did this by passing
"--promisor" to "index-pack", but in 5374a290aa ("fetch-pack: write
fetched refs to .promisor", 2019-10-16), "fetch-pack" was taught to do
this itself instead, because it needed to store ref information in the
.promisor file.
This causes a problem with superprojects when transfer.fsckobjects is
set, because in the current implementation, it is "index-pack" that
calls fsck_finish() to check the objects; before 5374a290aa,
fsck_finish() would see that .gitmodules is a promisor object and
tolerate it being missing, but after, there is no .promisor file (at the
time of the invocation of fsck_finish() by "index-pack") to tell it that
.gitmodules is a promisor object, so it returns an error.
Therefore, teach "fetch-pack" to pass "--promisor" to index pack once
again. "fetch-pack" will subsequently overwrite this file with the ref
information.
An alternative is to instead move object checking to "fetch-pack", and
let "index-pack" only index the files. However, since "index-pack" has
to inflate objects in order to index them, it seems reasonable to also
let it check the objects (which also require inflated files).
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9002-column.sh')
0 files changed, 0 insertions, 0 deletions