]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/notes.c
run-command API users: use strvec_pushl(), not argv construction
[thirdparty/git.git] / builtin / notes.c
index 71c59583a17f8da6eb948248e19a262781091f28..85d1abad884242695da7e5e841c3341c985ab5d2 100644 (file)
@@ -134,14 +134,13 @@ static void copy_obj_to_fd(int fd, const struct object_id *oid)
 
 static void write_commented_object(int fd, const struct object_id *object)
 {
-       const char *show_args[5] =
-               {"show", "--stat", "--no-notes", oid_to_hex(object), NULL};
        struct child_process show = CHILD_PROCESS_INIT;
        struct strbuf buf = STRBUF_INIT;
        struct strbuf cbuf = STRBUF_INIT;
 
        /* Invoke "git show --stat --no-notes $object" */
-       show.argv = show_args;
+       strvec_pushl(&show.args, "show", "--stat", "--no-notes",
+                    oid_to_hex(object), NULL);
        show.no_stdin = 1;
        show.out = -1;
        show.err = 0;