@matheusbsbs / matheus-bagliano / commits / f6d8942b1f
Fork 0

strvec: fix indentation in renamed calls

Code which split an argv_array call across multiple lines, like: argv_array_pushl(&args, "one argument", "another argument", "and more", NULL); was recently mechanically renamed to use strvec, which results in mis-matched indentation like: strvec_pushl(&args, "one argument", "another argument", "and more", NULL); Let's fix these up to align the arguments with the opening paren. I did this manually by sifting through the results of: git jump grep 'strvec_.*,$' and liberally applying my editor's auto-format. Most of the changes are of the form shown above, though I also normalized a few that had originally used a single-tab indentation (rather than our usual style of aligning with the open paren). I also rewrapped a couple of obvious cases (e.g., where previously too-long lines became short enough to fit on one), but I wasn't aggressive about it. In cases broken to three or more lines, the grouping of arguments is sometimes meaningful, and it wasn't worth my time or reviewer time to ponder each case individually. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 28, 2020 at 16:26 UTC f6d8942b1fc6c968980c8ae03054d7b2114b4415
34 files changed +173 -174
add-interactive.c
+5 -5
@@ -941,7 +941,7 @@ static int run_patch(struct add_i_state *s, const struct pathspec *ps,
941 for (i = 0; i < files->items.nr; i++)
942 if (files->selected[i])
943 strvec_push(&args,
944 - files->items.items[i].string);
944 + files->items.items[i].string);
945 parse_pathspec(&ps_selected,
946 PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL,
947 PATHSPEC_LITERAL_PATH, "", args.argv);
@@ -979,13 +979,13 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
979 struct strvec args = STRVEC_INIT;
980
981 strvec_pushl(&args, "git", "diff", "-p", "--cached",
982 - oid_to_hex(!is_initial ? &oid :
983 - s->r->hash_algo->empty_tree),
984 - "--", NULL);
982 + oid_to_hex(!is_initial ? &oid :
983 + s->r->hash_algo->empty_tree),
984 + "--", NULL);
985 for (i = 0; i < files->items.nr; i++)
986 if (files->selected[i])
987 strvec_push(&args,
988 - files->items.items[i].string);
988 + files->items.items[i].string);
989 res = run_command_v_opt(args.argv, 0);
990 strvec_clear(&args);
991 }
add-patch.c
+5 -5
@@ -291,7 +291,7 @@ static void setup_child_process(struct add_p_state *s,
291
292 cp->git_cmd = 1;
293 strvec_pushf(&cp->env_array,
294 - INDEX_ENVIRONMENT "=%s", s->s.r->index_file);
294 + INDEX_ENVIRONMENT "=%s", s->s.r->index_file);
295 }
296
297 static int parse_range(const char **p,
@@ -386,10 +386,10 @@ static int parse_diff(struct add_p_state *s, const struct pathspec *ps)
386 if (s->revision) {
387 struct object_id oid;
388 strvec_push(&args,
389 - /* could be on an unborn branch */
390 - !strcmp("HEAD", s->revision) &&
391 - get_oid("HEAD", &oid) ?
392 - empty_tree_oid_hex() : s->revision);
389 + /* could be on an unborn branch */
390 + !strcmp("HEAD", s->revision) &&
391 + get_oid("HEAD", &oid) ?
392 + empty_tree_oid_hex() : s->revision);
393 }
394 color_arg_index = args.argc;
395 /* Use `--no-color` explicitly, just in case `diff.color = always`. */
bisect.c
+1 -1
@@ -644,7 +644,7 @@ static void bisect_rev_setup(struct repository *r, struct rev_info *revs,
644 strvec_pushf(&rev_argv, bad_format, oid_to_hex(current_bad_oid));
645 for (i = 0; i < good_revs.nr; i++)
646 strvec_pushf(&rev_argv, good_format,
647 - oid_to_hex(good_revs.oid + i));
647 + oid_to_hex(good_revs.oid + i));
648 strvec_push(&rev_argv, "--");
649 if (read_paths)
650 read_bisect_paths(&rev_argv);
builtin/bisect--helper.c
+1 -1
@@ -529,7 +529,7 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
529 struct strvec argv = STRVEC_INIT;
530
531 strvec_pushl(&argv, "checkout", start_head.buf,
532 - "--", NULL);
532 + "--", NULL);
533 if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
534 res = error(_("checking out '%s' failed."
535 " Try 'git bisect start "
builtin/describe.c
+4 -4
@@ -505,8 +505,8 @@ static void describe_blob(struct object_id oid, struct strbuf *dst)
505 struct process_commit_data pcd = { null_oid, oid, dst, &revs};
506
507 strvec_pushl(&args, "internal: The first arg is not parsed",
508 - "--objects", "--in-commit-order", "--reverse", "HEAD",
509 - NULL);
508 + "--objects", "--in-commit-order", "--reverse", "HEAD",
509 + NULL);
510
511 repo_init_revisions(the_repository, &revs, NULL);
512 if (setup_revisions(args.argc, args.argv, &revs, NULL) > 1)
@@ -598,8 +598,8 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
598
599 strvec_init(&args);
600 strvec_pushl(&args, "name-rev",
601 - "--peel-tag", "--name-only", "--no-undefined",
602 - NULL);
601 + "--peel-tag", "--name-only", "--no-undefined",
602 + NULL);
603 if (always)
604 strvec_push(&args, "--always");
605 if (!all) {
builtin/difftool.c
+6 -6
@@ -211,9 +211,9 @@ static void changed_files(struct hashmap *result, const char *index_path,
211 env[0] = index_env.buf;
212
213 strvec_pushl(&update_index.args,
214 - "--git-dir", git_dir, "--work-tree", workdir,
215 - "update-index", "--really-refresh", "-q",
216 - "--unmerged", NULL);
214 + "--git-dir", git_dir, "--work-tree", workdir,
215 + "update-index", "--really-refresh", "-q",
216 + "--unmerged", NULL);
217 update_index.no_stdin = 1;
218 update_index.no_stdout = 1;
219 update_index.no_stderr = 1;
@@ -226,8 +226,8 @@ static void changed_files(struct hashmap *result, const char *index_path,
226 run_command(&update_index);
227
228 strvec_pushl(&diff_files.args,
229 - "--git-dir", git_dir, "--work-tree", workdir,
230 - "diff-files", "--name-only", "-z", NULL);
229 + "--git-dir", git_dir, "--work-tree", workdir,
230 + "diff-files", "--name-only", "-z", NULL);
231 diff_files.no_stdin = 1;
232 diff_files.git_cmd = 1;
233 diff_files.use_shell = 0;
@@ -394,7 +394,7 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
394 child.dir = prefix;
395 child.out = -1;
396 strvec_pushl(&child.args, "diff", "--raw", "--no-abbrev", "-z",
397 - NULL);
397 + NULL);
398 for (i = 0; i < argc; i++)
399 strvec_push(&child.args, argv[i]);
400 if (start_command(&child))
builtin/fetch.c
+1 -1
@@ -1601,7 +1601,7 @@ static int fetch_multiple(struct string_list *list, int max_children)
1601 }
1602
1603 strvec_pushl(&argv, "fetch", "--append", "--no-auto-gc",
1604 - "--no-write-commit-graph", NULL);
1604 + "--no-write-commit-graph", NULL);
1605 add_options_to_argv(&argv);
1606
1607 if (max_children != 1 && list->nr != 1) {
builtin/gc.c
+1 -1
@@ -662,7 +662,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
662 strvec_push(&prune, "--no-progress");
663 if (has_promisor_remote())
664 strvec_push(&prune,
665 - "--exclude-promisor-objects");
665 + "--exclude-promisor-objects");
666 if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
667 die(FAILED_RUN, prune.argv[0]);
668 }
builtin/pull.c
+3 -3
@@ -638,7 +638,7 @@ static int rebase_submodules(void)
638 cp.git_cmd = 1;
639 cp.no_stdin = 1;
640 strvec_pushl(&cp.args, "submodule", "update",
641 - "--recursive", "--rebase", NULL);
641 + "--recursive", "--rebase", NULL);
642 argv_push_verbosity(&cp.args);
643
644 return run_command(&cp);
@@ -651,7 +651,7 @@ static int update_submodules(void)
651 cp.git_cmd = 1;
652 cp.no_stdin = 1;
653 strvec_pushl(&cp.args, "submodule", "update",
654 - "--recursive", "--checkout", NULL);
654 + "--recursive", "--checkout", NULL);
655 argv_push_verbosity(&cp.args);
656
657 return run_command(&cp);
@@ -802,7 +802,7 @@ static int get_rebase_fork_point(struct object_id *fork_point, const char *repo,
802 return -1;
803
804 strvec_pushl(&cp.args, "merge-base", "--fork-point",
805 - remote_branch, curr_branch->name, NULL);
805 + remote_branch, curr_branch->name, NULL);
806 cp.no_stdin = 1;
807 cp.no_stderr = 1;
808 cp.git_cmd = 1;
builtin/rebase.c
+7 -7
@@ -348,7 +348,7 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
348 strvec_pushl(&make_script_args, "", revisions, NULL);
349 if (opts->restrict_revision)
350 strvec_pushf(&make_script_args, "^%s",
351 - oid_to_hex(&opts->restrict_revision->object.oid));
351 + oid_to_hex(&opts->restrict_revision->object.oid));
352
353 ret = sequencer_make_script(the_repository, &todo_list.buf,
354 make_script_args.argc, make_script_args.argv,
@@ -858,17 +858,17 @@ static int run_am(struct rebase_options *opts)
858
859 format_patch.git_cmd = 1;
860 strvec_pushl(&format_patch.args, "format-patch", "-k", "--stdout",
861 - "--full-index", "--cherry-pick", "--right-only",
862 - "--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
863 - "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
864 - "--no-base", NULL);
861 + "--full-index", "--cherry-pick", "--right-only",
862 + "--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
863 + "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
864 + "--no-base", NULL);
865 if (opts->git_format_patch_opt.len)
866 strvec_split(&format_patch.args,
867 - opts->git_format_patch_opt.buf);
867 + opts->git_format_patch_opt.buf);
868 strvec_push(&format_patch.args, revisions.buf);
869 if (opts->restrict_revision)
870 strvec_pushf(&format_patch.args, "^%s",
871 - oid_to_hex(&opts->restrict_revision->object.oid));
871 + oid_to_hex(&opts->restrict_revision->object.oid));
872
873 status = run_command(&format_patch);
874 if (status) {
builtin/receive-pack.c
+21 -21
@@ -668,24 +668,24 @@ static void prepare_push_cert_sha1(struct child_process *proc)
668 }
669 if (!is_null_oid(&push_cert_oid)) {
670 strvec_pushf(&proc->env_array, "GIT_PUSH_CERT=%s",
671 - oid_to_hex(&push_cert_oid));
671 + oid_to_hex(&push_cert_oid));
672 strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_SIGNER=%s",
673 - sigcheck.signer ? sigcheck.signer : "");
673 + sigcheck.signer ? sigcheck.signer : "");
674 strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_KEY=%s",
675 - sigcheck.key ? sigcheck.key : "");
675 + sigcheck.key ? sigcheck.key : "");
676 strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_STATUS=%c",
677 - sigcheck.result);
677 + sigcheck.result);
678 if (push_cert_nonce) {
679 strvec_pushf(&proc->env_array,
680 - "GIT_PUSH_CERT_NONCE=%s",
681 - push_cert_nonce);
680 + "GIT_PUSH_CERT_NONCE=%s",
681 + push_cert_nonce);
682 strvec_pushf(&proc->env_array,
683 - "GIT_PUSH_CERT_NONCE_STATUS=%s",
684 - nonce_status);
683 + "GIT_PUSH_CERT_NONCE_STATUS=%s",
684 + nonce_status);
685 if (nonce_status == NONCE_SLOP)
686 strvec_pushf(&proc->env_array,
687 - "GIT_PUSH_CERT_NONCE_SLOP=%ld",
688 - nonce_stamp_slop);
687 + "GIT_PUSH_CERT_NONCE_SLOP=%ld",
688 + nonce_stamp_slop);
689 }
690 }
691 }
@@ -721,10 +721,10 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
721 int i;
722 for (i = 0; i < feed_state->push_options->nr; i++)
723 strvec_pushf(&proc.env_array,
724 - "GIT_PUSH_OPTION_%d=%s", i,
725 - feed_state->push_options->items[i].string);
724 + "GIT_PUSH_OPTION_%d=%s", i,
725 + feed_state->push_options->items[i].string);
726 strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT=%d",
727 - feed_state->push_options->nr);
727 + feed_state->push_options->nr);
728 } else
729 strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT");
730
@@ -1718,7 +1718,7 @@ static const char *pack_lockfile;
1718 static void push_header_arg(struct strvec *args, struct pack_header *hdr)
1719 {
1720 strvec_pushf(args, "--pack_header=%"PRIu32",%"PRIu32,
1721 - ntohl(hdr->hdr_version), ntohl(hdr->hdr_entries));
1721 + ntohl(hdr->hdr_version), ntohl(hdr->hdr_entries));
1722 }
1723
1724 static const char *unpack(int err_fd, struct shallow_info *si)
@@ -1768,10 +1768,10 @@ static const char *unpack(int err_fd, struct shallow_info *si)
1768 strvec_push(&child.args, "-q");
1769 if (fsck_objects)
1770 strvec_pushf(&child.args, "--strict%s",
1771 - fsck_msg_types.buf);
1771 + fsck_msg_types.buf);
1772 if (max_input_size)
1773 strvec_pushf(&child.args, "--max-input-size=%"PRIuMAX,
1774 - (uintmax_t)max_input_size);
1774 + (uintmax_t)max_input_size);
1775 child.no_stdout = 1;
1776 child.err = err_fd;
1777 child.git_cmd = 1;
@@ -1787,9 +1787,9 @@ static const char *unpack(int err_fd, struct shallow_info *si)
1787 if (xgethostname(hostname, sizeof(hostname)))
1788 xsnprintf(hostname, sizeof(hostname), "localhost");
1789 strvec_pushf(&child.args,
1790 - "--keep=receive-pack %"PRIuMAX" on %s",
1791 - (uintmax_t)getpid(),
1792 - hostname);
1790 + "--keep=receive-pack %"PRIuMAX" on %s",
1791 + (uintmax_t)getpid(),
1792 + hostname);
1793
1794 if (!quiet && err_fd)
1795 strvec_push(&child.args, "--show-resolving-progress");
@@ -1797,12 +1797,12 @@ static const char *unpack(int err_fd, struct shallow_info *si)
1797 strvec_push(&child.args, "--report-end-of-input");
1798 if (fsck_objects)
1799 strvec_pushf(&child.args, "--strict%s",
1800 - fsck_msg_types.buf);
1800 + fsck_msg_types.buf);
1801 if (!reject_thin)
1802 strvec_push(&child.args, "--fix-thin");
1803 if (max_input_size)
1804 strvec_pushf(&child.args, "--max-input-size=%"PRIuMAX,
1805 - (uintmax_t)max_input_size);
1805 + (uintmax_t)max_input_size);
1806 child.out = -1;
1807 child.err = err_fd;
1808 child.git_cmd = 1;
builtin/repack.c
+4 -4
@@ -366,7 +366,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
366 strvec_push(&cmd.args, "--honor-pack-keep");
367 for (i = 0; i < keep_pack_list.nr; i++)
368 strvec_pushf(&cmd.args, "--keep-pack=%s",
369 - keep_pack_list.items[i].string);
369 + keep_pack_list.items[i].string);
370 strvec_push(&cmd.args, "--non-empty");
371 strvec_push(&cmd.args, "--all");
372 strvec_push(&cmd.args, "--reflog");
@@ -388,12 +388,12 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
388 if (existing_packs.nr && delete_redundant) {
389 if (unpack_unreachable) {
390 strvec_pushf(&cmd.args,
391 - "--unpack-unreachable=%s",
392 - unpack_unreachable);
391 + "--unpack-unreachable=%s",
392 + unpack_unreachable);
393 strvec_push(&cmd.env_array, "GIT_REF_PARANOIA=1");
394 } else if (pack_everything & LOOSEN_UNREACHABLE) {
395 strvec_push(&cmd.args,
396 - "--unpack-unreachable");
396 + "--unpack-unreachable");
397 } else if (keep_unreachable) {
398 strvec_push(&cmd.args, "--keep-unreachable");
399 strvec_push(&cmd.args, "--pack-loose-unreachable");
builtin/stash.c
+19 -19
@@ -336,7 +336,7 @@ static int get_newly_staged(struct strbuf *out, struct object_id *c_tree)
336 */
337 cp.git_cmd = 1;
338 strvec_pushl(&cp.args, "diff-index", "--cached", "--name-only",
339 - "--diff-filter=A", NULL);
339 + "--diff-filter=A", NULL);
340 strvec_push(&cp.args, c_tree_hex);
341 return pipe_command(&cp, NULL, 0, out, 0, NULL, 0);
342 }
@@ -368,7 +368,7 @@ static int restore_untracked(struct object_id *u_tree)
368 strvec_push(&cp.args, "read-tree");
369 strvec_push(&cp.args, oid_to_hex(u_tree));
370 strvec_pushf(&cp.env_array, "GIT_INDEX_FILE=%s",
371 - stash_index_path.buf);
371 + stash_index_path.buf);
372 if (run_command(&cp)) {
373 remove_path(stash_index_path.buf);
374 return -1;
@@ -378,7 +378,7 @@ static int restore_untracked(struct object_id *u_tree)
378 cp.git_cmd = 1;
379 strvec_pushl(&cp.args, "checkout-index", "--all", NULL);
380 strvec_pushf(&cp.env_array, "GIT_INDEX_FILE=%s",
381 - stash_index_path.buf);
381 + stash_index_path.buf);
382
383 res = run_command(&cp);
384 remove_path(stash_index_path.buf);
@@ -500,9 +500,9 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
500 cp.git_cmd = 1;
501 cp.dir = prefix;
502 strvec_pushf(&cp.env_array, GIT_WORK_TREE_ENVIRONMENT"=%s",
503 - absolute_path(get_git_work_tree()));
503 + absolute_path(get_git_work_tree()));
504 strvec_pushf(&cp.env_array, GIT_DIR_ENVIRONMENT"=%s",
505 - absolute_path(get_git_dir()));
505 + absolute_path(get_git_dir()));
506 strvec_push(&cp.args, "status");
507 run_command(&cp);
508 }
@@ -547,7 +547,7 @@ static int do_drop_stash(struct stash_info *info, int quiet)
547
548 cp_reflog.git_cmd = 1;
549 strvec_pushl(&cp_reflog.args, "reflog", "delete", "--updateref",
550 - "--rewrite", NULL);
550 + "--rewrite", NULL);
551 strvec_push(&cp_reflog.args, info->revision.buf);
552 ret = run_command(&cp_reflog);
553 if (!ret) {
@@ -693,7 +693,7 @@ static int list_stash(int argc, const char **argv, const char *prefix)
693
694 cp.git_cmd = 1;
695 strvec_pushl(&cp.args, "log", "--format=%gd: %gs", "-g",
696 - "--first-parent", "-m", NULL);
696 + "--first-parent", "-m", NULL);
697 strvec_pushv(&cp.args, argv);
698 strvec_push(&cp.args, ref_stash);
699 strvec_push(&cp.args, "--");
@@ -961,7 +961,7 @@ static int save_untracked_files(struct stash_info *info, struct strbuf *msg,
961
962 cp_upd_index.git_cmd = 1;
963 strvec_pushl(&cp_upd_index.args, "update-index", "-z", "--add",
964 - "--remove", "--stdin", NULL);
964 + "--remove", "--stdin", NULL);
965 strvec_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
966 stash_index_path.buf);
967
@@ -1005,7 +1005,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
1005 cp_read_tree.git_cmd = 1;
1006 strvec_pushl(&cp_read_tree.args, "read-tree", "HEAD", NULL);
1007 strvec_pushf(&cp_read_tree.env_array, "GIT_INDEX_FILE=%s",
1008 - stash_index_path.buf);
1008 + stash_index_path.buf);
1009 if (run_command(&cp_read_tree)) {
1010 ret = -1;
1011 goto done;
@@ -1035,7 +1035,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
1035
1036 cp_diff_tree.git_cmd = 1;
1037 strvec_pushl(&cp_diff_tree.args, "diff-tree", "-p", "-U1", "HEAD",
1038 - oid_to_hex(&info->w_tree), "--", NULL);
1038 + oid_to_hex(&info->w_tree), "--", NULL);
1039 if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) {
1040 ret = -1;
1041 goto done;
@@ -1089,10 +1089,10 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
1089
1090 cp_upd_index.git_cmd = 1;
1091 strvec_pushl(&cp_upd_index.args, "update-index",
1092 - "--ignore-skip-worktree-entries",
1093 - "-z", "--add", "--remove", "--stdin", NULL);
1092 + "--ignore-skip-worktree-entries",
1093 + "-z", "--add", "--remove", "--stdin", NULL);
1094 strvec_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
1095 - stash_index_path.buf);
1095 + stash_index_path.buf);
1096
1097 if (pipe_command(&cp_upd_index, diff_output.buf, diff_output.len,
1098 NULL, 0, NULL, 0)) {
@@ -1343,7 +1343,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
1343
1344 cp.git_cmd = 1;
1345 strvec_pushl(&cp.args, "clean", "--force",
1346 - "--quiet", "-d", NULL);
1346 + "--quiet", "-d", NULL);
1347 if (include_untracked == INCLUDE_ALL_FILES)
1348 strvec_push(&cp.args, "-x");
1349 if (run_command(&cp)) {
@@ -1373,8 +1373,8 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
1373
1374 cp_diff.git_cmd = 1;
1375 strvec_pushl(&cp_diff.args, "diff-index", "-p",
1376 - "--cached", "--binary", "HEAD", "--",
1377 - NULL);
1376 + "--cached", "--binary", "HEAD", "--",
1377 + NULL);
1378 add_pathspecs(&cp_diff.args, ps);
1379 if (pipe_command(&cp_diff, NULL, 0, &out, 0, NULL, 0)) {
1380 ret = -1;
@@ -1383,7 +1383,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
1383
1384 cp_apply.git_cmd = 1;
1385 strvec_pushl(&cp_apply.args, "apply", "--index",
1386 - "-R", NULL);
1386 + "-R", NULL);
1387 if (pipe_command(&cp_apply, out.buf, out.len, NULL, 0,
1388 NULL, 0)) {
1389 ret = -1;
@@ -1393,7 +1393,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
1393 struct child_process cp = CHILD_PROCESS_INIT;
1394 cp.git_cmd = 1;
1395 strvec_pushl(&cp.args, "reset", "--hard", "-q",
1396 - "--no-recurse-submodules", NULL);
1396 + "--no-recurse-submodules", NULL);
1397 if (run_command(&cp)) {
1398 ret = -1;
1399 goto done;
@@ -1405,7 +1405,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
1405
1406 cp.git_cmd = 1;
1407 strvec_pushl(&cp.args, "checkout", "--no-overlay",
1408 - oid_to_hex(&info.i_tree), "--", NULL);
1408 + oid_to_hex(&info.i_tree), "--", NULL);
1409 if (!ps->nr)
1410 strvec_push(&cp.args, ":/");
1411 else
builtin/submodule--helper.c
+10 -10
@@ -499,7 +499,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
499 strvec_pushf(&cp.env_array, "sm_path=%s", path);
500 strvec_pushf(&cp.env_array, "displaypath=%s", displaypath);
501 strvec_pushf(&cp.env_array, "sha1=%s",
502 - oid_to_hex(ce_oid));
502 + oid_to_hex(ce_oid));
503 strvec_pushf(&cp.env_array, "toplevel=%s", toplevel);
504
505 /*
@@ -513,7 +513,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
513 */
514 sq_quote_buf(&sb, path);
515 strvec_pushf(&cp.args, "path=%s; %s",
516 - sb.buf, info->argv[0]);
516 + sb.buf, info->argv[0]);
517 strbuf_release(&sb);
518 free(toplevel);
519 } else {
@@ -537,7 +537,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
537 strvec_pushl(&cpr.args, "--super-prefix", NULL);
538 strvec_pushf(&cpr.args, "%s/", displaypath);
539 strvec_pushl(&cpr.args, "submodule--helper", "foreach", "--recursive",
540 - NULL);
540 + NULL);
541
542 if (info->quiet)
543 strvec_push(&cpr.args, "--quiet");
@@ -810,8 +810,8 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
810 strbuf_release(&buf);
811
812 strvec_pushl(&diff_files_args, "diff-files",
813 - "--ignore-submodules=dirty", "--quiet", "--",
814 - path, NULL);
813 + "--ignore-submodules=dirty", "--quiet", "--",
814 + path, NULL);
815
816 git_config(git_diff_basic_config, NULL);
817
@@ -852,7 +852,7 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
852 strvec_push(&cpr.args, "--super-prefix");
853 strvec_pushf(&cpr.args, "%s/", displaypath);
854 strvec_pushl(&cpr.args, "submodule--helper", "status",
855 - "--recursive", NULL);
855 + "--recursive", NULL);
856
857 if (flags & OPT_CACHED)
858 strvec_push(&cpr.args, "--cached");
@@ -996,7 +996,7 @@ static void sync_submodule(const char *path, const char *prefix,
996 cp.git_cmd = 1;
997 cp.dir = path;
998 strvec_pushl(&cp.args, "submodule--helper",
999 - "print-default-remote", NULL);
999 + "print-default-remote", NULL);
1000
1001 strbuf_reset(&sb);
1002 if (capture_command(&cp, &sb, 0))
@@ -1024,7 +1024,7 @@ static void sync_submodule(const char *path, const char *prefix,
1024 strvec_push(&cpr.args, "--super-prefix");
1025 strvec_pushf(&cpr.args, "%s/", displaypath);
1026 strvec_pushl(&cpr.args, "submodule--helper", "sync",
1027 - "--recursive", NULL);
1027 + "--recursive", NULL);
1028
1029 if (flags & OPT_QUIET)
1030 strvec_push(&cpr.args, "--quiet");
@@ -1128,7 +1128,7 @@ static void deinit_submodule(const char *path, const char *prefix,
1128 struct child_process cp_rm = CHILD_PROCESS_INIT;
1129 cp_rm.git_cmd = 1;
1130 strvec_pushl(&cp_rm.args, "rm", "-qn",
1131 - path, NULL);
1131 + path, NULL);
1132
1133 if (run_command(&cp_rm))
1134 die(_("Submodule work tree '%s' contains local "
@@ -1251,7 +1251,7 @@ static int clone_submodule(const char *path, const char *gitdir, const char *url
1251 struct string_list_item *item;
1252 for_each_string_list_item(item, reference)
1253 strvec_pushl(&cp.args, "--reference",
1254 - item->string, NULL);
1254 + item->string, NULL);
1255 }
1256 if (dissociate)
1257 strvec_push(&cp.args, "--dissociate");
builtin/worktree.c
+9 -9
@@ -414,10 +414,10 @@ static int add_worktree(const char *path, const char *refname,
414
415 if (!is_branch)
416 strvec_pushl(&cp.args, "update-ref", "HEAD",
417 - oid_to_hex(&commit->object.oid), NULL);
417 + oid_to_hex(&commit->object.oid), NULL);
418 else {
419 strvec_pushl(&cp.args, "symbolic-ref", "HEAD",
420 - symref.buf, NULL);
420 + symref.buf, NULL);
421 if (opts->quiet)
422 strvec_push(&cp.args, "--quiet");
423 }
@@ -466,9 +466,9 @@ done:
466 cp.argv = NULL;
467 cp.trace2_hook_name = "post-checkout";
468 strvec_pushl(&cp.args, absolute_path(hook),
469 - oid_to_hex(&null_oid),
470 - oid_to_hex(&commit->object.oid),
471 - "1", NULL);
469 + oid_to_hex(&null_oid),
470 + oid_to_hex(&commit->object.oid),
471 + "1", NULL);
472 ret = run_command(&cp);
473 }
474 }
@@ -936,13 +936,13 @@ static void check_clean_worktree(struct worktree *wt,
936 validate_no_submodules(wt);
937
938 strvec_pushf(&child_env, "%s=%s/.git",
939 - GIT_DIR_ENVIRONMENT, wt->path);
939 + GIT_DIR_ENVIRONMENT, wt->path);
940 strvec_pushf(&child_env, "%s=%s",
941 - GIT_WORK_TREE_ENVIRONMENT, wt->path);
941 + GIT_WORK_TREE_ENVIRONMENT, wt->path);
942 memset(&cp, 0, sizeof(cp));
943 strvec_pushl(&cp.args, "status",
944 - "--porcelain", "--ignore-submodules=none",
945 - NULL);
944 + "--porcelain", "--ignore-submodules=none",
945 + NULL);
946 cp.env = child_env.argv;
947 cp.git_cmd = 1;
948 cp.dir = wt->path;
bundle.c
+5 -5
@@ -275,9 +275,9 @@ static int write_pack_data(int bundle_fd, struct rev_info *revs, struct strvec *
275 int i;
276
277 strvec_pushl(&pack_objects.args,
278 - "pack-objects",
279 - "--stdout", "--thin", "--delta-base-offset",
280 - NULL);
278 + "pack-objects",
279 + "--stdout", "--thin", "--delta-base-offset",
280 + NULL);
281 strvec_pushv(&pack_objects.args, pack_options->argv);
282 pack_objects.in = -1;
283 pack_objects.out = bundle_fd;
@@ -322,8 +322,8 @@ static int compute_and_write_prerequisites(int bundle_fd,
322 int i;
323
324 strvec_pushl(&rls.args,
325 - "rev-list", "--boundary", "--pretty=oneline",
326 - NULL);
325 + "rev-list", "--boundary", "--pretty=oneline",
326 + NULL);
327 for (i = 1; i < argc; i++)
328 strvec_push(&rls.args, argv[i]);
329 rls.out = -1;
connect.c
+4 -3
@@ -1208,7 +1208,7 @@ static void push_ssh_options(struct strvec *args, struct strvec *env,
1208 strvec_push(args, "-o");
1209 strvec_push(args, "SendEnv=" GIT_PROTOCOL_ENVIRONMENT);
1210 strvec_pushf(env, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
1211 - version);
1211 + version);
1212 }
1213
1214 if (flags & CONNECT_IPV4) {
@@ -1397,8 +1397,9 @@ struct child_process *git_connect(int fd[2], const char *url,
1397 transport_check_allowed("file");
1398 conn->trace2_child_class = "transport/file";
1399 if (version > 0) {
1400 - strvec_pushf(&conn->env_array, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
1401 - version);
1400 + strvec_pushf(&conn->env_array,
1401 + GIT_PROTOCOL_ENVIRONMENT "=version=%d",
1402 + version);
1403 }
1404 }
1405 strvec_push(&conn->args, cmd.buf);
connected.c
+1 -1
@@ -106,7 +106,7 @@ no_promisor_pack_found:
106 strvec_push(&rev_list.args, "--alternate-refs");
107 if (opt->progress)
108 strvec_pushf(&rev_list.args, "--progress=%s",
109 - _("Checking connectivity"));
109 + _("Checking connectivity"));
110
111 rev_list.git_cmd = 1;
112 rev_list.env = opt->env;
daemon.c
+3 -3
@@ -665,7 +665,7 @@ static void parse_extra_args(struct hostinfo *hi, struct strvec *env,
665 if (git_protocol.len > 0) {
666 loginfo("Extended attribute \"protocol\": %s", git_protocol.buf);
667 strvec_pushf(env, GIT_PROTOCOL_ENVIRONMENT "=%s",
668 - git_protocol.buf);
668 + git_protocol.buf);
669 }
670 strbuf_release(&git_protocol);
671 }
@@ -915,7 +915,7 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
915 inet_ntop(addr->sa_family, &sin_addr->sin_addr, buf, sizeof(buf));
916 strvec_pushf(&cld.env_array, "REMOTE_ADDR=%s", buf);
917 strvec_pushf(&cld.env_array, "REMOTE_PORT=%d",
918 - ntohs(sin_addr->sin_port));
918 + ntohs(sin_addr->sin_port));
919 #ifndef NO_IPV6
920 } else if (addr->sa_family == AF_INET6) {
921 char buf[128] = "";
@@ -923,7 +923,7 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
923 inet_ntop(AF_INET6, &sin6_addr->sin6_addr, buf, sizeof(buf));
924 strvec_pushf(&cld.env_array, "REMOTE_ADDR=[%s]", buf);
925 strvec_pushf(&cld.env_array, "REMOTE_PORT=%d",
926 - ntohs(sin6_addr->sin6_port));
926 + ntohs(sin6_addr->sin6_port));
927 #endif
928 }
929
fetch-pack.c
+6 -6
@@ -854,8 +854,8 @@ static int get_pack(struct fetch_pack_args *args,
854 if (xgethostname(hostname, sizeof(hostname)))
855 xsnprintf(hostname, sizeof(hostname), "localhost");
856 strvec_pushf(&cmd.args,
857 - "--keep=fetch-pack %"PRIuMAX " on %s",
858 - (uintmax_t)getpid(), hostname);
857 + "--keep=fetch-pack %"PRIuMAX " on %s",
858 + (uintmax_t)getpid(), hostname);
859 }
860 if (only_packfile && args->check_self_contained_and_connected)
861 strvec_push(&cmd.args, "--check-self-contained-and-connected");
@@ -885,7 +885,7 @@ static int get_pack(struct fetch_pack_args *args,
885
886 if (pass_header)
887 strvec_pushf(&cmd.args, "--pack_header=%"PRIu32",%"PRIu32,
888 - ntohl(header.hdr_version),
888 + ntohl(header.hdr_version),
889 ntohl(header.hdr_entries));
890 if (fetch_fsck_objects >= 0
891 ? fetch_fsck_objects
@@ -901,7 +901,7 @@ static int get_pack(struct fetch_pack_args *args,
901 strvec_push(&cmd.args, "--fsck-objects");
902 else
903 strvec_pushf(&cmd.args, "--strict%s",
904 - fsck_msg_types.buf);
904 + fsck_msg_types.buf);
905 }
906
907 cmd.in = demux.out;
@@ -1654,8 +1654,8 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args,
1654
1655 strvec_push(&cmd.args, "http-fetch");
1656 strvec_pushf(&cmd.args, "--packfile=%.*s",
1657 - (int) the_hash_algo->hexsz,
1658 - packfile_uris.items[i].string);
1657 + (int) the_hash_algo->hexsz,
1658 + packfile_uris.items[i].string);
1659 strvec_push(&cmd.args, uri);
1660 cmd.git_cmd = 1;
1661 cmd.no_stdin = 1;
gpg-interface.c
+7 -7
@@ -285,9 +285,9 @@ static int verify_signed_buffer(const char *payload, size_t payload_size,
285 strvec_push(&gpg.args, fmt->program);
286 strvec_pushv(&gpg.args, fmt->verify_args);
287 strvec_pushl(&gpg.args,
288 - "--status-fd=1",
289 - "--verify", temp->filename.buf, "-",
290 - NULL);
288 + "--status-fd=1",
289 + "--verify", temp->filename.buf, "-",
290 + NULL);
291
292 if (!gpg_status)
293 gpg_status = &buf;
@@ -435,10 +435,10 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *sig
435 struct strbuf gpg_status = STRBUF_INIT;
436
437 strvec_pushl(&gpg.args,
438 - use_format->program,
439 - "--status-fd=2",
440 - "-bsau", signing_key,
441 - NULL);
438 + use_format->program,
439 + "--status-fd=2",
440 + "-bsau", signing_key,
441 + NULL);
442
443 bottom = signature->len;
444
http-backend.c
+1 -1
@@ -480,7 +480,7 @@ static void run_service(const char **argv, int buffer_input)
480 strvec_pushf(&cld.env_array, "GIT_COMMITTER_NAME=%s", user);
481 if (!getenv("GIT_COMMITTER_EMAIL"))
482 strvec_pushf(&cld.env_array,
483 - "GIT_COMMITTER_EMAIL=%s@http.%s", user, host);
483 + "GIT_COMMITTER_EMAIL=%s@http.%s", user, host);
484
485 cld.argv = argv;
486 if (buffer_input || gzipped_request || req_len >= 0)
http-push.c
+1 -1
@@ -1929,7 +1929,7 @@ int cmd_main(int argc, const char **argv)
1929 strvec_push(&commit_argv, oid_to_hex(&ref->new_oid));
1930 if (!push_all && !is_null_oid(&ref->old_oid))
1931 strvec_pushf(&commit_argv, "^%s",
1932 - oid_to_hex(&ref->old_oid));
1932 + oid_to_hex(&ref->old_oid));
1933 repo_init_revisions(the_repository, &revs, setup_git_directory());
1934 setup_revisions(commit_argv.argc, commit_argv.argv, &revs, NULL);
1935 revs.edge_hint = 0; /* just in case */
http.c
+1 -1
@@ -2276,7 +2276,7 @@ int finish_http_pack_request(struct http_pack_request *preq)
2276 ip.in = tmpfile_fd;
2277 if (preq->generate_keep) {
2278 strvec_pushf(&ip.args, "--keep=git %"PRIuMAX,
2279 - (uintmax_t)getpid());
2279 + (uintmax_t)getpid());
2280 ip.out = 0;
2281 } else {
2282 ip.no_stdout = 1;
range-diff.c
+14 -14
@@ -52,20 +52,20 @@ static int read_patches(const char *range, struct string_list *list,
52 size_t size;
53
54 strvec_pushl(&cp.args, "log", "--no-color", "-p", "--no-merges",
55 - "--reverse", "--date-order", "--decorate=no",
56 - "--no-prefix",
57 - /*
58 - * Choose indicators that are not used anywhere
59 - * else in diffs, but still look reasonable
60 - * (e.g. will not be confusing when debugging)
61 - */
62 - "--output-indicator-new=>",
63 - "--output-indicator-old=<",
64 - "--output-indicator-context=#",
65 - "--no-abbrev-commit",
66 - "--pretty=medium",
67 - "--notes",
68 - NULL);
55 + "--reverse", "--date-order", "--decorate=no",
56 + "--no-prefix",
57 + /*
58 + * Choose indicators that are not used anywhere
59 + * else in diffs, but still look reasonable
60 + * (e.g. will not be confusing when debugging)
61 + */
62 + "--output-indicator-new=>",
63 + "--output-indicator-old=<",
64 + "--output-indicator-context=#",
65 + "--no-abbrev-commit",
66 + "--pretty=medium",
67 + "--notes",
68 + NULL);
69 if (other_arg)
70 strvec_pushv(&cp.args, other_arg->argv);
71 strvec_push(&cp.args, range);
refspec.c
+2 -2
@@ -222,8 +222,8 @@ void refspec_ref_prefixes(const struct refspec *rs,
222 if (item->pattern) {
223 const char *glob = strchr(prefix, '*');
224 strvec_pushf(ref_prefixes, "%.*s",
225 - (int)(glob - prefix),
226 - prefix);
225 + (int)(glob - prefix),
226 + prefix);
227 } else {
228 expand_ref_prefix(ref_prefixes, prefix);
229 }
remote-curl.c
+4 -4
@@ -1145,7 +1145,7 @@ static int fetch_git(struct discovery *heads,
1145 struct strbuf rpc_result = STRBUF_INIT;
1146
1147 strvec_pushl(&args, "fetch-pack", "--stateless-rpc",
1148 - "--stdin", "--lock-pack", NULL);
1148 + "--stdin", "--lock-pack", NULL);
1149 if (options.followtags)
1150 strvec_push(&args, "--include-tag");
1151 if (options.thin)
@@ -1166,7 +1166,7 @@ static int fetch_git(struct discovery *heads,
1166 strvec_pushf(&args, "--shallow-since=%s", options.deepen_since);
1167 for (i = 0; i < options.deepen_not.nr; i++)
1168 strvec_pushf(&args, "--shallow-exclude=%s",
1169 - options.deepen_not.items[i].string);
1169 + options.deepen_not.items[i].string);
1170 if (options.deepen_relative && options.depth)
1171 strvec_push(&args, "--deepen-relative");
1172 if (options.from_promisor)
@@ -1293,7 +1293,7 @@ static int push_git(struct discovery *heads, int nr_spec, const char **specs)
1293
1294 strvec_init(&args);
1295 strvec_pushl(&args, "send-pack", "--stateless-rpc", "--helper-status",
1296 - NULL);
1296 + NULL);
1297
1298 if (options.thin)
1299 strvec_push(&args, "--thin");
@@ -1311,7 +1311,7 @@ static int push_git(struct discovery *heads, int nr_spec, const char **specs)
1311 strvec_push(&args, "--verbose");
1312 for (i = 0; i < options.push_options.nr; i++)
1313 strvec_pushf(&args, "--push-option=%s",
1314 - options.push_options.items[i].string);
1314 + options.push_options.items[i].string);
1315 strvec_push(&args, options.progress ? "--progress" : "--no-progress");
1316 for_each_string_list_item(cas_option, &cas_options)
1317 strvec_push(&args, cas_option->string);
remote.c
+2 -2
@@ -1914,8 +1914,8 @@ static int stat_branch_pair(const char *branch_name, const char *base,
1914 strvec_push(&argv, ""); /* ignored */
1915 strvec_push(&argv, "--left-right");
1916 strvec_pushf(&argv, "%s...%s",
1917 - oid_to_hex(&ours->object.oid),
1918 - oid_to_hex(&theirs->object.oid));
1917 + oid_to_hex(&ours->object.oid),
1918 + oid_to_hex(&theirs->object.oid));
1919 strvec_push(&argv, "--");
1920
1921 repo_init_revisions(the_repository, &revs, NULL);
sequencer.c
+4 -4
@@ -3133,7 +3133,7 @@ static int do_exec(struct repository *r, const char *command_line)
3133 child_argv[0] = command_line;
3134 strvec_pushf(&child_env, "GIT_DIR=%s", absolute_path(get_git_dir()));
3135 strvec_pushf(&child_env, "GIT_WORK_TREE=%s",
3136 - absolute_path(get_git_work_tree()));
3136 + absolute_path(get_git_work_tree()));
3137 status = run_command_v_opt_cd_env(child_argv, RUN_USING_SHELL, NULL,
3138 child_env.argv);
3139
@@ -3552,7 +3552,7 @@ static int do_merge(struct repository *r,
3552 strvec_push(&cmd.args, strategy);
3553 for (k = 0; k < opts->xopts_nr; k++)
3554 strvec_pushf(&cmd.args,
3555 - "-X%s", opts->xopts[k]);
3555 + "-X%s", opts->xopts[k]);
3556 }
3557 strvec_push(&cmd.args, "--no-edit");
3558 strvec_push(&cmd.args, "--no-ff");
@@ -3566,7 +3566,7 @@ static int do_merge(struct repository *r,
3566 /* Add the tips to be merged */
3567 for (j = to_merge; j; j = j->next)
3568 strvec_push(&cmd.args,
3569 - oid_to_hex(&j->item->object.oid));
3569 + oid_to_hex(&j->item->object.oid));
3570
3571 strbuf_release(&ref_name);
3572 unlink(git_path_cherry_pick_head(r));
@@ -3695,7 +3695,7 @@ void create_autostash(struct repository *r, const char *path,
3695 struct object_id oid;
3696
3697 strvec_pushl(&stash.args,
3698 - "stash", "create", "autostash", NULL);
3698 + "stash", "create", "autostash", NULL);
3699 stash.git_cmd = 1;
3700 stash.no_stdin = 1;
3701 strbuf_reset(&buf);
submodule.c
+15 -15
@@ -495,7 +495,7 @@ void prepare_submodule_repo_env(struct strvec *out)
495 {
496 prepare_submodule_repo_env_no_git_dir(out);
497 strvec_pushf(out, "%s=%s", GIT_DIR_ENVIRONMENT,
498 - DEFAULT_GIT_DIR_ENVIRONMENT);
498 + DEFAULT_GIT_DIR_ENVIRONMENT);
499 }
500
501 static void prepare_submodule_repo_env_in_gitdir(struct strvec *out)
@@ -687,14 +687,14 @@ void show_submodule_inline_diff(struct diff_options *o, const char *path,
687
688 if (o->flags.reverse_diff) {
689 strvec_pushf(&cp.args, "--src-prefix=%s%s/",
690 - o->b_prefix, path);
690 + o->b_prefix, path);
691 strvec_pushf(&cp.args, "--dst-prefix=%s%s/",
692 - o->a_prefix, path);
692 + o->a_prefix, path);
693 } else {
694 strvec_pushf(&cp.args, "--src-prefix=%s%s/",
695 - o->a_prefix, path);
695 + o->a_prefix, path);
696 strvec_pushf(&cp.args, "--dst-prefix=%s%s/",
697 - o->b_prefix, path);
697 + o->b_prefix, path);
698 }
699 strvec_push(&cp.args, oid_to_hex(old_oid));
700 /*
@@ -1062,7 +1062,7 @@ static int push_submodule(const char *path,
1062 const struct string_list_item *item;
1063 for_each_string_list_item(item, push_options)
1064 strvec_pushf(&cp.args, "--push-option=%s",
1065 - item->string);
1065 + item->string);
1066 }
1067
1068 if (remote->origin != REMOTE_UNCONFIGURED) {
@@ -1780,7 +1780,7 @@ int bad_to_remove_submodule(const char *path, unsigned flags)
1780 return 1;
1781
1782 strvec_pushl(&cp.args, "status", "--porcelain",
1783 - "--ignore-submodules=none", NULL);
1783 + "--ignore-submodules=none", NULL);
1784
1785 if (flags & SUBMODULE_REMOVAL_IGNORE_UNTRACKED)
1786 strvec_push(&cp.args, "-uno");
@@ -1847,7 +1847,7 @@ static int submodule_has_dirty_index(const struct submodule *sub)
1847
1848 cp.git_cmd = 1;
1849 strvec_pushl(&cp.args, "diff-index", "--quiet",
1850 - "--cached", "HEAD", NULL);
1850 + "--cached", "HEAD", NULL);
1851 cp.no_stdin = 1;
1852 cp.no_stdout = 1;
1853 cp.dir = sub->path;
@@ -1867,7 +1867,7 @@ static void submodule_reset_index(const char *path)
1867 cp.dir = path;
1868
1869 strvec_pushf(&cp.args, "--super-prefix=%s%s/",
1870 - get_super_prefix_or_empty(), path);
1870 + get_super_prefix_or_empty(), path);
1871 strvec_pushl(&cp.args, "read-tree", "-u", "--reset", NULL);
1872
1873 strvec_push(&cp.args, empty_tree_oid_hex());
@@ -1948,7 +1948,7 @@ int submodule_move_head(const char *path,
1948 cp.dir = path;
1949
1950 strvec_pushf(&cp.args, "--super-prefix=%s%s/",
1951 - get_super_prefix_or_empty(), path);
1951 + get_super_prefix_or_empty(), path);
1952 strvec_pushl(&cp.args, "read-tree", "--recurse-submodules", NULL);
1953
1954 if (flags & SUBMODULE_MOVE_HEAD_DRY_RUN)
@@ -1981,7 +1981,7 @@ int submodule_move_head(const char *path,
1981
1982 prepare_submodule_repo_env(&cp.env_array);
1983 strvec_pushl(&cp.args, "update-ref", "HEAD",
1984 - "--no-deref", new_head, NULL);
1984 + "--no-deref", new_head, NULL);
1985
1986 if (run_command(&cp)) {
1987 ret = -1;
@@ -2158,8 +2158,8 @@ void absorb_git_dir_into_superproject(const char *path,
2158 cp.git_cmd = 1;
2159 cp.no_stdin = 1;
2160 strvec_pushl(&cp.args, "--super-prefix", sb.buf,
2161 - "submodule--helper",
2162 - "absorb-git-dirs", NULL);
2161 + "submodule--helper",
2162 + "absorb-git-dirs", NULL);
2163 prepare_submodule_repo_env(&cp.env_array);
2164 if (run_command(&cp))
2165 die(_("could not recurse into submodule '%s'"), path);
@@ -2197,8 +2197,8 @@ int get_superproject_working_tree(struct strbuf *buf)
2197 strvec_pop(&cp.env_array);
2198
2199 strvec_pushl(&cp.args, "--literal-pathspecs", "-C", "..",
2200 - "ls-files", "-z", "--stage", "--full-name", "--",
2201 - subpath, NULL);
2200 + "ls-files", "-z", "--stage", "--full-name", "--",
2201 + subpath, NULL);
2202 strbuf_reset(&sb);
2203
2204 cp.no_stdin = 1;
t/helper/test-run-command.c
+3 -3
@@ -244,10 +244,10 @@ static int quote_stress_test(int argc, const char **argv)
244 strvec_clear(&args);
245 if (msys2)
246 strvec_pushl(&args, "sh", "-c",
247 - "printf %s\\\\0 \"$@\"", "skip", NULL);
247 + "printf %s\\\\0 \"$@\"", "skip", NULL);
248 else
249 strvec_pushl(&args, "test-tool", "run-command",
250 - "quote-echo", NULL);
250 + "quote-echo", NULL);
251 arg_offset = args.argc;
252
253 if (argc > 0) {
@@ -339,7 +339,7 @@ static int inherit_handle(const char *argv0)
339 tmp = xmkstemp(path);
340
341 strvec_pushl(&cp.args,
342 - "test-tool", argv0, "inherited-handle-child", NULL);
342 + "test-tool", argv0, "inherited-handle-child", NULL);
343 cp.in = -1;
344 cp.no_stdout = cp.no_stderr = 1;
345 if (start_command(&cp) < 0)
transport-helper.c
+1 -1
@@ -136,7 +136,7 @@ static struct child_process *get_helper(struct transport *transport)
136
137 if (have_git_dir())
138 strvec_pushf(&helper->env_array, "%s=%s",
139 - GIT_DIR_ENVIRONMENT, get_git_dir());
139 + GIT_DIR_ENVIRONMENT, get_git_dir());
140
141 helper->trace2_child_class = helper->args.argv[0]; /* "remote-<name>" */
142
upload-pack.c
+1 -2
@@ -301,8 +301,7 @@ static void create_pack_file(struct upload_pack_data *pack_data,
301 strvec_pushf(&pack_objects.args, "--filter=%s", buf.buf);
302 strbuf_release(&buf);
303 } else {
304 - strvec_pushf(&pack_objects.args, "--filter=%s",
305 - spec);
304 + strvec_pushf(&pack_objects.args, "--filter=%s", spec);
305 }
306 }
307 if (uri_protocols) {
wt-status.c
+1 -2
@@ -913,8 +913,7 @@ static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncom
913 struct strbuf summary = STRBUF_INIT;
914 char *summary_content;
915
916 - strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s",
917 - s->index_file);
916 + strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s", s->index_file);
917
918 strvec_push(&sm_summary.args, "submodule");
919 strvec_push(&sm_summary.args, "summary");