aboutsummaryrefslogtreecommitdiffstats
path: root/remote.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 16:25:12 -0400
committerJunio C Hamano <gitster@pobox.com>2020-07-28 15:02:18 -0700
commitc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch)
tree3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /remote.c
parentef8d7ac42a6a62d678166fe25ea743315809d2bb (diff)
downloadgit-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.tar.gz
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 'remote.c')
-rw-r--r--remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/remote.c b/remote.c
index ba1a386d98..13b097866c 100644
--- a/remote.c
+++ b/remote.c
@@ -1885,7 +1885,7 @@ static int stat_branch_pair(const char *branch_name, const char *base,
struct object_id oid;
struct commit *ours, *theirs;
struct rev_info revs;
- struct argv_array argv = ARGV_ARRAY_INIT;
+ struct strvec argv = STRVEC_INIT;
/* Cannot stat if what we used to build on no longer exists */
if (read_ref(base, &oid))
@@ -1911,12 +1911,12 @@ static int stat_branch_pair(const char *branch_name, const char *base,
BUG("stat_branch_pair: invalid abf '%d'", abf);
/* Run "rev-list --left-right ours...theirs" internally... */
- argv_array_push(&argv, ""); /* ignored */
- argv_array_push(&argv, "--left-right");
- argv_array_pushf(&argv, "%s...%s",
+ strvec_push(&argv, ""); /* ignored */
+ strvec_push(&argv, "--left-right");
+ strvec_pushf(&argv, "%s...%s",
oid_to_hex(&ours->object.oid),
oid_to_hex(&theirs->object.oid));
- argv_array_push(&argv, "--");
+ strvec_push(&argv, "--");
repo_init_revisions(the_repository, &revs, NULL);
setup_revisions(argv.argc, argv.argv, &revs, NULL);
@@ -1938,7 +1938,7 @@ static int stat_branch_pair(const char *branch_name, const char *base,
clear_commit_marks(ours, ALL_REV_FLAGS);
clear_commit_marks(theirs, ALL_REV_FLAGS);
- argv_array_clear(&argv);
+ strvec_clear(&argv);
return 1;
}