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

github.com/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:27 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commit22f9b7f3f59549735a480042a4b9ce292eedfae0 (patch)
treeaf564ca6084c9790ea99dd60291d7aa9f854fecb /builtin/range-diff.c
parent2745b6b4505ae11d6821c1d451169727b558a079 (diff)
strvec: convert builtin/ 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 files in builtin/ 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 builtin/". 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 'builtin/range-diff.c')
-rw-r--r--builtin/range-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index d8a46706299..24c4162f744 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -15,7 +15,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
{
int creation_factor = RANGE_DIFF_CREATION_FACTOR_DEFAULT;
struct diff_options diffopt = { NULL };
- struct argv_array other_arg = ARGV_ARRAY_INIT;
+ struct strvec other_arg = STRVEC_INIT;
int simple_color = -1;
struct option range_diff_options[] = {
OPT_INTEGER(0, "creation-factor", &creation_factor,
@@ -84,7 +84,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
res = show_range_diff(range1.buf, range2.buf, creation_factor,
simple_color < 1, &diffopt, &other_arg);
- argv_array_clear(&other_arg);
+ strvec_clear(&other_arg);
strbuf_release(&range1);
strbuf_release(&range2);