summaryrefslogtreecommitdiff
path: root/ws.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:51:18 (GMT)
commit26d024ecf0e2e5bd697714b95930bb6008d85f3f (patch)
tree82e38d7c9aee2bab48766086b40125a6f8d90ef8 /ws.c
parentdcf42869eefe22150a30ed0221e01b701cea1f14 (diff)
downloadgit-26d024ecf0e2e5bd697714b95930bb6008d85f3f.zip
git-26d024ecf0e2e5bd697714b95930bb6008d85f3f.tar.gz
git-26d024ecf0e2e5bd697714b95930bb6008d85f3f.tar.bz2
ws.c: remove implicit dependency on the_index
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 'ws.c')
-rw-r--r--ws.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ws.c b/ws.c
index 5b67b42..55349b4 100644
--- a/ws.c
+++ b/ws.c
@@ -3,7 +3,6 @@
*
* Copyright (c) 2007 Junio C Hamano
*/
-
#include "cache.h"
#include "attr.h"
@@ -71,14 +70,14 @@ unsigned parse_whitespace_rule(const char *string)
return rule;
}
-unsigned whitespace_rule(const char *pathname)
+unsigned whitespace_rule(struct index_state *istate, const char *pathname)
{
static struct attr_check *attr_whitespace_rule;
if (!attr_whitespace_rule)
attr_whitespace_rule = attr_check_initl("whitespace", NULL);
- if (!git_check_attr(&the_index, pathname, attr_whitespace_rule)) {
+ if (!git_check_attr(istate, pathname, attr_whitespace_rule)) {
const char *value;
value = attr_whitespace_rule->items[0].value;