]> git.ipfire.org Git - thirdparty/git.git/commitdiff
merge-ort: prevent the_repository from coming back
authorElijah Newren <newren@gmail.com>
Sat, 21 Feb 2026 23:59:52 +0000 (23:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Feb 2026 02:34:07 +0000 (18:34 -0800)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-ort.c

index 60b4675f39d8c5c1a65214fe22a8f489c51da78c..00923ce3cd749b4dfe379741117eac693c7d3bfc 100644 (file)
 #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