diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-16 16:33:22 +0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 18:56:52 +0900 |
| commit | 8bb95572b05d70cce6ea6eef9396cdaf6b34b14f (patch) | |
| tree | 313a25b897997cfa689aa407e55d44560521543b /cache.h | |
| parent | sha1-name.c: remove the_repo from find_abbrev_len_packed() (diff) | |
| download | git-8bb95572b05d70cce6ea6eef9396cdaf6b34b14f.tar.gz git-8bb95572b05d70cce6ea6eef9396cdaf6b34b14f.zip | |
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; |
