Thread (67 messages) 67 messages, 6 authors, 2021-10-01

Re: [PATCH v2 4/8] builtin/repack.c: keep track of existing packs unconditionally

From: Jonathan Tan <hidden>
Date: 2021-09-22 22:56:12

quoted hunk ↗ jump to hunk
@@ -98,8 +98,9 @@ static void remove_pack_on_signal(int signo)
  * have a corresponding .keep file. These packs are not to
  * be kept if we are going to pack everything into one file.
  */
-static void get_non_kept_pack_filenames(struct string_list *fname_list,
-					const struct string_list *extra_keep)
+static void collect_pack_filenames(struct string_list *fname_list,
+				   struct string_list *fname_kept_list,
+				   const struct string_list *extra_keep)
 {
 	DIR *dir;
 	struct dirent *e;
The comment in the before-context of this hunk needs to be updated.

Also, I think that fname_list should be renamed to fname_nonkept_list.
It does have the same semantics as before, but the name of the function
has changed. And also, fname_list sounds like a superset of
fname_kept_list, but that is not the case.
quoted hunk ↗ jump to hunk
@@ -440,6 +440,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 	struct string_list names = STRING_LIST_INIT_DUP;
 	struct string_list rollback = STRING_LIST_INIT_NODUP;
 	struct string_list existing_packs = STRING_LIST_INIT_DUP;
+	struct string_list existing_kept_packs = STRING_LIST_INIT_DUP;
 	struct pack_geometry *geometry = NULL;
 	struct strbuf line = STRBUF_INIT;
 	int i, ext, ret;
Likewise here - the introduction of a new similarly-named variable means
that existing_packs should be renamed, I think.

Other than that, this patch looks good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help