diff --git a/bisect.c b/bisect.c index 3160e82e96..77e35ddd43 100644 --- a/bisect.c +++ b/bisect.c @@ -464,7 +464,7 @@ static void read_bisect_paths(struct argv_array *array) while (strbuf_getline_lf(&str, fp) != EOF) { strbuf_trim(&str); - if (sq_dequote_to_argv_array(str.buf, array)) + if (sq_dequote_to_strvec(str.buf, array)) die(_("Badly quoted content in file '%s': %s"), filename, str.buf); } diff --git a/builtin/am.c b/builtin/am.c index 69e50de018..0641316e35 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -399,7 +399,7 @@ static void am_load(struct am_state *state) read_state_file(&sb, state, "apply-opt", 1); argv_array_clear(&state->git_apply_opts); - if (sq_dequote_to_argv_array(sb.buf, &state->git_apply_opts) < 0) + if (sq_dequote_to_strvec(sb.buf, &state->git_apply_opts) < 0) die(_("could not parse %s"), am_path(state, "apply-opt")); state->rebasing = !!file_exists(am_path(state, "rebasing")); diff --git a/quote.c b/quote.c index dac8b4e55e..10b383cc1d 100644 --- a/quote.c +++ b/quote.c @@ -198,7 +198,7 @@ int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc) return sq_dequote_to_argv_internal(arg, argv, nr, alloc, NULL); } -int sq_dequote_to_argv_array(char *arg, struct argv_array *array) +int sq_dequote_to_strvec(char *arg, struct strvec *array) { return sq_dequote_to_argv_internal(arg, NULL, NULL, NULL, array); } diff --git a/quote.h b/quote.h index 210d580229..fa09309cf6 100644 --- a/quote.h +++ b/quote.h @@ -56,12 +56,12 @@ char *sq_dequote(char *); int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc); /* - * Same as above, but store the unquoted strings in an argv_array. We will - * still modify arg in place, but unlike sq_dequote_to_argv, the argv_array + * Same as above, but store the unquoted strings in a strvec. We will + * still modify arg in place, but unlike sq_dequote_to_argv, the strvec * will duplicate and take ownership of the strings. */ struct strvec; -int sq_dequote_to_argv_array(char *arg, struct strvec *); +int sq_dequote_to_strvec(char *arg, struct strvec *); int unquote_c_style(struct strbuf *, const char *quoted, const char **endp); size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq);