diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-10 10:23:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-10 10:23:57 -0700 |
commit | 46b225f15308c8f77379f864189bed95c273d29f (patch) | |
tree | 8f909ef2df2d002ccd2c86dc2a9dbdf4aae21c95 /sha1-file.c | |
parent | Fourth batch (diff) | |
parent | strvec: rename struct fields (diff) | |
download | tgif-46b225f15308c8f77379f864189bed95c273d29f.tar.xz |
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
Diffstat (limited to 'sha1-file.c')
-rw-r--r-- | sha1-file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sha1-file.c b/sha1-file.c index 45fdb8415c..8904559da2 100644 --- a/sha1-file.c +++ b/sha1-file.c @@ -763,18 +763,18 @@ static void fill_alternate_refs_command(struct child_process *cmd, if (!git_config_get_value("core.alternateRefsCommand", &value)) { cmd->use_shell = 1; - argv_array_push(&cmd->args, value); - argv_array_push(&cmd->args, repo_path); + strvec_push(&cmd->args, value); + strvec_push(&cmd->args, repo_path); } else { cmd->git_cmd = 1; - argv_array_pushf(&cmd->args, "--git-dir=%s", repo_path); - argv_array_push(&cmd->args, "for-each-ref"); - argv_array_push(&cmd->args, "--format=%(objectname)"); + strvec_pushf(&cmd->args, "--git-dir=%s", repo_path); + strvec_push(&cmd->args, "for-each-ref"); + strvec_push(&cmd->args, "--format=%(objectname)"); if (!git_config_get_value("core.alternateRefsPrefixes", &value)) { - argv_array_push(&cmd->args, "--"); - argv_array_split(&cmd->args, value); + strvec_push(&cmd->args, "--"); + strvec_split(&cmd->args, value); } } |