Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-11-19 16:07:30 +0300
committerJunio C Hamano <gitster@pobox.com>2022-11-21 06:06:15 +0300
commitfbc1ed629e3c71b47a04ab86b88497984bc6acbb (patch)
treecf27ce492fa8afbf46027aaca6f67cf3c3d99bd7 /builtin/clean.c
parent8f565119451811188d6f5e57c3f069a65ec550e8 (diff)
cocci & cache.h: remove rarely used "the_index" compat macros
Since 4aab5b46f44 (Make read-cache.c "the_index" free., 2007-04-01) we've been undergoing a slow migration away from these macros, but haven't made much progress since f8adbec9fea (cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch, 2019-01-24). Let's move forward a bit by changing the users of those macros that are rare enough that we can convert them in one go, and then remove the compatibility shim. The only manual change to the C code here is to "cache.h", the rest is all the result of applying the new "index-compatibility.cocci". Even though it's a one-off, let's keep the coccinelle rules for now. We'll extend them in subsequent commits, and this will help anything that's in-flight or out-of-tree to migrate. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clean.c')
-rw-r--r--builtin/clean.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 40ff2c578d..7084e685f6 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -1031,7 +1031,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
struct stat st;
const char *rel;
- if (!cache_name_is_other(ent->name, ent->len))
+ if (!index_name_is_other(&the_index, ent->name, ent->len))
continue;
if (lstat(ent->name, &st))