replace memset with string-list initializers
[gitweb.git] / builtin / commit.c
index 461c3b1cade4a995d3eb3cc212645791245865e0..023df406f836b5709cbd85396a6c9bd70cbcdefb 100644 (file)
@@ -423,8 +423,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
                        die(_("cannot do a partial commit during a cherry-pick."));
        }
 
-       memset(&partial, 0, sizeof(partial));
-       partial.strdup_strings = 1;
+       string_list_init(&partial, 1);
        if (list_paths(&partial, !current_head ? NULL : "HEAD", prefix, &pathspec))
                exit(1);