1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 21:36:12 +02:00
git/builtin/annotate.c
Jeff King d70a9eb611 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>
2020-07-30 19:18:06 -07:00

23 lines
419 B
C

/*
* "git annotate" builtin alias
*
* Copyright (C) 2006 Ryan Anderson
*/
#include "git-compat-util.h"
#include "builtin.h"
#include "strvec.h"
int cmd_annotate(int argc, const char **argv, const char *prefix)
{
struct strvec args = STRVEC_INIT;
int i;
strvec_pushl(&args, "annotate", "-c", NULL);
for (i = 1; i < argc; i++) {
strvec_push(&args, argv[i]);
}
return cmd_blame(args.nr, args.v, prefix);
}