diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-09-21 18:57:33 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-21 19:50:58 +0300 |
commit | acd00ea04998ce469d1775c658134b097e18f5a3 (patch) | |
tree | 67703a7f2647ac72b45103a65d102a7203dabd6e /userdiff.c | |
parent | 35843b1123e2772c5db6d7db5abf279c3253ae57 (diff) |
userdiff.c: remove implicit dependency on the_index
[jc: squashed in missing forward decl in userdiff.h found by Ramsay]
Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
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 'userdiff.c')
-rw-r--r-- | userdiff.c | 5 |
1 files changed, 3 insertions, 2 deletions
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)) |