ws.c: remove implicit dependency on the_index
[gitweb.git] / ws.c
diff --git a/ws.c b/ws.c
index 5b67b426e7b41d92f9b11bd82fd7e9bd09c89d79..55349b4c5d08597e38ab76d10cd0d11b944f4f37 100644 (file)
--- 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;