diff options
author | Junio C Hamano <junkio@cox.net> | 2006-01-25 01:03:18 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-28 00:09:38 -0800 |
commit | 46a6c2620ba421397eec627b8eb18eb530e694fc (patch) | |
tree | 9222e809b0d77ad10e7304073d4c053c7edd9266 /cache.h | |
parent | 6b94f1e404afc552e5139c4357331843f5be61ad (diff) | |
download | git-46a6c2620ba421397eec627b8eb18eb530e694fc.tar.gz |
abbrev cleanup: use symbolic constants
The minimum length of abbreviated object name was hardcoded in
different places to be 4, risking inconsistencies in the future.
Also there were three different "default abbreviation
precision". Use two C preprocessor symbols to clean up this
mess.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -221,6 +221,9 @@ extern int has_pack_file(const unsigned char *sha1); extern int has_pack_index(const unsigned char *sha1); /* Convert to/from hex/sha1 representation */ +#define MINIMUM_ABBREV 4 +#define DEFAULT_ABBREV 7 + extern int get_sha1(const char *str, unsigned char *sha1); extern int get_sha1_hex(const char *hex, unsigned char *sha1); extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */ |