diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-12-15 09:39:47 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-12-15 09:39:47 -0800 |
| commit | 832ec72c3e15820c3b728b3a56398655d7bb7cb3 (patch) | |
| tree | e2139982bd0e26cf3434a3e4edbc3d03ec44ec10 /builtin/replace.c | |
| parent | 9c5bef3b358b12b9af5d54014f4efc62588f5df1 (diff) | |
| parent | c7c4bdeccf3e737e6e674cd9f0828922e629ab06 (diff) | |
Merge branch 'ab/run-command'
API clean-up.
* ab/run-command:
run-command API: remove "env" member, always use "env_array"
difftool: use "env_array" to simplify memory management
run-command API: remove "argv" member, always use "args"
run-command API users: use strvec_push(), not argv construction
run-command API users: use strvec_pushl(), not argv construction
run-command tests: use strvec_pushv(), not argv assignment
run-command API users: use strvec_pushv(), not argv assignment
upload-archive: use regular "struct child_process" pattern
worktree: stop being overly intimate with run_command() internals
Diffstat (limited to 'builtin/replace.c')
| -rw-r--r-- | builtin/replace.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/replace.c b/builtin/replace.c index 946938d011..6ff1734d58 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -258,11 +258,10 @@ static int import_object(struct object_id *oid, enum object_type type, return error_errno(_("unable to open %s for reading"), filename); if (!raw && type == OBJ_TREE) { - const char *argv[] = { "mktree", NULL }; struct child_process cmd = CHILD_PROCESS_INIT; struct strbuf result = STRBUF_INIT; - cmd.argv = argv; + strvec_push(&cmd.args, "mktree"); cmd.git_cmd = 1; cmd.in = fd; cmd.out = -1; |
