summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-16 09:33:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 09:56:52 (GMT)
commit8bb95572b05d70cce6ea6eef9396cdaf6b34b14f (patch)
tree313a25b897997cfa689aa407e55d44560521543b /cache.h
parent7f07c033a6ee1a0751e0b136aca1f37258106109 (diff)
downloadgit-8bb95572b05d70cce6ea6eef9396cdaf6b34b14f.zip
git-8bb95572b05d70cce6ea6eef9396cdaf6b34b14f.tar.gz
git-8bb95572b05d70cce6ea6eef9396cdaf6b34b14f.tar.bz2
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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index fcb24b5..4f8ebb0 100644
--- a/cache.h
+++ b/cache.h
@@ -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;