sha1-name.c: add repo_get_oid()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2019-04-16 16:33:37 +07:00
committed by Junio C Hamano
parent efe461b081
commit ec580eaaa3
2 changed files with 4 additions and 3 deletions

View File

@ -1380,7 +1380,8 @@ enum get_oid_result {
*/
};
extern int get_oid(const char *str, struct object_id *oid);
int repo_get_oid(struct repository *r, const char *str, struct object_id *oid);
#define get_oid(str, oid) repo_get_oid(the_repository, str, oid)
extern int get_oid_commit(const char *str, struct object_id *oid);
extern int get_oid_committish(const char *str, struct object_id *oid);
extern int get_oid_tree(const char *str, struct object_id *oid);