aboutsummaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-11 15:04:27 -0700
committerJunio C Hamano <gitster@pobox.com>2017-05-12 14:23:46 +0900
commit08de9151a8a67f29a3a5a36931298237d78ca736 (patch)
treee592ee783330d7e4f73315706f56a9cf46a15857 /builtin/add.c
parent2249d4dbc197d45da5407cbc80b2461e49bb8785 (diff)
downloadgit-08de9151a8a67f29a3a5a36931298237d78ca736.tar.gz
git-08de9151a8a67f29a3a5a36931298237d78ca736.tar.xz
pathspec: convert find_pathspecs_matching_against_index to take an index
Convert find_pathspecs_matching_against_index to take an index parameter. In addition mark pathspec.c with NO_THE_INDEX_COMPATIBILITY_MACROS now that it doesn't use any cache macros or reference 'the_index'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 86770d6af..0365a5209 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -136,7 +136,7 @@ static char *prune_directory(struct dir_struct *dir, struct pathspec *pathspec,
*dst++ = entry;
}
dir->nr = dst - dir->entries;
- add_pathspec_matches_against_index(pathspec, seen);
+ add_pathspec_matches_against_index(pathspec, &the_index, seen);
return seen;
}
@@ -418,7 +418,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
int i;
if (!seen)
- seen = find_pathspecs_matching_against_index(&pathspec);
+ seen = find_pathspecs_matching_against_index(&pathspec, &the_index);
/*
* file_exists() assumes exact match