diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-11-19 14:07:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-11-21 12:06:15 +0900 |
commit | 031b2033e0b5c6276bbd93f276e1698f925fb498 (patch) | |
tree | 213e0ccf758ac82833f6354c22732b358951fc5c /builtin/rm.c | |
parent | 0e6550a2c631e032c1c283398e50e9e654c171f0 (diff) | |
download | git-031b2033e0b5c6276bbd93f276e1698f925fb498.tar.gz |
cocci & cache.h: apply a selection of "pending" index-compatibility
Apply a selection of rules in "index-compatibility.pending.cocci"
tree-wide, and in doing so migrate them to
"index-compatibility.cocci".
As in preceding commits the only manual changes here are the macro
removals in "cache.h", and the update to the '*.cocci" rules. The rest
of the C code changes are the result of applying those updated rules.
Move rules for some rarely used cache compatibility macros from
"index-compatibility.pending.cocci" to "index-compatibility.cocci" and
apply them.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rm.c')
-rw-r--r-- | builtin/rm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rm.c b/builtin/rm.c index f0d025a4e2..c717cdc97f 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -168,7 +168,7 @@ static int check_local_mod(struct object_id *head, int index_only) * Is the index different from the file in the work tree? * If it's a submodule, is its work tree modified? */ - if (ce_match_stat(ce, &st, 0) || + if (ie_match_stat(&the_index, ce, &st, 0) || (S_ISGITLINK(ce->ce_mode) && bad_to_remove_submodule(ce->name, SUBMODULE_REMOVAL_DIE_ON_ERROR | @@ -386,7 +386,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) if (!quiet) printf("rm '%s'\n", path); - if (remove_file_from_cache(path)) + if (remove_file_from_index(&the_index, path)) die(_("git rm: unable to remove %s"), path); } |