summaryrefslogtreecommitdiffstats
path: root/midx-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'midx-write.c')
-rw-r--r--midx-write.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/midx-write.c b/midx-write.c
index 1c355cdf8d..1bc2f52569 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -1,5 +1,3 @@
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "git-compat-util.h"
#include "abspath.h"
#include "config.h"
@@ -1505,24 +1503,22 @@ cleanup:
return result;
}
-int write_midx_file(const char *object_dir,
+int write_midx_file(struct repository *r, const char *object_dir,
const char *preferred_pack_name,
- const char *refs_snapshot,
- unsigned flags)
+ const char *refs_snapshot, unsigned flags)
{
- return write_midx_internal(the_repository, object_dir, NULL, NULL,
- preferred_pack_name, refs_snapshot, flags);
+ return write_midx_internal(r, object_dir, NULL, NULL,
+ preferred_pack_name, refs_snapshot,
+ flags);
}
-int write_midx_file_only(const char *object_dir,
+int write_midx_file_only(struct repository *r, const char *object_dir,
struct string_list *packs_to_include,
const char *preferred_pack_name,
- const char *refs_snapshot,
- unsigned flags)
+ const char *refs_snapshot, unsigned flags)
{
- return write_midx_internal(the_repository, object_dir, packs_to_include,
- NULL, preferred_pack_name, refs_snapshot,
- flags);
+ return write_midx_internal(r, object_dir, packs_to_include, NULL,
+ preferred_pack_name, refs_snapshot, flags);
}
int expire_midx_packs(struct repository *r, const char *object_dir, unsigned flags)