Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 23:25:12 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commitc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch)
tree3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /transport.c
parentef8d7ac42a6a62d678166fe25ea743315809d2bb (diff)
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 'transport.c')
-rw-r--r--transport.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/transport.c b/transport.c
index b41386eccb..2d4fd851dc 100644
--- a/transport.c
+++ b/transport.c
@@ -127,7 +127,7 @@ struct bundle_transport_data {
static struct ref *get_refs_from_bundle(struct transport *transport,
int for_push,
- const struct argv_array *ref_prefixes)
+ const struct strvec *ref_prefixes)
{
struct bundle_transport_data *data = transport->data;
struct ref *result = NULL;
@@ -283,7 +283,7 @@ static void die_if_server_options(struct transport *transport)
* remote refs.
*/
static struct ref *handshake(struct transport *transport, int for_push,
- const struct argv_array *ref_prefixes,
+ const struct strvec *ref_prefixes,
int must_list_refs)
{
struct git_transport_data *data = transport->data;
@@ -327,7 +327,7 @@ static struct ref *handshake(struct transport *transport, int for_push,
}
static struct ref *get_refs_via_connect(struct transport *transport, int for_push,
- const struct argv_array *ref_prefixes)
+ const struct strvec *ref_prefixes)
{
return handshake(transport, for_push, ref_prefixes, 1);
}
@@ -1153,7 +1153,7 @@ int transport_push(struct repository *r,
int porcelain = flags & TRANSPORT_PUSH_PORCELAIN;
int pretend = flags & TRANSPORT_PUSH_DRY_RUN;
int push_ret, ret, err;
- struct argv_array ref_prefixes = ARGV_ARRAY_INIT;
+ struct strvec ref_prefixes = STRVEC_INIT;
if (check_push_refs(local_refs, rs) < 0)
return -1;
@@ -1165,7 +1165,7 @@ int transport_push(struct repository *r,
&ref_prefixes);
trace2_region_leave("transport_push", "get_refs_list", r);
- argv_array_clear(&ref_prefixes);
+ strvec_clear(&ref_prefixes);
if (flags & TRANSPORT_PUSH_ALL)
match_flags |= MATCH_REFS_ALL;
@@ -1281,7 +1281,7 @@ int transport_push(struct repository *r,
}
const struct ref *transport_get_remote_refs(struct transport *transport,
- const struct argv_array *ref_prefixes)
+ const struct strvec *ref_prefixes)
{
if (!transport->got_remote_refs) {
transport->remote_refs =