strvec: convert builtin/ 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 files in builtin/ to keep the diff to a manageable size. 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; ' and then selectively staging files with "git add builtin/". 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>
This commit is contained in:

committed by
Junio C Hamano

parent
2745b6b450
commit
22f9b7f3f5
@ -45,7 +45,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
|
||||
int show_symref_target = 0;
|
||||
const char *uploadpack = NULL;
|
||||
const char **pattern = NULL;
|
||||
struct argv_array ref_prefixes = ARGV_ARRAY_INIT;
|
||||
struct strvec ref_prefixes = STRVEC_INIT;
|
||||
int i;
|
||||
struct string_list server_options = STRING_LIST_INIT_DUP;
|
||||
|
||||
@ -92,9 +92,9 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
|
||||
}
|
||||
|
||||
if (flags & REF_TAGS)
|
||||
argv_array_push(&ref_prefixes, "refs/tags/");
|
||||
strvec_push(&ref_prefixes, "refs/tags/");
|
||||
if (flags & REF_HEADS)
|
||||
argv_array_push(&ref_prefixes, "refs/heads/");
|
||||
strvec_push(&ref_prefixes, "refs/heads/");
|
||||
|
||||
remote = remote_get(dest);
|
||||
if (!remote) {
|
||||
|
Reference in New Issue
Block a user