quote: rename sq_dequote_to_argv_array to mention strvec
We want to eventually drop the use of the "argv_array" name in favor of "strvec." Unlike most other uses of the name, this one is embedded in a function name, so the definition and all of the callers need to be updated at the same time. We don't technically need to update the parameter types here (our preprocessor compat macros make the two names interchangeable), but let's do so to keep the site consistent for now. 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:24 UTC
2745b6b4505ae11d6821c1d451169727b558a079
4 files changed
+6
-6
bisect.c
+1
-1
@@ -464,7 +464,7 @@ static void read_bisect_paths(struct argv_array *array)
464
465
while (strbuf_getline_lf(&str, fp) != EOF) {
466
strbuf_trim(&str);
467
- if (sq_dequote_to_argv_array(str.buf, array))
467
+ if (sq_dequote_to_strvec(str.buf, array))
468
die(_("Badly quoted content in file '%s': %s"),
469
filename, str.buf);
470
}
builtin/am.c
+1
-1
@@ -399,7 +399,7 @@ static void am_load(struct am_state *state)
399
400
read_state_file(&sb, state, "apply-opt", 1);
401
argv_array_clear(&state->git_apply_opts);
402
- if (sq_dequote_to_argv_array(sb.buf, &state->git_apply_opts) < 0)
402
+ if (sq_dequote_to_strvec(sb.buf, &state->git_apply_opts) < 0)
403
die(_("could not parse %s"), am_path(state, "apply-opt"));
404
405
state->rebasing = !!file_exists(am_path(state, "rebasing"));
quote.c
+1
-1
@@ -198,7 +198,7 @@ int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc)
198
return sq_dequote_to_argv_internal(arg, argv, nr, alloc, NULL);
199
}
200
201
-int sq_dequote_to_argv_array(char *arg, struct argv_array *array)
201
+int sq_dequote_to_strvec(char *arg, struct strvec *array)
202
{
203
return sq_dequote_to_argv_internal(arg, NULL, NULL, NULL, array);
204
}
quote.h
+3
-3
@@ -56,12 +56,12 @@ char *sq_dequote(char *);
56
int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc);
57
58
/*
59
- * Same as above, but store the unquoted strings in an argv_array. We will
60
- * still modify arg in place, but unlike sq_dequote_to_argv, the argv_array
59
+ * Same as above, but store the unquoted strings in a strvec. We will
60
+ * still modify arg in place, but unlike sq_dequote_to_argv, the strvec
61
* will duplicate and take ownership of the strings.
62
*/
63
struct strvec;
64
-int sq_dequote_to_argv_array(char *arg, struct strvec *);
64
+int sq_dequote_to_strvec(char *arg, struct strvec *);
65
66
int unquote_c_style(struct strbuf *, const char *quoted, const char **endp);
67
size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq);