summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-16 16:33:32 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-16 18:56:53 +0900
commit2b1790f5ab949abc86124d107ee4b7e7fef1323c (patch)
treeaa5b715adc1b04a7e7bd5425f841131382fa6804 /cache.h
parentsha1-name.c: remove the_repo from get_oid_basic() (diff)
downloadtgif-2b1790f5ab949abc86124d107ee4b7e7fef1323c.tar.xz
sha1-name.c: remove the_repo from get_oid_1()
There is a cyclic dependency between one of these functions so they cannot be converted one by one, so all related functions are converted at once. 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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 0cb95c0d4f..2149dc4f56 100644
--- a/cache.h
+++ b/cache.h
@@ -1491,8 +1491,11 @@ extern void *read_object_with_reference(const struct object_id *oid,
unsigned long *size,
struct object_id *oid_ret);
-extern struct object *peel_to_type(const char *name, int namelen,
- struct object *o, enum object_type);
+struct object *repo_peel_to_type(struct repository *r,
+ const char *name, int namelen,
+ struct object *o, enum object_type);
+#define peel_to_type(name, namelen, obj, type) \
+ repo_peel_to_type(the_repository, name, namelen, obj, type)
enum date_mode_type {
DATE_NORMAL = 0,