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:24:53 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commitef8d7ac42a6a62d678166fe25ea743315809d2bb (patch)
tree41974632658fdc804d42d3c98859bd8f259828c8 /http-push.c
parent22f9b7f3f59549735a480042a4b9ce292eedfae0 (diff)
strvec: convert more 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 remaining files from the first half of the alphabet, 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 '[abcdefghjkl]*'". 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 'http-push.c')
-rw-r--r--http-push.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/http-push.c b/http-push.c
index 3a47921cc3..e1deea6fe4 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1846,7 +1846,7 @@ int cmd_main(int argc, const char **argv)
new_refs = 0;
for (ref = remote_refs; ref; ref = ref->next) {
- struct argv_array commit_argv = ARGV_ARRAY_INIT;
+ struct strvec commit_argv = STRVEC_INIT;
if (!ref->peer_ref)
continue;
@@ -1924,11 +1924,11 @@ int cmd_main(int argc, const char **argv)
}
/* Set up revision info for this refspec */
- argv_array_push(&commit_argv, ""); /* ignored */
- argv_array_push(&commit_argv, "--objects");
- argv_array_push(&commit_argv, oid_to_hex(&ref->new_oid));
+ strvec_push(&commit_argv, ""); /* ignored */
+ strvec_push(&commit_argv, "--objects");
+ strvec_push(&commit_argv, oid_to_hex(&ref->new_oid));
if (!push_all && !is_null_oid(&ref->old_oid))
- argv_array_pushf(&commit_argv, "^%s",
+ strvec_pushf(&commit_argv, "^%s",
oid_to_hex(&ref->old_oid));
repo_init_revisions(the_repository, &revs, setup_git_directory());
setup_revisions(commit_argv.argc, commit_argv.argv, &revs, NULL);
@@ -1961,7 +1961,7 @@ int cmd_main(int argc, const char **argv)
printf("%s %s\n", !rc ? "ok" : "error", ref->name);
unlock_remote(ref_lock);
check_locks();
- argv_array_clear(&commit_argv);
+ strvec_clear(&commit_argv);
}
/* Update remote server info if appropriate */