replay: prevent the_repository from coming back
Due to the use of DEFAULT_ABBREV, we cannot get rid of our usage of USE_THE_REPOSITORY_VARIABLE. We have removed all other uses of the_repository before, but without removing that definition, they keep coming back. Define the_repository to make it a compilation error so that they don't come back any more; the repo parameter plumbed through the various functions can be used instead. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Feb 20, 2026 at 01:59 UTC
3249d07962f081bd84bace9ca7f808575e2cae56
1 file changed
+6
replay.c
+6
@@ -11,6 +11,12 @@
11
#include "strmap.h"
12
#include "tree.h"
13
14
+/*
15
+ * We technically need USE_THE_REPOSITORY_VARIABLE for DEFAULT_ABBREV, but
16
+ * do not want to use the_repository.
17
+ */
18
+#define the_repository DO_NOT_USE_THE_REPOSITORY
19
+
20
static const char *short_commit_name(struct repository *repo,
21
struct commit *commit)
22
{