diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:23:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:23:42 -0800 |
commit | 79bafd23a82a883ab054c9fcaf1e3d3bea57e4b9 (patch) | |
tree | 6ce68f30cbf2b36bdf62ef2177deca278e1a378f /fetch-pack.c | |
parent | 4ca10aa8cc21178dfb9d4d84afb9a69fbc97634c (diff) | |
parent | 87b5e236a14d4783b063041588c2f77f3cc6ee89 (diff) | |
download | git-79bafd23a82a883ab054c9fcaf1e3d3bea57e4b9.tar.gz |
Merge branch 'jk/fewer-pack-rescan'
Internaly we use 0{40} as a placeholder object name to signal the
codepath that there is no such object (e.g. the fast-forward check
while "git fetch" stores a new remote-tracking ref says "we know
there is no 'old' thing pointed at by the ref, as we are creating
it anew" by passing 0{40} for the 'old' side), and expect that a
codepath to locate an in-core object to return NULL as a sign that
the object does not exist. A look-up for an object that does not
exist however is quite costly with a repository with large number
of packfiles. This access pattern has been optimized.
* jk/fewer-pack-rescan:
sha1_file: fast-path null sha1 as a missing object
everything_local: use "quick" object existence check
p5551: add a script to test fetch pack-dir rescans
t/perf/lib-pack: use fast-import checkpoint to create packs
p5550: factor out nonsense-pack creation
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 008b25d3db..9f6b07ad91 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -716,7 +716,8 @@ static int everything_local(struct fetch_pack_args *args, for (ref = *refs; ref; ref = ref->next) { struct object *o; - if (!has_object_file(&ref->old_oid)) + if (!has_object_file_with_flags(&ref->old_oid, + OBJECT_INFO_QUICK)) continue; o = parse_object(&ref->old_oid); |