summaryrefslogtreecommitdiff
path: root/sha1-name.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-16 09:33:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 09:56:53 (GMT)
commit65e5046400fd07e32749ff20557e11a0fc65cc67 (patch)
treeadbbbf9af543097925fa252b8356c70b8e0494db /sha1-name.c
parente270f42c4d26fca591ca89ea8ee08ff17a72c1b5 (diff)
downloadgit-65e5046400fd07e32749ff20557e11a0fc65cc67.zip
git-65e5046400fd07e32749ff20557e11a0fc65cc67.tar.gz
git-65e5046400fd07e32749ff20557e11a0fc65cc67.tar.bz2
sha1-name.c: remove the_repo from other get_oid_*
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 'sha1-name.c')
-rw-r--r--sha1-name.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/sha1-name.c b/sha1-name.c
index b94d381..d494963 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -1590,43 +1590,48 @@ int repo_get_oid(struct repository *r, const char *name, struct object_id *oid)
* commit-ish. It is merely to give a hint to the disambiguation
* machinery.
*/
-int get_oid_committish(const char *name, struct object_id *oid)
+int repo_get_oid_committish(struct repository *r,
+ const char *name,
+ struct object_id *oid)
{
struct object_context unused;
- return get_oid_with_context(the_repository,
- name, GET_OID_COMMITTISH,
+ return get_oid_with_context(r, name, GET_OID_COMMITTISH,
oid, &unused);
}
-int get_oid_treeish(const char *name, struct object_id *oid)
+int repo_get_oid_treeish(struct repository *r,
+ const char *name,
+ struct object_id *oid)
{
struct object_context unused;
- return get_oid_with_context(the_repository,
- name, GET_OID_TREEISH,
+ return get_oid_with_context(r, name, GET_OID_TREEISH,
oid, &unused);
}
-int get_oid_commit(const char *name, struct object_id *oid)
+int repo_get_oid_commit(struct repository *r,
+ const char *name,
+ struct object_id *oid)
{
struct object_context unused;
- return get_oid_with_context(the_repository,
- name, GET_OID_COMMIT,
+ return get_oid_with_context(r, name, GET_OID_COMMIT,
oid, &unused);
}
-int get_oid_tree(const char *name, struct object_id *oid)
+int repo_get_oid_tree(struct repository *r,
+ const char *name,
+ struct object_id *oid)
{
struct object_context unused;
- return get_oid_with_context(the_repository,
- name, GET_OID_TREE,
+ return get_oid_with_context(r, name, GET_OID_TREE,
oid, &unused);
}
-int get_oid_blob(const char *name, struct object_id *oid)
+int repo_get_oid_blob(struct repository *r,
+ const char *name,
+ struct object_id *oid)
{
struct object_context unused;
- return get_oid_with_context(the_repository,
- name, GET_OID_BLOB,
+ return get_oid_with_context(r, name, GET_OID_BLOB,
oid, &unused);
}