diff options
author | Jeff King <peff@peff.net> | 2020-07-29 02:37:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-31 04:18:06 +0200 |
commit | d70a9eb611a9d242c1d26847d223b8677609305b (patch) | |
tree | 2c7f218e0037607dfbf8c92ef34a5d412ceac78c /revision.c | |
parent | strvec: drop argv_array compatibility layer (diff) | |
download | git-d70a9eb611a9d242c1d26847d223b8677609305b.tar.xz git-d70a9eb611a9d242c1d26847d223b8677609305b.zip |
strvec: rename struct fields
The "argc" and "argv" names made sense when the struct was argv_array,
but now they're just confusing. Let's rename them to "nr" (which we use
for counts elsewhere) and "v" (which is rather terse, but reads well
when combined with typical variable names like "args.v").
Note that we have to update all of the callers immediately. Playing
tricks with the preprocessor is hard here, because we wouldn't want to
rewrite unrelated tokens.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c index e144132ae9..bc69f19141 100644 --- a/revision.c +++ b/revision.c @@ -2767,7 +2767,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s got_rev_arg = 1; } - if (prune_data.argc) { + if (prune_data.nr) { /* * If we need to introduce the magic "a lone ':' means no * pathspec whatsoever", here is the place to do so. @@ -2783,7 +2783,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s * } */ parse_pathspec(&revs->prune_data, 0, 0, - revs->prefix, prune_data.argv); + revs->prefix, prune_data.v); } strvec_clear(&prune_data); |