aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/check-ignore.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-04-18 14:14:14 +0200
committerJunio C Hamano <gitster@pobox.com>2024-04-18 12:30:42 -0700
commitf59aa5e0a93242f73bf21e241fabe0c261f4b62a (patch)
tree11b227b0b15fc34103be2c545501a22c904c939b /builtin/check-ignore.c
parent319ba144076c27f3451bb73834839e9441a9c180 (diff)
downloadgit-f59aa5e0a93242f73bf21e241fabe0c261f4b62a.tar.gz
builtin: stop using `the_index`
Convert builtins to use `the_repository->index` instead of `the_index`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-ignore.c')
-rw-r--r--builtin/check-ignore.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 906cd96753..6c43430ec4 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -1,4 +1,3 @@
-#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
#include "dir.h"
@@ -95,21 +94,21 @@ static int check_ignore(struct dir_struct *dir,
PATHSPEC_KEEP_ORDER,
prefix, argv);
- die_path_inside_submodule(&the_index, &pathspec);
+ die_path_inside_submodule(the_repository->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, &the_index,
+ seen = find_pathspecs_matching_against_index(&pathspec, the_repository->index,
PS_HEED_SKIP_WORKTREE);
for (i = 0; i < pathspec.nr; i++) {
full_path = pathspec.items[i].match;
pattern = NULL;
if (!seen[i]) {
int dtype = DT_UNKNOWN;
- pattern = last_matching_pattern(dir, &the_index,
+ pattern = last_matching_pattern(dir, the_repository->index,
full_path, &dtype);
if (!verbose && pattern &&
pattern->flags & PATTERN_FLAG_NEGATIVE)