summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-12 02:13:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-14 20:13:04 (GMT)
commit3a7a698e93e1031c322ab20c0e336e205514c058 (patch)
treed0df6168901db7e9a028ca4dac330f8798341a3b /cache.h
parent1b0d968b34122a0f3ceec2786f01679437f2baba (diff)
downloadgit-3a7a698e93e1031c322ab20c0e336e205514c058.zip
git-3a7a698e93e1031c322ab20c0e336e205514c058.tar.gz
git-3a7a698e93e1031c322ab20c0e336e205514c058.tar.bz2
sha1-name.c: remove implicit dependency on the_index
This kills the_index dependency in get_oid_with_context() but for get_oid() and friends, they still assume the_repository (which also means the_index). Unfortunately the widespread use of get_oid() will make it hard to make the conversion now. We probably will add repo_get_oid() at some point and limit the use of get_oid() in builtin/ instead of forcing all get_oid() call sites to carry struct repository. 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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 702c5bf..fdcd69b 100644
--- a/cache.h
+++ b/cache.h
@@ -1328,7 +1328,9 @@ extern int get_oid_tree(const char *str, struct object_id *oid);
extern int get_oid_treeish(const char *str, struct object_id *oid);
extern int get_oid_blob(const char *str, struct object_id *oid);
extern void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);
-extern int get_oid_with_context(const char *str, unsigned flags, struct object_id *oid, struct object_context *oc);
+extern int get_oid_with_context(struct repository *repo, const char *str,
+ unsigned flags, struct object_id *oid,
+ struct object_context *oc);
typedef int each_abbrev_fn(const struct object_id *oid, void *);