[PATCH v2 5/6] merge-ort: prevent the_repository from coming back
- From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Feb 20, 2026, 01:59 UTC
- Message-ID
- <932d945c9bd15ae570198fb489173b4461034622.1771552788.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2048.v2.git.1771552788.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
Due to the use of DEFAULT_ABBREV, we cannot get rid of our usage of USE_THE_REPOSITORY_VARIABLE. However, we have removed all other uses of the_repository in merge-ort a few times. But they keep coming back.
Define the_repository to make it a compilation error so that they don't come back any more.
Signed-off-by: Elijah Newren <newren@gmail.com> --- merge-ort.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/merge-ort.c b/merge-ort.c index 60b4675f39..00923ce3cd 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -53,6 +53,14 @@ #include "unpack-trees.h" #include "xdiff-interface.h" +/* + * We technically need USE_THE_REPOSITORY_VARIABLE above for DEFAULT_ABBREV, + * but do not want more uses of the_repository. Prevent them. + * + * opt->repo is available; use it instead. + */ +#define the_repository DO_NOT_USE_THE_REPOSITORY + /* * We have many arrays of size 3. Whenever we have such an array, the * indices refer to one of the sides of the three-way merge. This is so
-- gitgitgadget