cocci: apply the "rerere.h" part of "the_repository.pending"

Apply the part of "the_repository.pending.cocci" pertaining to "rerere.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Mar 28, 2023 at 15:58 UTC b26a71b1beadf0184259384c12c9567ac89c0d13
4 files changed +5 -8
builtin/stash.c
+1 -1
@@ -601,7 +601,7 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
601 ret = error(_("could not write index"));
602
603 if (ret) {
604 - rerere(0);
604 + repo_rerere(the_repository, 0);
605
606 if (index)
607 fprintf_ln(stderr, _("Index was not unstashed."));
contrib/coccinelle/the_repository.cocci
+4
@@ -109,6 +109,10 @@
109 |
110 - dwim_ref
111 + repo_dwim_ref
112 +// rerere.h
113 +|
114 +- rerere
115 ++ repo_rerere
116 )
117 (
118 + the_repository,
contrib/coccinelle/the_repository.pending.cocci
-4
@@ -5,11 +5,7 @@
5 @@
6 @@
7 (
8 -// rerere.h
9 -- rerere
10 -+ repo_rerere
8 // revision.h
12 -|
9 - init_revisions
10 + repo_init_revisions
11 )
rerere.h
-3
@@ -24,9 +24,6 @@ struct rerere_id {
24 };
25
26 int setup_rerere(struct repository *,struct string_list *, int);
27 -#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
28 -#define rerere(flags) repo_rerere(the_repository, flags)
29 -#endif
27 int repo_rerere(struct repository *, int);
28 /*
29 * Given the conflict ID and the name of a "file" used for replaying