From acd00ea04998ce469d1775c658134b097e18f5a3 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Fri, 21 Sep 2018 17:57:33 +0200 Subject: userdiff.c: remove implicit dependency on the_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [jc: squashed in missing forward decl in userdiff.h found by Ramsay] Helped-by: Ramsay Jones Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- userdiff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'userdiff.c') diff --git a/userdiff.c b/userdiff.c index f3f4be579c..c913232396 100644 --- a/userdiff.c +++ b/userdiff.c @@ -270,7 +270,8 @@ struct userdiff_driver *userdiff_find_by_name(const char *name) { return userdiff_find_by_namelen(name, len); } -struct userdiff_driver *userdiff_find_by_path(const char *path) +struct userdiff_driver *userdiff_find_by_path(struct index_state *istate, + const char *path) { static struct attr_check *check; @@ -278,7 +279,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path) check = attr_check_initl("diff", NULL); if (!path) return NULL; - if (git_check_attr(&the_index, path, check)) + if (git_check_attr(istate, path, check)) return NULL; if (ATTR_TRUE(check->items[0].value)) -- cgit v1.2.3