summaryrefslogtreecommitdiff
path: root/builtin/check-ignore.c
diff options
context:
space:
mode:
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 d2293b2..c7b8c08 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;