diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-10 08:25:43 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-10 08:25:43 +0900 |
commit | 5d806b74d5223d0c19afd023fea3b321cc5bc717 (patch) | |
tree | 6976e1d8d39c17aa9102600e72e3ea40e07e1803 /cache.h | |
parent | Merge branch 'en/rename-directory-detection' (diff) | |
parent | fetch-pack.c: use oidset to check existence of loose object (diff) | |
download | tgif-5d806b74d5223d0c19afd023fea3b321cc5bc717.tar.xz |
Merge branch 'ti/fetch-everything-local-optim'
A "git fetch" from a repository with insane number of refs into a
repository that is already up-to-date still wasted too many cycles
making many lstat(2) calls to see if these objects at the tips
exist as loose objects locally. These lstat(2) calls are optimized
away by enumerating all loose objects beforehand.
It is unknown if the new strategy negatively affects existing use
cases, fetching into a repository with many loose objects from a
repository with small number of refs.
* ti/fetch-everything-local-optim:
fetch-pack.c: use oidset to check existence of loose object
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1777,6 +1777,8 @@ struct object_info { #define OBJECT_INFO_SKIP_CACHED 4 /* Do not retry packed storage after checking packed and loose storage */ #define OBJECT_INFO_QUICK 8 +/* Do not check loose object */ +#define OBJECT_INFO_IGNORE_LOOSE 16 extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags); /* |