summaryrefslogtreecommitdiff
path: root/ws.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:02 (GMT)
commit11877b9ebec87175a9cc55676311ef2d98585cca (patch)
tree4dbcd834daeedc9373f368e67fa0fcdf5e52359c /ws.c
parentaef8e71f1512c2edb1b323969d3f215a23ff1c04 (diff)
parentb3c7eef9b0581f06be67418f130d33d7a7c490cb (diff)
downloadgit-11877b9ebec87175a9cc55676311ef2d98585cca.zip
git-11877b9ebec87175a9cc55676311ef2d98585cca.tar.gz
git-11877b9ebec87175a9cc55676311ef2d98585cca.tar.bz2
Merge branch 'nd/the-index'
Various codepaths in the core-ish part learn to work on an arbitrary in-core index structure, not necessarily the default instance "the_index". * nd/the-index: (23 commits) revision.c: reduce implicit dependency the_repository revision.c: remove implicit dependency on the_index ws.c: remove implicit dependency on the_index tree-diff.c: remove implicit dependency on the_index submodule.c: remove implicit dependency on the_index line-range.c: remove implicit dependency on the_index userdiff.c: remove implicit dependency on the_index rerere.c: remove implicit dependency on the_index sha1-file.c: remove implicit dependency on the_index patch-ids.c: remove implicit dependency on the_index merge.c: remove implicit dependency on the_index merge-blobs.c: remove implicit dependency on the_index ll-merge.c: remove implicit dependency on the_index diff-lib.c: remove implicit dependency on the_index read-cache.c: remove implicit dependency on the_index diff.c: remove implicit dependency on the_index grep.c: remove implicit dependency on the_index diff.c: remove the_index dependency in textconv() functions blame.c: rename "repo" argument to "r" combine-diff.c: remove implicit dependency on the_index ...
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 a64ab51..6e69877 100644
--- a/ws.c
+++ b/ws.c
@@ -3,7 +3,6 @@
*
* Copyright (c) 2007 Junio C Hamano
*/
-
#include "cache.h"
#include "attr.h"
@@ -71,7 +70,7 @@ 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;
const char *value;
@@ -79,7 +78,7 @@ unsigned whitespace_rule(const char *pathname)
if (!attr_whitespace_rule)
attr_whitespace_rule = attr_check_initl("whitespace", NULL);
- git_check_attr(&the_index, pathname, attr_whitespace_rule);
+ git_check_attr(istate, pathname, attr_whitespace_rule);
value = attr_whitespace_rule->items[0].value;
if (ATTR_TRUE(value)) {
/* true (whitespace) */