Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 23:26:31 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commitf6d8942b1fc6c968980c8ae03054d7b2114b4415 (patch)
treeded3f10f7d390a4dba264c70197b00bc327fae40 /builtin
parentc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (diff)
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/bisect--helper.c2
-rw-r--r--builtin/describe.c8
-rw-r--r--builtin/difftool.c12
-rw-r--r--builtin/fetch.c2
-rw-r--r--builtin/gc.c2
-rw-r--r--builtin/pull.c6
-rw-r--r--builtin/rebase.c14
-rw-r--r--builtin/receive-pack.c42
-rw-r--r--builtin/repack.c8
-rw-r--r--builtin/stash.c38
-rw-r--r--builtin/submodule--helper.c20
-rw-r--r--builtin/worktree.c18
12 files changed, 86 insertions, 86 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 9815e78871..dd52878413 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -529,7 +529,7 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
struct strvec argv = STRVEC_INIT;
strvec_pushl(&argv, "checkout", start_head.buf,
- "--", NULL);
+ "--", NULL);
if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
res = error(_("checking out '%s' failed."
" Try 'git bisect start "
diff --git a/builtin/describe.c b/builtin/describe.c
index ff3c169fa9..e3cac8002c 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -505,8 +505,8 @@ static void describe_blob(struct object_id oid, struct strbuf *dst)
struct process_commit_data pcd = { null_oid, oid, dst, &revs};
strvec_pushl(&args, "internal: The first arg is not parsed",
- "--objects", "--in-commit-order", "--reverse", "HEAD",
- NULL);
+ "--objects", "--in-commit-order", "--reverse", "HEAD",
+ NULL);
repo_init_revisions(the_repository, &revs, NULL);
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)
strvec_init(&args);
strvec_pushl(&args, "name-rev",
- "--peel-tag", "--name-only", "--no-undefined",
- NULL);
+ "--peel-tag", "--name-only", "--no-undefined",
+ NULL);
if (always)
strvec_push(&args, "--always");
if (!all) {
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 40c4d7b6b6..5ac021a1d4 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -211,9 +211,9 @@ static void changed_files(struct hashmap *result, const char *index_path,
env[0] = index_env.buf;
strvec_pushl(&update_index.args,
- "--git-dir", git_dir, "--work-tree", workdir,
- "update-index", "--really-refresh", "-q",
- "--unmerged", NULL);
+ "--git-dir", git_dir, "--work-tree", workdir,
+ "update-index", "--really-refresh", "-q",
+ "--unmerged", NULL);
update_index.no_stdin = 1;
update_index.no_stdout = 1;
update_index.no_stderr = 1;
@@ -226,8 +226,8 @@ static void changed_files(struct hashmap *result, const char *index_path,
run_command(&update_index);
strvec_pushl(&diff_files.args,
- "--git-dir", git_dir, "--work-tree", workdir,
- "diff-files", "--name-only", "-z", NULL);
+ "--git-dir", git_dir, "--work-tree", workdir,
+ "diff-files", "--name-only", "-z", NULL);
diff_files.no_stdin = 1;
diff_files.git_cmd = 1;
diff_files.use_shell = 0;
@@ -394,7 +394,7 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
child.dir = prefix;
child.out = -1;
strvec_pushl(&child.args, "diff", "--raw", "--no-abbrev", "-z",
- NULL);
+ NULL);
for (i = 0; i < argc; i++)
strvec_push(&child.args, argv[i]);
if (start_command(&child))
diff --git a/builtin/fetch.c b/builtin/fetch.c
index cc636188ad..c2e7afeb6a 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1601,7 +1601,7 @@ static int fetch_multiple(struct string_list *list, int max_children)
}
strvec_pushl(&argv, "fetch", "--append", "--no-auto-gc",
- "--no-write-commit-graph", NULL);
+ "--no-write-commit-graph", NULL);
add_options_to_argv(&argv);
if (max_children != 1 && list->nr != 1) {
diff --git a/builtin/gc.c b/builtin/gc.c
index 89742e159e..98719800a3 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -662,7 +662,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
strvec_push(&prune, "--no-progress");
if (has_promisor_remote())
strvec_push(&prune,
- "--exclude-promisor-objects");
+ "--exclude-promisor-objects");
if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
die(FAILED_RUN, prune.argv[0]);
}
diff --git a/builtin/pull.c b/builtin/pull.c
index 8a8d30e1dc..dae8766646 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -638,7 +638,7 @@ static int rebase_submodules(void)
cp.git_cmd = 1;
cp.no_stdin = 1;
strvec_pushl(&cp.args, "submodule", "update",
- "--recursive", "--rebase", NULL);
+ "--recursive", "--rebase", NULL);
argv_push_verbosity(&cp.args);
return run_command(&cp);
@@ -651,7 +651,7 @@ static int update_submodules(void)
cp.git_cmd = 1;
cp.no_stdin = 1;
strvec_pushl(&cp.args, "submodule", "update",
- "--recursive", "--checkout", NULL);
+ "--recursive", "--checkout", NULL);
argv_push_verbosity(&cp.args);
return run_command(&cp);
@@ -802,7 +802,7 @@ static int get_rebase_fork_point(struct object_id *fork_point, const char *repo,
return -1;
strvec_pushl(&cp.args, "merge-base", "--fork-point",
- remote_branch, curr_branch->name, NULL);
+ remote_branch, curr_branch->name, NULL);
cp.no_stdin = 1;
cp.no_stderr = 1;
cp.git_cmd = 1;
diff --git a/builtin/rebase.c b/builtin/rebase.c
index fb56b9e263..35aeb8effc 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -348,7 +348,7 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
strvec_pushl(&make_script_args, "", revisions, NULL);
if (opts->restrict_revision)
strvec_pushf(&make_script_args, "^%s",
- oid_to_hex(&opts->restrict_revision->object.oid));
+ oid_to_hex(&opts->restrict_revision->object.oid));
ret = sequencer_make_script(the_repository, &todo_list.buf,
make_script_args.argc, make_script_args.argv,
@@ -858,17 +858,17 @@ static int run_am(struct rebase_options *opts)
format_patch.git_cmd = 1;
strvec_pushl(&format_patch.args, "format-patch", "-k", "--stdout",
- "--full-index", "--cherry-pick", "--right-only",
- "--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
- "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
- "--no-base", NULL);
+ "--full-index", "--cherry-pick", "--right-only",
+ "--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
+ "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
+ "--no-base", NULL);
if (opts->git_format_patch_opt.len)
strvec_split(&format_patch.args,
- opts->git_format_patch_opt.buf);
+ opts->git_format_patch_opt.buf);
strvec_push(&format_patch.args, revisions.buf);
if (opts->restrict_revision)
strvec_pushf(&format_patch.args, "^%s",
- oid_to_hex(&opts->restrict_revision->object.oid));
+ oid_to_hex(&opts->restrict_revision->object.oid));
status = run_command(&format_patch);
if (status) {
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 71274231aa..1fc69cf5bc 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -668,24 +668,24 @@ static void prepare_push_cert_sha1(struct child_process *proc)
}
if (!is_null_oid(&push_cert_oid)) {
strvec_pushf(&proc->env_array, "GIT_PUSH_CERT=%s",
- oid_to_hex(&push_cert_oid));
+ oid_to_hex(&push_cert_oid));
strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_SIGNER=%s",
- sigcheck.signer ? sigcheck.signer : "");
+ sigcheck.signer ? sigcheck.signer : "");
strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_KEY=%s",
- sigcheck.key ? sigcheck.key : "");
+ sigcheck.key ? sigcheck.key : "");
strvec_pushf(&proc->env_array, "GIT_PUSH_CERT_STATUS=%c",
- sigcheck.result);
+ sigcheck.result);
if (push_cert_nonce) {
strvec_pushf(&proc->env_array,
- "GIT_PUSH_CERT_NONCE=%s",
- push_cert_nonce);
+ "GIT_PUSH_CERT_NONCE=%s",
+ push_cert_nonce);
strvec_pushf(&proc->env_array,
- "GIT_PUSH_CERT_NONCE_STATUS=%s",
- nonce_status);
+ "GIT_PUSH_CERT_NONCE_STATUS=%s",
+ nonce_status);
if (nonce_status == NONCE_SLOP)
strvec_pushf(&proc->env_array,
- "GIT_PUSH_CERT_NONCE_SLOP=%ld",
- nonce_stamp_slop);
+ "GIT_PUSH_CERT_NONCE_SLOP=%ld",
+ nonce_stamp_slop);
}
}
}
@@ -721,10 +721,10 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
int i;
for (i = 0; i < feed_state->push_options->nr; i++)
strvec_pushf(&proc.env_array,
- "GIT_PUSH_OPTION_%d=%s", i,
- feed_state->push_options->items[i].string);
+ "GIT_PUSH_OPTION_%d=%s", i,
+ feed_state->push_options->items[i].string);
strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT=%d",
- feed_state->push_options->nr);
+ feed_state->push_options->nr);
} else
strvec_pushf(&proc.env_array, "GIT_PUSH_OPTION_COUNT");
@@ -1718,7 +1718,7 @@ static const char *pack_lockfile;
static void push_header_arg(struct strvec *args, struct pack_header *hdr)
{
strvec_pushf(args, "--pack_header=%"PRIu32",%"PRIu32,
- ntohl(hdr->hdr_version), ntohl(hdr->hdr_entries));
+ ntohl(hdr->hdr_version), ntohl(hdr->hdr_entries));
}
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)
strvec_push(&child.args, "-q");
if (fsck_objects)
strvec_pushf(&child.args, "--strict%s",
- fsck_msg_types.buf);
+ fsck_msg_types.buf);
if (max_input_size)
strvec_pushf(&child.args, "--max-input-size=%"PRIuMAX,
- (uintmax_t)max_input_size);
+ (uintmax_t)max_input_size);
child.no_stdout = 1;
child.err = err_fd;
child.git_cmd = 1;
@@ -1787,9 +1787,9 @@ static const char *unpack(int err_fd, struct shallow_info *si)
if (xgethostname(hostname, sizeof(hostname)))
xsnprintf(hostname, sizeof(hostname), "localhost");
strvec_pushf(&child.args,
- "--keep=receive-pack %"PRIuMAX" on %s",
- (uintmax_t)getpid(),
- hostname);
+ "--keep=receive-pack %"PRIuMAX" on %s",
+ (uintmax_t)getpid(),
+ hostname);
if (!quiet && err_fd)
strvec_push(&child.args, "--show-resolving-progress");
@@ -1797,12 +1797,12 @@ static const char *unpack(int err_fd, struct shallow_info *si)
strvec_push(&child.args, "--report-end-of-input");
if (fsck_objects)
strvec_pushf(&child.args, "--strict%s",
- fsck_msg_types.buf);
+ fsck_msg_types.buf);
if (!reject_thin)
strvec_push(&child.args, "--fix-thin");
if (max_input_size)
strvec_pushf(&child.args, "--max-input-size=%"PRIuMAX,
- (uintmax_t)max_input_size);
+ (uintmax_t)max_input_size);
child.out = -1;
child.err = err_fd;
child.git_cmd = 1;
diff --git a/builtin/repack.c b/builtin/repack.c
index 7435ee9af1..04c5ceaf7e 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -366,7 +366,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
strvec_push(&cmd.args, "--honor-pack-keep");
for (i = 0; i < keep_pack_list.nr; i++)
strvec_pushf(&cmd.args, "--keep-pack=%s",
- keep_pack_list.items[i].string);
+ keep_pack_list.items[i].string);
strvec_push(&cmd.args, "--non-empty");
strvec_push(&cmd.args, "--all");
strvec_push(&cmd.args, "--reflog");
@@ -388,12 +388,12 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
if (existing_packs.nr && delete_redundant) {
if (unpack_unreachable) {
strvec_pushf(&cmd.args,
- "--unpack-unreachable=%s",
- unpack_unreachable);
+ "--unpack-unreachable=%s",
+ unpack_unreachable);
strvec_push(&cmd.env_array, "GIT_REF_PARANOIA=1");
} else if (pack_everything & LOOSEN_UNREACHABLE) {
strvec_push(&cmd.args,
- "--unpack-unreachable");
+ "--unpack-unreachable");
} else if (keep_unreachable) {
strvec_push(&cmd.args, "--keep-unreachable");
strvec_push(&cmd.args, "--pack-loose-unreachable");
diff --git a/builtin/stash.c b/builtin/stash.c
index 05c086e54c..bfdbafae89 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -336,7 +336,7 @@ static int get_newly_staged(struct strbuf *out, struct object_id *c_tree)
*/
cp.git_cmd = 1;
strvec_pushl(&cp.args, "diff-index", "--cached", "--name-only",
- "--diff-filter=A", NULL);
+ "--diff-filter=A", NULL);
strvec_push(&cp.args, c_tree_hex);
return pipe_command(&cp, NULL, 0, out, 0, NULL, 0);
}
@@ -368,7 +368,7 @@ static int restore_untracked(struct object_id *u_tree)
strvec_push(&cp.args, "read-tree");
strvec_push(&cp.args, oid_to_hex(u_tree));
strvec_pushf(&cp.env_array, "GIT_INDEX_FILE=%s",
- stash_index_path.buf);
+ stash_index_path.buf);
if (run_command(&cp)) {
remove_path(stash_index_path.buf);
return -1;
@@ -378,7 +378,7 @@ static int restore_untracked(struct object_id *u_tree)
cp.git_cmd = 1;
strvec_pushl(&cp.args, "checkout-index", "--all", NULL);
strvec_pushf(&cp.env_array, "GIT_INDEX_FILE=%s",
- stash_index_path.buf);
+ stash_index_path.buf);
res = run_command(&cp);
remove_path(stash_index_path.buf);
@@ -500,9 +500,9 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
cp.git_cmd = 1;
cp.dir = prefix;
strvec_pushf(&cp.env_array, GIT_WORK_TREE_ENVIRONMENT"=%s",
- absolute_path(get_git_work_tree()));
+ absolute_path(get_git_work_tree()));
strvec_pushf(&cp.env_array, GIT_DIR_ENVIRONMENT"=%s",
- absolute_path(get_git_dir()));
+ absolute_path(get_git_dir()));
strvec_push(&cp.args, "status");
run_command(&cp);
}
@@ -547,7 +547,7 @@ static int do_drop_stash(struct stash_info *info, int quiet)
cp_reflog.git_cmd = 1;
strvec_pushl(&cp_reflog.args, "reflog", "delete", "--updateref",
- "--rewrite", NULL);
+ "--rewrite", NULL);
strvec_push(&cp_reflog.args, info->revision.buf);
ret = run_command(&cp_reflog);
if (!ret) {
@@ -693,7 +693,7 @@ static int list_stash(int argc, const char **argv, const char *prefix)
cp.git_cmd = 1;
strvec_pushl(&cp.args, "log", "--format=%gd: %gs", "-g",
- "--first-parent", "-m", NULL);
+ "--first-parent", "-m", NULL);
strvec_pushv(&cp.args, argv);
strvec_push(&cp.args, ref_stash);
strvec_push(&cp.args, "--");
@@ -961,7 +961,7 @@ static int save_untracked_files(struct stash_info *info, struct strbuf *msg,
cp_upd_index.git_cmd = 1;
strvec_pushl(&cp_upd_index.args, "update-index", "-z", "--add",
- "--remove", "--stdin", NULL);
+ "--remove", "--stdin", NULL);
strvec_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
stash_index_path.buf);
@@ -1005,7 +1005,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
cp_read_tree.git_cmd = 1;
strvec_pushl(&cp_read_tree.args, "read-tree", "HEAD", NULL);
strvec_pushf(&cp_read_tree.env_array, "GIT_INDEX_FILE=%s",
- stash_index_path.buf);
+ stash_index_path.buf);
if (run_command(&cp_read_tree)) {
ret = -1;
goto done;
@@ -1035,7 +1035,7 @@ static int stash_patch(struct stash_info *info, const struct pathspec *ps,
cp_diff_tree.git_cmd = 1;
strvec_pushl(&cp_diff_tree.args, "diff-tree", "-p", "-U1", "HEAD",
- oid_to_hex(&info->w_tree), "--", NULL);
+ oid_to_hex(&info->w_tree), "--", NULL);
if (pipe_command(&cp_diff_tree, NULL, 0, out_patch, 0, NULL, 0)) {
ret = -1;
goto done;
@@ -1089,10 +1089,10 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
cp_upd_index.git_cmd = 1;
strvec_pushl(&cp_upd_index.args, "update-index",
- "--ignore-skip-worktree-entries",
- "-z", "--add", "--remove", "--stdin", NULL);
+ "--ignore-skip-worktree-entries",
+ "-z", "--add", "--remove", "--stdin", NULL);
strvec_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
- stash_index_path.buf);
+ stash_index_path.buf);
if (pipe_command(&cp_upd_index, diff_output.buf, diff_output.len,
NULL, 0, NULL, 0)) {
@@ -1343,7 +1343,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
cp.git_cmd = 1;
strvec_pushl(&cp.args, "clean", "--force",
- "--quiet", "-d", NULL);
+ "--quiet", "-d", NULL);
if (include_untracked == INCLUDE_ALL_FILES)
strvec_push(&cp.args, "-x");
if (run_command(&cp)) {
@@ -1373,8 +1373,8 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
cp_diff.git_cmd = 1;
strvec_pushl(&cp_diff.args, "diff-index", "-p",
- "--cached", "--binary", "HEAD", "--",
- NULL);
+ "--cached", "--binary", "HEAD", "--",
+ NULL);
add_pathspecs(&cp_diff.args, ps);
if (pipe_command(&cp_diff, NULL, 0, &out, 0, NULL, 0)) {
ret = -1;
@@ -1383,7 +1383,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
cp_apply.git_cmd = 1;
strvec_pushl(&cp_apply.args, "apply", "--index",
- "-R", NULL);
+ "-R", NULL);
if (pipe_command(&cp_apply, out.buf, out.len, NULL, 0,
NULL, 0)) {
ret = -1;
@@ -1393,7 +1393,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
struct child_process cp = CHILD_PROCESS_INIT;
cp.git_cmd = 1;
strvec_pushl(&cp.args, "reset", "--hard", "-q",
- "--no-recurse-submodules", NULL);
+ "--no-recurse-submodules", NULL);
if (run_command(&cp)) {
ret = -1;
goto done;
@@ -1405,7 +1405,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
cp.git_cmd = 1;
strvec_pushl(&cp.args, "checkout", "--no-overlay",
- oid_to_hex(&info.i_tree), "--", NULL);
+ oid_to_hex(&info.i_tree), "--", NULL);
if (!ps->nr)
strvec_push(&cp.args, ":/");
else
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 7705e8eabf..665db1ffed 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -499,7 +499,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
strvec_pushf(&cp.env_array, "sm_path=%s", path);
strvec_pushf(&cp.env_array, "displaypath=%s", displaypath);
strvec_pushf(&cp.env_array, "sha1=%s",
- oid_to_hex(ce_oid));
+ oid_to_hex(ce_oid));
strvec_pushf(&cp.env_array, "toplevel=%s", toplevel);
/*
@@ -513,7 +513,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
*/
sq_quote_buf(&sb, path);
strvec_pushf(&cp.args, "path=%s; %s",
- sb.buf, info->argv[0]);
+ sb.buf, info->argv[0]);
strbuf_release(&sb);
free(toplevel);
} else {
@@ -537,7 +537,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
strvec_pushl(&cpr.args, "--super-prefix", NULL);
strvec_pushf(&cpr.args, "%s/", displaypath);
strvec_pushl(&cpr.args, "submodule--helper", "foreach", "--recursive",
- NULL);
+ NULL);
if (info->quiet)
strvec_push(&cpr.args, "--quiet");
@@ -810,8 +810,8 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
strbuf_release(&buf);
strvec_pushl(&diff_files_args, "diff-files",
- "--ignore-submodules=dirty", "--quiet", "--",
- path, NULL);
+ "--ignore-submodules=dirty", "--quiet", "--",
+ path, NULL);
git_config(git_diff_basic_config, NULL);
@@ -852,7 +852,7 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
strvec_push(&cpr.args, "--super-prefix");
strvec_pushf(&cpr.args, "%s/", displaypath);
strvec_pushl(&cpr.args, "submodule--helper", "status",
- "--recursive", NULL);
+ "--recursive", NULL);
if (flags & OPT_CACHED)
strvec_push(&cpr.args, "--cached");
@@ -996,7 +996,7 @@ static void sync_submodule(const char *path, const char *prefix,
cp.git_cmd = 1;
cp.dir = path;
strvec_pushl(&cp.args, "submodule--helper",
- "print-default-remote", NULL);
+ "print-default-remote", NULL);
strbuf_reset(&sb);
if (capture_command(&cp, &sb, 0))
@@ -1024,7 +1024,7 @@ static void sync_submodule(const char *path, const char *prefix,
strvec_push(&cpr.args, "--super-prefix");
strvec_pushf(&cpr.args, "%s/", displaypath);
strvec_pushl(&cpr.args, "submodule--helper", "sync",
- "--recursive", NULL);
+ "--recursive", NULL);
if (flags & OPT_QUIET)
strvec_push(&cpr.args, "--quiet");
@@ -1128,7 +1128,7 @@ static void deinit_submodule(const char *path, const char *prefix,
struct child_process cp_rm = CHILD_PROCESS_INIT;
cp_rm.git_cmd = 1;
strvec_pushl(&cp_rm.args, "rm", "-qn",
- path, NULL);
+ path, NULL);
if (run_command(&cp_rm))
die(_("Submodule work tree '%s' contains local "
@@ -1251,7 +1251,7 @@ static int clone_submodule(const char *path, const char *gitdir, const char *url
struct string_list_item *item;
for_each_string_list_item(item, reference)
strvec_pushl(&cp.args, "--reference",
- item->string, NULL);
+ item->string, NULL);
}
if (dissociate)
strvec_push(&cp.args, "--dissociate");
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 3c483c23d4..be5d84f0a0 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -414,10 +414,10 @@ static int add_worktree(const char *path, const char *refname,
if (!is_branch)
strvec_pushl(&cp.args, "update-ref", "HEAD",
- oid_to_hex(&commit->object.oid), NULL);
+ oid_to_hex(&commit->object.oid), NULL);
else {
strvec_pushl(&cp.args, "symbolic-ref", "HEAD",
- symref.buf, NULL);
+ symref.buf, NULL);
if (opts->quiet)
strvec_push(&cp.args, "--quiet");
}
@@ -466,9 +466,9 @@ done:
cp.argv = NULL;
cp.trace2_hook_name = "post-checkout";
strvec_pushl(&cp.args, absolute_path(hook),
- oid_to_hex(&null_oid),
- oid_to_hex(&commit->object.oid),
- "1", NULL);
+ oid_to_hex(&null_oid),
+ oid_to_hex(&commit->object.oid),
+ "1", NULL);
ret = run_command(&cp);
}
}
@@ -936,13 +936,13 @@ static void check_clean_worktree(struct worktree *wt,
validate_no_submodules(wt);
strvec_pushf(&child_env, "%s=%s/.git",
- GIT_DIR_ENVIRONMENT, wt->path);
+ GIT_DIR_ENVIRONMENT, wt->path);
strvec_pushf(&child_env, "%s=%s",
- GIT_WORK_TREE_ENVIRONMENT, wt->path);
+ GIT_WORK_TREE_ENVIRONMENT, wt->path);
memset(&cp, 0, sizeof(cp));
strvec_pushl(&cp.args, "status",
- "--porcelain", "--ignore-submodules=none",
- NULL);
+ "--porcelain", "--ignore-submodules=none",
+ NULL);
cp.env = child_env.argv;
cp.git_cmd = 1;
cp.dir = wt->path;