strvec: convert remaining 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 remaining files, as the resulting diff is reasonably sized. 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; ' 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
ef8d7ac42a
commit
c972bf4cf5
6
refs.c
6
refs.c
@ -553,13 +553,13 @@ int refname_match(const char *abbrev_name, const char *full_name)
|
||||
* Given a 'prefix' expand it by the rules in 'ref_rev_parse_rules' and add
|
||||
* the results to 'prefixes'
|
||||
*/
|
||||
void expand_ref_prefix(struct argv_array *prefixes, const char *prefix)
|
||||
void expand_ref_prefix(struct strvec *prefixes, const char *prefix)
|
||||
{
|
||||
const char **p;
|
||||
int len = strlen(prefix);
|
||||
|
||||
for (p = ref_rev_parse_rules; *p; p++)
|
||||
argv_array_pushf(prefixes, *p, len, prefix);
|
||||
strvec_pushf(prefixes, *p, len, prefix);
|
||||
}
|
||||
|
||||
char *repo_default_branch_name(struct repository *r)
|
||||
@ -2037,7 +2037,7 @@ static int run_transaction_hook(struct ref_transaction *transaction,
|
||||
return ret;
|
||||
}
|
||||
|
||||
argv_array_pushl(&proc.args, hook, state, NULL);
|
||||
strvec_pushl(&proc.args, hook, state, NULL);
|
||||
proc.in = -1;
|
||||
proc.stdout_to_stderr = 1;
|
||||
proc.trace2_hook_name = "reference-transaction";
|
||||
|
Reference in New Issue
Block a user