diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-16 12:33:22 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 12:56:52 +0300 |
commit | 8bb95572b05d70cce6ea6eef9396cdaf6b34b14f (patch) | |
tree | 313a25b897997cfa689aa407e55d44560521543b /cache.h | |
parent | 7f07c033a6ee1a0751e0b136aca1f37258106109 (diff) |
sha1-name.c: add repo_find_unique_abbrev_r()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1045,8 +1045,10 @@ extern void check_repository_format(void); * Note that while this version avoids the static buffer, it is not fully * reentrant, as it calls into other non-reentrant git code. */ -extern const char *find_unique_abbrev(const struct object_id *oid, int len); -extern int find_unique_abbrev_r(char *hex, const struct object_id *oid, int len); +const char *repo_find_unique_abbrev(struct repository *r, const struct object_id *oid, int len); +#define find_unique_abbrev(oid, len) repo_find_unique_abbrev(the_repository, oid, len) +int repo_find_unique_abbrev_r(struct repository *r, char *hex, const struct object_id *oid, int len); +#define find_unique_abbrev_r(hex, oid, len) repo_find_unique_abbrev_r(the_repository, hex, oid, len) extern const unsigned char null_sha1[GIT_MAX_RAWSZ]; extern const struct object_id null_oid; |