Thread (104 messages) 104 messages, 2 authors, 2023-10-02

Re: [PATCH v3 3/8] repack: refactor finishing pack-objects command

From: Taylor Blau <hidden>
Date: 2023-07-25 22:50:16

On Mon, Jul 24, 2023 at 10:59:04AM +0200, Christian Couder wrote:
Create a new finish_pack_objects_cmd() to refactor duplicated code
that handles reading the packfile names from the output of a
`git pack-objects` command and putting it into a string_list, as well as
calling finish_command().

While at it, beautify a code comment a bit in the new function.
Everything here looks good to me. Thanks for cleaning this up into its
own function and DRY-ing things up a little bit.
quoted hunk ↗ jump to hunk
Signed-off-by: Christian Couder <chriscool@tuxfamily.org
---
 builtin/repack.c | 70 +++++++++++++++++++++++-------------------------
 1 file changed, 33 insertions(+), 37 deletions(-)
diff --git a/builtin/repack.c b/builtin/repack.c
index aea5ca9d44..96af2d1caf 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -696,6 +696,36 @@ static void remove_redundant_bitmaps(struct string_list *include,
 	strbuf_release(&path);
 }

+static int finish_pack_objects_cmd(struct child_process *cmd,
+				   struct string_list *names,
+				   int local)
I'm glad to see "local" in the arguments list ;-). I think that the
implementation came out nice and clean here.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help