diff mbox series

[06/11] midx: move `write_midx_file` to midx-write.c

Message ID 73977036d7a8cc8f84a5dbc54e462477d33f2c1e.1711387439.git.me@ttaylorr.com (mailing list archive)
State Superseded
Headers show
Series midx: split MIDX writing routines into midx-write.c, cleanup | expand

Commit Message

Taylor Blau March 25, 2024, 5:24 p.m. UTC
Prepare to move the last substantial function related to writing from
midx.c to to midx-write.c by moving another thin wrapper around it.

Like previous changes, this patch does not introduce any behavioral
changes and is best viewed with `--color-moved`.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 midx-write.c | 9 +++++++++
 midx.c       | 9 ---------
 2 files changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/midx-write.c b/midx-write.c
index 635e6af193..3d7697d8a2 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -18,6 +18,15 @@  extern int write_midx_internal(const char *object_dir,
 extern struct multi_pack_index *lookup_multi_pack_index(struct repository *r,
 							const char *object_dir);
 
+int write_midx_file(const char *object_dir,
+		    const char *preferred_pack_name,
+		    const char *refs_snapshot,
+		    unsigned flags)
+{
+	return write_midx_internal(object_dir, NULL, NULL, preferred_pack_name,
+				   refs_snapshot, flags);
+}
+
 int write_midx_file_only(const char *object_dir,
 			 struct string_list *packs_to_include,
 			 const char *preferred_pack_name,
diff --git a/midx.c b/midx.c
index 702eca805a..39b5c86736 100644
--- a/midx.c
+++ b/midx.c
@@ -1755,15 +1755,6 @@  int write_midx_internal(const char *object_dir,
 	return result;
 }
 
-int write_midx_file(const char *object_dir,
-		    const char *preferred_pack_name,
-		    const char *refs_snapshot,
-		    unsigned flags)
-{
-	return write_midx_internal(object_dir, NULL, NULL, preferred_pack_name,
-				   refs_snapshot, flags);
-}
-
 struct clear_midx_data {
 	char *keep;
 	const char *ext;