2006-10-09 14:32:05 +04:00
|
|
|
/*
|
|
|
|
* "git annotate" builtin alias
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Ryan Anderson
|
|
|
|
*/
|
|
|
|
#include "git-compat-util.h"
|
2006-11-11 00:36:44 +03:00
|
|
|
#include "builtin.h"
|
2020-07-28 23:23:39 +03:00
|
|
|
#include "strvec.h"
|
2006-10-09 14:32:05 +04:00
|
|
|
|
|
|
|
int cmd_annotate(int argc, const char **argv, const char *prefix)
|
|
|
|
{
|
2020-07-28 23:24:27 +03:00
|
|
|
struct strvec args = STRVEC_INIT;
|
2006-10-09 14:32:05 +04:00
|
|
|
int i;
|
|
|
|
|
2020-07-28 23:24:27 +03:00
|
|
|
strvec_pushl(&args, "annotate", "-c", NULL);
|
2006-10-09 14:32:05 +04:00
|
|
|
|
|
|
|
for (i = 1; i < argc; i++) {
|
2020-07-28 23:24:27 +03:00
|
|
|
strvec_push(&args, argv[i]);
|
2006-10-09 14:32:05 +04:00
|
|
|
}
|
|
|
|
|
2020-07-29 03:37:20 +03:00
|
|
|
return cmd_blame(args.nr, args.v, prefix);
|
2006-10-09 14:32:05 +04:00
|
|
|
}
|