diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-04-16 11:33:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 11:56:52 +0200 |
commit | 0c6b5ba1bbed9ba1bff9f1d879601755c13f291c (patch) | |
tree | 06a4b71042ef3c4fa32d1405419c84b2ea84a7be /sha1-name.c | |
parent | sha1-name.c: remove the_repo from get_oid_oneline() (diff) | |
download | git-0c6b5ba1bbed9ba1bff9f1d879601755c13f291c.tar.xz git-0c6b5ba1bbed9ba1bff9f1d879601755c13f291c.zip |
sha1-name.c: remove the_repo from get_describe_name()
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 '')
-rw-r--r-- | sha1-name.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sha1-name.c b/sha1-name.c index fb80306f1a..1cda854f02 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1097,7 +1097,9 @@ static int peel_onion(const char *name, int len, struct object_id *oid, return 0; } -static int get_describe_name(const char *name, int len, struct object_id *oid) +static int get_describe_name(struct repository *r, + const char *name, int len, + struct object_id *oid) { const char *cp; unsigned flags = GET_OID_QUIETLY | GET_OID_COMMIT; @@ -1111,7 +1113,7 @@ static int get_describe_name(const char *name, int len, struct object_id *oid) if (ch == 'g' && cp[-1] == '-') { cp++; len -= cp - name; - return get_short_oid(the_repository, + return get_short_oid(r, cp, len, oid, flags); } } @@ -1162,7 +1164,7 @@ static enum get_oid_result get_oid_1(const char *name, int len, return FOUND; /* It could be describe output that is "SOMETHING-gXXXX" */ - ret = get_describe_name(name, len, oid); + ret = get_describe_name(the_repository, name, len, oid); if (!ret) return FOUND; |