summaryrefslogtreecommitdiff
path: root/refspec.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 20:25:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-28 22:02:18 (GMT)
commitc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch)
tree3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /refspec.c
parentef8d7ac42a6a62d678166fe25ea743315809d2bb (diff)
downloadgit-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.zip
git-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.tar.gz
git-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.tar.bz2
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>
Diffstat (limited to 'refspec.c')
-rw-r--r--refspec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refspec.c b/refspec.c
index f9fb67d..6f317d6 100644
--- a/refspec.c
+++ b/refspec.c
@@ -202,7 +202,7 @@ int valid_fetch_refspec(const char *fetch_refspec_str)
}
void refspec_ref_prefixes(const struct refspec *rs,
- struct argv_array *ref_prefixes)
+ struct strvec *ref_prefixes)
{
int i;
for (i = 0; i < rs->nr; i++) {
@@ -221,7 +221,7 @@ void refspec_ref_prefixes(const struct refspec *rs,
if (prefix) {
if (item->pattern) {
const char *glob = strchr(prefix, '*');
- argv_array_pushf(ref_prefixes, "%.*s",
+ strvec_pushf(ref_prefixes, "%.*s",
(int)(glob - prefix),
prefix);
} else {