Merge branch 'jk/strvec'

The argv_array API is useful for not just managing argv but any
"vector" (NULL-terminated array) of strings, and has seen adoption
to a certain degree.  It has been renamed to "strvec" to reduce the
barrier to adoption.

* jk/strvec:
  strvec: rename struct fields
  strvec: drop argv_array compatibility layer
  strvec: update documention to avoid argv_array
  strvec: fix indentation in renamed calls
  strvec: convert remaining callers away from argv_array name
  strvec: convert more callers away from argv_array name
  strvec: convert builtin/ callers away from argv_array name
  quote: rename sq_dequote_to_argv_array to mention strvec
  strvec: rename files from argv-array to strvec
  argv-array: rename to strvec
  argv-array: use size_t for count and alloc
This commit is contained in:
Junio C Hamano
2020-08-10 10:23:57 -07:00
105 changed files with 1619 additions and 1620 deletions

View File

@ -358,7 +358,7 @@ static struct child_process column_process = CHILD_PROCESS_INIT;
int run_column_filter(int colopts, const struct column_options *opts)
{
struct argv_array *argv;
struct strvec *argv;
if (fd_out != -1)
return -1;
@ -366,14 +366,14 @@ int run_column_filter(int colopts, const struct column_options *opts)
child_process_init(&column_process);
argv = &column_process.args;
argv_array_push(argv, "column");
argv_array_pushf(argv, "--raw-mode=%d", colopts);
strvec_push(argv, "column");
strvec_pushf(argv, "--raw-mode=%d", colopts);
if (opts && opts->width)
argv_array_pushf(argv, "--width=%d", opts->width);
strvec_pushf(argv, "--width=%d", opts->width);
if (opts && opts->indent)
argv_array_pushf(argv, "--indent=%s", opts->indent);
strvec_pushf(argv, "--indent=%s", opts->indent);
if (opts && opts->padding)
argv_array_pushf(argv, "--padding=%d", opts->padding);
strvec_pushf(argv, "--padding=%d", opts->padding);
fflush(stdout);
column_process.in = -1;