]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replay: prevent the_repository from coming back
authorElijah Newren <newren@gmail.com>
Fri, 20 Feb 2026 01:59:48 +0000 (01:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Feb 2026 02:37:25 +0000 (18:37 -0800)
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>
replay.c

index f97d652f338f1df47788e4024d5f08c38943e813..a63f6714c4c2ec641bee226983e3d892be854b44 100644 (file)
--- a/replay.c
+++ b/replay.c
 #include "strmap.h"
 #include "tree.h"
 
+/*
+ * We technically need USE_THE_REPOSITORY_VARIABLE for DEFAULT_ABBREV, but
+ * do not want to use the_repository.
+ */
+#define the_repository DO_NOT_USE_THE_REPOSITORY
+
 static const char *short_commit_name(struct repository *repo,
                                     struct commit *commit)
 {