strvec: convert remaining callers away from argv_array name
We eventually want to drop the argv_array name and just use strvec
consistently. There's no particular reason we have to do it all at once,
or care about interactions between converted and unconverted bits.
Because of our preprocessor compat layer, the names are interchangeable
to the compiler (so even a definition and declaration using different
names is OK).
This patch converts all of the remaining files, as the resulting diff is
reasonably sized.
The conversion was done purely mechanically with:
git ls-files '*.c' '*.h' |
xargs perl -i -pe '
s/ARGV_ARRAY/STRVEC/g;
s/argv_array/strvec/g;
'
We'll deal with any indentation/style fallouts separately.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committedJul 28, 2020 at 16:25 UTCc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f
33 files changed+385-385
merge.c
+8-8
index aa36de2f64..a05b054faa 100644--- a/merge.c+++ b/merge.c@@ -19,22 +19,22 @@ int try_merge_command(struct repository *r, const char **xopts, struct commit_list *common, const char *head_arg, struct commit_list *remotes) {- struct argv_array args = ARGV_ARRAY_INIT;+ struct strvec args = STRVEC_INIT; int i, ret; struct commit_list *j;- argv_array_pushf(&args, "merge-%s", strategy);+ strvec_pushf(&args, "merge-%s", strategy); for (i = 0; i < xopts_nr; i++)- argv_array_pushf(&args, "--%s", xopts[i]);+ strvec_pushf(&args, "--%s", xopts[i]); for (j = common; j; j = j->next)- argv_array_push(&args, merge_argument(j->item));- argv_array_push(&args, "--");- argv_array_push(&args, head_arg);+ strvec_push(&args, merge_argument(j->item));+ strvec_push(&args, "--");+ strvec_push(&args, head_arg); for (j = remotes; j; j = j->next)- argv_array_push(&args, merge_argument(j->item));+ strvec_push(&args, merge_argument(j->item)); ret = run_command_v_opt(args.argv, RUN_GIT_CMD);- argv_array_clear(&args);+ strvec_clear(&args); discard_index(r->index); if (repo_read_index(r) < 0)
index 7cba96454c..d9d3b0819f 100644--- a/parse-options-cb.c+++ b/parse-options-cb.c@@ -275,19 +275,19 @@ int parse_opt_passthru(const struct option *opt, const char *arg, int unset) /** * For an option opt, recreate the command-line option, appending it to- * opt->value which must be a argv_array. This is useful when we need to pass+ * opt->value which must be a strvec. This is useful when we need to pass * the command-line option, which can be specified multiple times, to another * command. */ int parse_opt_passthru_argv(const struct option *opt, const char *arg, int unset) { static struct strbuf sb = STRBUF_INIT;- struct argv_array *opt_value = opt->value;+ struct strvec *opt_value = opt->value; if (recreate_opt(&sb, opt, arg, unset) < 0) return -1;- argv_array_push(opt_value, sb.buf);+ strvec_push(opt_value, sb.buf); return 0; }
index 8f57661d96..b9630a1b5f 100644--- a/run-command.c+++ b/run-command.c@@ -11,14 +11,14 @@ void child_process_init(struct child_process *child) { memset(child, 0, sizeof(*child));- argv_array_init(&child->args);- argv_array_init(&child->env_array);+ strvec_init(&child->args);+ strvec_init(&child->env_array); } void child_process_clear(struct child_process *child) {- argv_array_clear(&child->args);- argv_array_clear(&child->env_array);+ strvec_clear(&child->args);+ strvec_clear(&child->env_array); } struct child_to_clean {@@ -263,30 +263,30 @@ int sane_execvp(const char *file, char * const argv[]) return -1; }-static const char **prepare_shell_cmd(struct argv_array *out, const char **argv)+static const char **prepare_shell_cmd(struct strvec *out, const char **argv) { if (!argv[0]) BUG("shell command is empty"); if (strcspn(argv[0], "|&;<>()$`\\\"' \t\n*?[#~=%") != strlen(argv[0])) { #ifndef GIT_WINDOWS_NATIVE- argv_array_push(out, SHELL_PATH);+ strvec_push(out, SHELL_PATH); #else- argv_array_push(out, "sh");+ strvec_push(out, "sh"); #endif- argv_array_push(out, "-c");+ strvec_push(out, "-c"); /* * If we have no extra arguments, we do not even need to * bother with the "$@" magic. */ if (!argv[1])- argv_array_push(out, argv[0]);+ strvec_push(out, argv[0]); else- argv_array_pushf(out, "%s \"$@\"", argv[0]);+ strvec_pushf(out, "%s \"$@\"", argv[0]); }- argv_array_pushv(out, argv);+ strvec_pushv(out, argv); return out->argv; }@@ -401,7 +401,7 @@ static void child_err_spew(struct child_process *cmd, struct child_err *cerr) set_error_routine(old_errfn); }-static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)+static int prepare_cmd(struct strvec *out, const struct child_process *cmd) { if (!cmd->argv[0]) BUG("command is empty");@@ -410,14 +410,14 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd) * Add SHELL_PATH so in the event exec fails with ENOEXEC we can * attempt to interpret the command with 'sh'. */- argv_array_push(out, SHELL_PATH);+ strvec_push(out, SHELL_PATH); if (cmd->git_cmd) { prepare_git_cmd(out, cmd->argv); } else if (cmd->use_shell) { prepare_shell_cmd(out, cmd->argv); } else {- argv_array_pushv(out, cmd->argv);+ strvec_pushv(out, cmd->argv); } /*@@ -432,7 +432,7 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd) free((char *)out->argv[1]); out->argv[1] = program; } else {- argv_array_clear(out);+ strvec_clear(out); errno = ENOENT; return -1; }@@ -742,7 +742,7 @@ fail_pipe: int notify_pipe[2]; int null_fd = -1; char **childenv;- struct argv_array argv = ARGV_ARRAY_INIT;+ struct strvec argv = STRVEC_INIT; struct child_err cerr; struct atfork_state as;@@ -888,7 +888,7 @@ fail_pipe: if (null_fd >= 0) close(null_fd);- argv_array_clear(&argv);+ strvec_clear(&argv); free(childenv); } end_of_spawn:@@ -897,7 +897,7 @@ end_of_spawn: { int fhin = 0, fhout = 1, fherr = 2; const char **sargv = cmd->argv;- struct argv_array nargv = ARGV_ARRAY_INIT;+ struct strvec nargv = STRVEC_INIT; if (cmd->no_stdin) fhin = open("/dev/null", O_RDWR);@@ -935,7 +935,7 @@ end_of_spawn: if (cmd->clean_on_exit && cmd->pid >= 0) mark_child_for_cleanup(cmd->pid, cmd);- argv_array_clear(&nargv);+ strvec_clear(&nargv); cmd->argv = sargv; if (fhin != 0) close(fhin);@@ -1352,9 +1352,9 @@ int run_hook_ve(const char *const *env, const char *name, va_list args) if (!p) return 0;- argv_array_push(&hook.args, p);+ strvec_push(&hook.args, p); while ((p = va_arg(args, const char *)))- argv_array_push(&hook.args, p);+ strvec_push(&hook.args, p); hook.env = env; hook.no_stdin = 1; hook.stdout_to_stderr = 1;@@ -1868,13 +1868,13 @@ int run_processes_parallel_tr2(int n, get_next_task_fn get_next_task, int run_auto_gc(int quiet) {- struct argv_array argv_gc_auto = ARGV_ARRAY_INIT;+ struct strvec argv_gc_auto = STRVEC_INIT; int status;- argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL);+ strvec_pushl(&argv_gc_auto, "gc", "--auto", NULL); if (quiet)- argv_array_push(&argv_gc_auto, "--quiet");+ strvec_push(&argv_gc_auto, "--quiet"); status = run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD);- argv_array_clear(&argv_gc_auto);+ strvec_clear(&argv_gc_auto); return status; }
run-command.h
+5-5
index f5e05d38d2..8b9bfaef16 100644--- a/run-command.h+++ b/run-command.h@@ -52,15 +52,15 @@ struct child_process { * Note that the ownership of the memory pointed to by .argv stays with the * caller, but it should survive until `finish_command` completes. If the * .argv member is NULL, `start_command` will point it at the .args- * `argv_array` (so you may use one or the other, but you must use exactly+ * `strvec` (so you may use one or the other, but you must use exactly * one). The memory in .args will be cleaned up automatically during * `finish_command` (or during `start_command` when it is unsuccessful). * */ const char **argv;- struct argv_array args;- struct argv_array env_array;+ struct strvec args;+ struct strvec env_array; pid_t pid; int trace2_child_id;@@ -107,7 +107,7 @@ struct child_process { * variable that will be removed from the child process's environment. * * If the .env member is NULL, `start_command` will point it at the- * .env_array `argv_array` (so you may use one or the other, but not both).+ * .env_array `strvec` (so you may use one or the other, but not both). * The memory in .env_array will be cleaned up automatically during * `finish_command` (or during `start_command` when it is unsuccessful). */@@ -134,7 +134,7 @@ struct child_process { void *clean_on_exit_handler_cbdata; };-#define CHILD_PROCESS_INIT { NULL, ARGV_ARRAY_INIT, ARGV_ARRAY_INIT }+#define CHILD_PROCESS_INIT { NULL, STRVEC_INIT, STRVEC_INIT } /** * The functions: child_process_init, start_command, finish_command,
send-pack.c
+9-9
index d671ab5d05..632f1580ca 100644--- a/send-pack.c+++ b/send-pack.c@@ -68,20 +68,20 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *extra, struc int i; int rc;- argv_array_push(&po.args, "pack-objects");- argv_array_push(&po.args, "--all-progress-implied");- argv_array_push(&po.args, "--revs");- argv_array_push(&po.args, "--stdout");+ strvec_push(&po.args, "pack-objects");+ strvec_push(&po.args, "--all-progress-implied");+ strvec_push(&po.args, "--revs");+ strvec_push(&po.args, "--stdout"); if (args->use_thin_pack)- argv_array_push(&po.args, "--thin");+ strvec_push(&po.args, "--thin"); if (args->use_ofs_delta)- argv_array_push(&po.args, "--delta-base-offset");+ strvec_push(&po.args, "--delta-base-offset"); if (args->quiet || !args->progress)- argv_array_push(&po.args, "-q");+ strvec_push(&po.args, "-q"); if (args->progress)- argv_array_push(&po.args, "--progress");+ strvec_push(&po.args, "--progress"); if (is_repository_shallow(the_repository))- argv_array_push(&po.args, "--shallow");+ strvec_push(&po.args, "--shallow"); po.in = -1; po.out = args->stateless_rpc ? -1 : fd; po.git_cmd = 1;
index 441763fd7c..dcd4adf444 100644--- a/transport-helper.c+++ b/transport-helper.c@@ -128,14 +128,14 @@ static struct child_process *get_helper(struct transport *transport) helper->in = -1; helper->out = -1; helper->err = 0;- argv_array_pushf(&helper->args, "git-remote-%s", data->name);- argv_array_push(&helper->args, transport->remote->name);- argv_array_push(&helper->args, remove_ext_force(transport->url));+ strvec_pushf(&helper->args, "git-remote-%s", data->name);+ strvec_push(&helper->args, transport->remote->name);+ strvec_push(&helper->args, remove_ext_force(transport->url)); helper->git_cmd = 0; helper->silent_exec_failure = 1; if (have_git_dir())- argv_array_pushf(&helper->env_array, "%s=%s",+ strvec_pushf(&helper->env_array, "%s=%s", GIT_DIR_ENVIRONMENT, get_git_dir()); helper->trace2_child_class = helper->args.argv[0]; /* "remote-<name>" */@@ -439,13 +439,13 @@ static int get_importer(struct transport *transport, struct child_process *fasti int cat_blob_fd, code; child_process_init(fastimport); fastimport->in = xdup(helper->out);- argv_array_push(&fastimport->args, "fast-import");- argv_array_push(&fastimport->args, "--allow-unsafe-features");- argv_array_push(&fastimport->args, debug ? "--stats" : "--quiet");+ strvec_push(&fastimport->args, "fast-import");+ strvec_push(&fastimport->args, "--allow-unsafe-features");+ strvec_push(&fastimport->args, debug ? "--stats" : "--quiet"); if (data->bidi_import) { cat_blob_fd = xdup(helper->in);- argv_array_pushf(&fastimport->args, "--cat-blob-fd=%d", cat_blob_fd);+ strvec_pushf(&fastimport->args, "--cat-blob-fd=%d", cat_blob_fd); } fastimport->git_cmd = 1;@@ -466,17 +466,17 @@ static int get_exporter(struct transport *transport, /* we need to duplicate helper->in because we want to use it after * fastexport is done with it. */ fastexport->out = dup(helper->in);- argv_array_push(&fastexport->args, "fast-export");- argv_array_push(&fastexport->args, "--use-done-feature");- argv_array_push(&fastexport->args, data->signed_tags ?+ strvec_push(&fastexport->args, "fast-export");+ strvec_push(&fastexport->args, "--use-done-feature");+ strvec_push(&fastexport->args, data->signed_tags ? "--signed-tags=verbatim" : "--signed-tags=warn-strip"); if (data->export_marks)- argv_array_pushf(&fastexport->args, "--export-marks=%s.tmp", data->export_marks);+ strvec_pushf(&fastexport->args, "--export-marks=%s.tmp", data->export_marks); if (data->import_marks)- argv_array_pushf(&fastexport->args, "--import-marks=%s", data->import_marks);+ strvec_pushf(&fastexport->args, "--import-marks=%s", data->import_marks); for (i = 0; i < revlist_args->nr; i++)- argv_array_push(&fastexport->args, revlist_args->items[i].string);+ strvec_push(&fastexport->args, revlist_args->items[i].string); fastexport->git_cmd = 1; return start_command(fastexport);@@ -1082,7 +1082,7 @@ static int has_attribute(const char *attrs, const char *attr) } static struct ref *get_refs_list(struct transport *transport, int for_push,- const struct argv_array *ref_prefixes)+ const struct strvec *ref_prefixes) { get_helper(transport);
transport-internal.h
+1-1
index 284784a2a6..27c9daffc4 100644--- a/transport-internal.h+++ b/transport-internal.h@@ -30,7 +30,7 @@ struct transport_vtable { * in the ref's old_sha1 field; otherwise it should be all 0. **/ struct ref *(*get_refs_list)(struct transport *transport, int for_push,- const struct argv_array *ref_prefixes);+ const struct strvec *ref_prefixes); /** * Fetch the objects for the given refs. Note that this gets
transport.c
+6-6
index b41386eccb..2d4fd851dc 100644--- a/transport.c+++ b/transport.c@@ -127,7 +127,7 @@ struct bundle_transport_data { static struct ref *get_refs_from_bundle(struct transport *transport, int for_push,- const struct argv_array *ref_prefixes)+ const struct strvec *ref_prefixes) { struct bundle_transport_data *data = transport->data; struct ref *result = NULL;@@ -283,7 +283,7 @@ static void die_if_server_options(struct transport *transport) * remote refs. */ static struct ref *handshake(struct transport *transport, int for_push,- const struct argv_array *ref_prefixes,+ const struct strvec *ref_prefixes, int must_list_refs) { struct git_transport_data *data = transport->data;@@ -327,7 +327,7 @@ static struct ref *handshake(struct transport *transport, int for_push, } static struct ref *get_refs_via_connect(struct transport *transport, int for_push,- const struct argv_array *ref_prefixes)+ const struct strvec *ref_prefixes) { return handshake(transport, for_push, ref_prefixes, 1); }@@ -1153,7 +1153,7 @@ int transport_push(struct repository *r, int porcelain = flags & TRANSPORT_PUSH_PORCELAIN; int pretend = flags & TRANSPORT_PUSH_DRY_RUN; int push_ret, ret, err;- struct argv_array ref_prefixes = ARGV_ARRAY_INIT;+ struct strvec ref_prefixes = STRVEC_INIT; if (check_push_refs(local_refs, rs) < 0) return -1;@@ -1165,7 +1165,7 @@ int transport_push(struct repository *r, &ref_prefixes); trace2_region_leave("transport_push", "get_refs_list", r);- argv_array_clear(&ref_prefixes);+ strvec_clear(&ref_prefixes); if (flags & TRANSPORT_PUSH_ALL) match_flags |= MATCH_REFS_ALL;@@ -1281,7 +1281,7 @@ int transport_push(struct repository *r, } const struct ref *transport_get_remote_refs(struct transport *transport,- const struct argv_array *ref_prefixes)+ const struct strvec *ref_prefixes) { if (!transport->got_remote_refs) { transport->remote_refs =
transport.h
+1-1
index b3c30133ea..1be4013dec 100644--- a/transport.h+++ b/transport.h@@ -243,7 +243,7 @@ int transport_push(struct repository *repo, * ref_prefixes. */ const struct ref *transport_get_remote_refs(struct transport *transport,- const struct argv_array *ref_prefixes);+ const struct strvec *ref_prefixes); /* * Fetch the hash algorithm used by a remote.
unpack-trees.c
+5-5
index 65c3395f0f..323280dd48 100644--- a/unpack-trees.c+++ b/unpack-trees.c@@ -106,7 +106,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, const char **msgs = opts->msgs; const char *msg;- argv_array_init(&opts->msgs_to_free);+ strvec_init(&opts->msgs_to_free); if (!strcmp(cmd, "checkout")) msg = advice_commit_before_merge@@ -124,7 +124,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, "Please commit your changes or stash them before you %s.") : _("Your local changes to the following files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =- argv_array_pushf(&opts->msgs_to_free, msg, cmd, cmd);+ strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd); msgs[ERROR_NOT_UPTODATE_DIR] = _("Updating the following directories would lose untracked files in them:\n%s");@@ -145,7 +145,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, "Please move or remove them before you %s.") : _("The following untracked working tree files would be removed by %s:\n%%s"); msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] =- argv_array_pushf(&opts->msgs_to_free, msg, cmd, cmd);+ strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd); if (!strcmp(cmd, "checkout")) msg = advice_commit_before_merge@@ -163,7 +163,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, "Please move or remove them before you %s.") : _("The following untracked working tree files would be overwritten by %s:\n%%s"); msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] =- argv_array_pushf(&opts->msgs_to_free, msg, cmd, cmd);+ strvec_pushf(&opts->msgs_to_free, msg, cmd, cmd); /* * Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we@@ -189,7 +189,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts, void clear_unpack_trees_porcelain(struct unpack_trees_options *opts) {- argv_array_clear(&opts->msgs_to_free);+ strvec_clear(&opts->msgs_to_free); memset(opts->msgs, 0, sizeof(opts->msgs)); }
unpack-trees.h
+1-1
index f8a904a05b..2e87875b15 100644--- a/unpack-trees.h+++ b/unpack-trees.h@@ -70,7 +70,7 @@ struct unpack_trees_options { struct pathspec *pathspec; merge_fn_t fn; const char *msgs[NB_UNPACK_TREES_WARNING_TYPES];- struct argv_array msgs_to_free;+ struct strvec msgs_to_free; /* * Store error messages in an array, each case * corresponding to a error message type
upload-pack.c
+24-24
index b435dae62f..1b0e1fca1a 100644--- a/upload-pack.c+++ b/upload-pack.c@@ -269,45 +269,45 @@ static void create_pack_file(struct upload_pack_data *pack_data, if (!pack_data->pack_objects_hook) pack_objects.git_cmd = 1; else {- argv_array_push(&pack_objects.args, pack_data->pack_objects_hook);- argv_array_push(&pack_objects.args, "git");+ strvec_push(&pack_objects.args, pack_data->pack_objects_hook);+ strvec_push(&pack_objects.args, "git"); pack_objects.use_shell = 1; } if (pack_data->shallow_nr) {- argv_array_push(&pack_objects.args, "--shallow-file");- argv_array_push(&pack_objects.args, "");+ strvec_push(&pack_objects.args, "--shallow-file");+ strvec_push(&pack_objects.args, ""); }- argv_array_push(&pack_objects.args, "pack-objects");- argv_array_push(&pack_objects.args, "--revs");+ strvec_push(&pack_objects.args, "pack-objects");+ strvec_push(&pack_objects.args, "--revs"); if (pack_data->use_thin_pack)- argv_array_push(&pack_objects.args, "--thin");+ strvec_push(&pack_objects.args, "--thin");- argv_array_push(&pack_objects.args, "--stdout");+ strvec_push(&pack_objects.args, "--stdout"); if (pack_data->shallow_nr)- argv_array_push(&pack_objects.args, "--shallow");+ strvec_push(&pack_objects.args, "--shallow"); if (!pack_data->no_progress)- argv_array_push(&pack_objects.args, "--progress");+ strvec_push(&pack_objects.args, "--progress"); if (pack_data->use_ofs_delta)- argv_array_push(&pack_objects.args, "--delta-base-offset");+ strvec_push(&pack_objects.args, "--delta-base-offset"); if (pack_data->use_include_tag)- argv_array_push(&pack_objects.args, "--include-tag");+ strvec_push(&pack_objects.args, "--include-tag"); if (pack_data->filter_options.choice) { const char *spec = expand_list_objects_filter_spec(&pack_data->filter_options); if (pack_objects.use_shell) { struct strbuf buf = STRBUF_INIT; sq_quote_buf(&buf, spec);- argv_array_pushf(&pack_objects.args, "--filter=%s", buf.buf);+ strvec_pushf(&pack_objects.args, "--filter=%s", buf.buf); strbuf_release(&buf); } else {- argv_array_pushf(&pack_objects.args, "--filter=%s",+ strvec_pushf(&pack_objects.args, "--filter=%s", spec); } } if (uri_protocols) { for (i = 0; i < uri_protocols->nr; i++)- argv_array_pushf(&pack_objects.args, "--uri-protocol=%s",+ strvec_pushf(&pack_objects.args, "--uri-protocol=%s", uri_protocols->items[i].string); }@@ -880,26 +880,26 @@ static int send_shallow_list(struct upload_pack_data *data) deepen(data, data->depth); ret = 1; } else if (data->deepen_rev_list) {- struct argv_array av = ARGV_ARRAY_INIT;+ struct strvec av = STRVEC_INIT; int i;- argv_array_push(&av, "rev-list");+ strvec_push(&av, "rev-list"); if (data->deepen_since)- argv_array_pushf(&av, "--max-age=%"PRItime, data->deepen_since);+ strvec_pushf(&av, "--max-age=%"PRItime, data->deepen_since); if (data->deepen_not.nr) {- argv_array_push(&av, "--not");+ strvec_push(&av, "--not"); for (i = 0; i < data->deepen_not.nr; i++) { struct string_list_item *s = data->deepen_not.items + i;- argv_array_push(&av, s->string);+ strvec_push(&av, s->string); }- argv_array_push(&av, "--not");+ strvec_push(&av, "--not"); } for (i = 0; i < data->want_obj.nr; i++) { struct object *o = data->want_obj.objects[i].item;- argv_array_push(&av, oid_to_hex(&o->oid));+ strvec_push(&av, oid_to_hex(&o->oid)); } deepen_by_rev_list(data, av.argc, av.argv);- argv_array_clear(&av);+ strvec_clear(&av); ret = 1; } else { if (data->shallows.nr > 0) {@@ -1521,7 +1521,7 @@ enum fetch_state { FETCH_DONE, };-int upload_pack_v2(struct repository *r, struct argv_array *keys,+int upload_pack_v2(struct repository *r, struct strvec *keys, struct packet_reader *request) { enum fetch_state state = FETCH_PROCESS_ARGS;