Skip to content

Commit 46c24e0

Browse files
committed
merge-ort: prevent the_repository from coming back
There are two things preventing us from removing our usage of USE_THE_REPOSITORY_VARIABLE: one necessary use of the_repository in prefetch_for_content_merges(), and the use of DEFAULT_ABBREV. We have removed all other uses of the_repository in merge-ort before (multiple times), 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, with a special carve-out for prefetch_for_content_merges(). Signed-off-by: Elijah Newren <newren@gmail.com>
1 parent 36c2713 commit 46c24e0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

merge-ort.c

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

56+
#define the_repository DO_NOT_USE_THE_REPOSITORY
57+
5658
/*
5759
* We have many arrays of size 3. Whenever we have such an array, the
5860
* indices refer to one of the sides of the three-way merge. This is so
@@ -4433,6 +4435,8 @@ static int process_entry(struct merge_options *opt,
44334435
return 0;
44344436
}
44354437

4438+
#undef the_repository
4439+
44364440
static void prefetch_for_content_merges(struct merge_options *opt,
44374441
struct string_list *plist)
44384442
{
@@ -4481,6 +4485,8 @@ static void prefetch_for_content_merges(struct merge_options *opt,
44814485
oid_array_clear(&to_fetch);
44824486
}
44834487

4488+
#define the_repository DO_NOT_USE_the_repository
4489+
44844490
static int process_entries(struct merge_options *opt,
44854491
struct object_id *result_oid)
44864492
{

0 commit comments

Comments
 (0)