diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-27 14:58:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-27 14:58:47 -0700 |
commit | d7ae013a3173c621a3556be6834d459ece60e130 (patch) | |
tree | 3fc7d1145c484923f1a006a94029d67ffc56a685 /cache.h | |
parent | 580d820ece78100c5e2b8b5874d7aed5d76715f2 (diff) | |
parent | 8e3f52d77854a19cb3fd2adee40be84c8a8bdacc (diff) | |
download | git-d7ae013a3173c621a3556be6834d459ece60e130.tar.gz |
Merge branch 'jk/abbrev-auto'
Updates the way approximate count of total objects is computed
while attempting to come up with a unique abbreviated object name,
which in turn needs to estimate how many hexdigits are necessary to
ensure uniqueness.
* jk/abbrev-auto:
find_unique_abbrev: move logic out of get_short_sha1()
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1211,7 +1211,6 @@ struct object_context { #define GET_SHA1_TREEISH 020 #define GET_SHA1_BLOB 040 #define GET_SHA1_FOLLOW_SYMLINKS 0100 -#define GET_SHA1_AUTOMATIC 0200 #define GET_SHA1_ONLY_TO_DIE 04000 #define GET_SHA1_DISAMBIGUATORS \ @@ -1494,6 +1493,12 @@ extern void prepare_packed_git(void); extern void reprepare_packed_git(void); extern void install_packed_git(struct packed_git *pack); +/* + * Give a rough count of objects in the repository. This sacrifices accuracy + * for speed. + */ +unsigned long approximate_object_count(void); + extern struct packed_git *find_sha1_pack(const unsigned char *sha1, struct packed_git *packs); |