summaryrefslogtreecommitdiff
path: root/builtin/check-ignore.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-05-30 11:16:40 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-30 11:16:40 +0900
commit3c5a78280fa5535050fe83b51cafb9ca51e8d9e8 (patch)
treec4872e1654f52d2e5e9c5160479b26c778697074 /builtin/check-ignore.c
parentMerge branch 'jc/name-rev-lw-tag' (diff)
parentpathspec: convert find_pathspecs_matching_against_index to take an index (diff)
downloadtgif-3c5a78280fa5535050fe83b51cafb9ca51e8d9e8.tar.xz
Merge branch 'bw/pathspec-sans-the-index'
Simplify parse_pathspec() codepath and stop it from looking at the default in-core index. * bw/pathspec-sans-the-index: pathspec: convert find_pathspecs_matching_against_index to take an index pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP ls-files: prevent prune_cache from overeagerly pruning submodules pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag submodule: add die_in_unpopulated_submodule function pathspec: provide a more descriptive die message
Diffstat (limited to 'builtin/check-ignore.c')
-rw-r--r--builtin/check-ignore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index d2293b22e1..c7b8c08897 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -4,6 +4,7 @@
#include "quote.h"
#include "pathspec.h"
#include "parse-options.h"
+#include "submodule.h"
static int quiet, verbose, stdin_paths, show_non_matching, no_index;
static const char * const check_ignore_usage[] = {
@@ -87,16 +88,17 @@ static int check_ignore(struct dir_struct *dir,
parse_pathspec(&pathspec,
PATHSPEC_ALL_MAGIC & ~PATHSPEC_FROMTOP,
PATHSPEC_SYMLINK_LEADING_PATH |
- PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE |
PATHSPEC_KEEP_ORDER,
prefix, argv);
+ die_path_inside_submodule(&the_index, &pathspec);
+
/*
* look for pathspecs matching entries in the index, since these
* should not be ignored, in order to be consistent with
* 'git status', 'git add' etc.
*/
- seen = find_pathspecs_matching_against_index(&pathspec);
+ seen = find_pathspecs_matching_against_index(&pathspec, &the_index);
for (i = 0; i < pathspec.nr; i++) {
full_path = pathspec.items[i].match;
exclude = NULL;