diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2019-10-23 16:34:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-24 11:34:44 +0900 |
commit | c7aadccba01579d8ab23e662b3b64bc6cc2980a7 (patch) | |
tree | 60804de481229e4c0c9a51b6585988db0af7b91e /contrib/update-unicode | |
parent | Eleventh batch (diff) | |
download | tgif-c7aadccba01579d8ab23e662b3b64bc6cc2980a7.tar.xz |
fetch: delay fetch_if_missing=0 until after config
Suppose, from a repository that has ".gitmodules", we clone with
--filter=blob:none:
git clone --filter=blob:none --no-checkout \
https://kernel.googlesource.com/pub/scm/git/git
Then we fetch:
git -C git fetch
This will cause a "unable to load config blob object", because the
fetch_config_from_gitmodules() invocation in cmd_fetch() will attempt to
load ".gitmodules" (which Git knows to exist because the client has the
tree of HEAD) while fetch_if_missing is set to 0.
fetch_if_missing is set to 0 too early - ".gitmodules" here should be
lazily fetched. Git must set fetch_if_missing to 0 before the fetch
because as part of the fetch, packfile negotiation happens (and we do
not want to fetch any missing objects when checking existence of
objects), but we do not need to set it so early. Move the setting of
fetch_if_missing to the earliest possible point in cmd_fetch(), right
before any fetching happens.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/update-unicode')
0 files changed, 0 insertions, 0 deletions