Skip to content

Commit 5925722

Browse files
newrengitster
authored andcommitted
merge-ort: 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. 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>
1 parent 5eae39b commit 5925722

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

merge-ort.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
#include "unpack-trees.h"
5454
#include "xdiff-interface.h"
5555

56+
/*
57+
* We technically need USE_THE_REPOSITORY_VARIABLE above for DEFAULT_ABBREV,
58+
* but do not want more uses of the_repository. Prevent them.
59+
*
60+
* opt->repo is available; use it instead.
61+
*/
62+
#define the_repository DO_NOT_USE_THE_REPOSITORY
63+
5664
/*
5765
* We have many arrays of size 3. Whenever we have such an array, the
5866
* indices refer to one of the sides of the three-way merge. This is so

0 commit comments

Comments
 (0)