mirror of
https://github.com/git/git.git
synced 2024-12-18 06:14:59 +08:00
d70a9eb611
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>
23 lines
419 B
C
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);
|
|
}
|