Files
git/builtin
Derrick Stolee 3e96c66805 partial-clone: avoid fetching when looking for objects
When using partial clone, find_non_local_tags() in builtin/fetch.c
checks each remote tag to see if its object also exists locally. There
is no expectation that the object exist locally, but this function
nevertheless triggers a lazy fetch if the object does not exist. This
can be extremely expensive when asking for a commit, as we are
completely removed from the context of the non-existent object and
thus supply no "haves" in the request.

6462d5eb9a (fetch: remove fetch_if_missing=0, 2019-11-05) removed a
global variable that prevented these fetches in favor of a bitflag.
However, some object existence checks were not updated to use this flag.

Update find_non_local_tags() to use OBJECT_INFO_SKIP_FETCH_OBJECT in
addition to OBJECT_INFO_QUICK. The _QUICK option only prevents
repreparing the pack-file structures. We need to be extremely careful
about supplying _SKIP_FETCH_OBJECT when we expect an object to not exist
due to updated refs.

This resolves a broken test in t5616-partial-clone.sh.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-02-22 09:23:08 -08:00
..
2019-12-25 11:22:01 -08:00
2019-10-15 13:47:59 +09:00
2019-11-11 11:46:29 +09:00
2019-09-18 11:50:09 -07:00
2019-12-25 11:21:58 -08:00
2019-12-25 11:21:57 -08:00
2019-01-29 12:47:54 -08:00
2019-10-15 13:48:02 +09:00
2019-04-25 16:41:12 +09:00
2019-10-15 13:48:02 +09:00
2019-11-10 16:00:54 +09:00
2019-09-30 13:19:32 +09:00
2019-10-07 11:32:53 +09:00
2019-05-13 14:22:54 +09:00
2019-08-19 13:05:58 -07:00
2019-11-10 18:02:14 +09:00
2019-10-11 14:24:46 +09:00
2019-12-10 13:11:41 -08:00
2019-10-11 14:24:48 +09:00
2019-12-01 09:04:37 -08:00
2019-06-19 08:19:21 -07:00