2006-10-09 12:32:05 +02:00
|
|
|
/*
|
|
|
|
* "git annotate" builtin alias
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Ryan Anderson
|
|
|
|
*/
|
|
|
|
#include "git-compat-util.h"
|
2006-11-10 22:36:44 +01:00
|
|
|
#include "builtin.h"
|
2014-07-16 10:51:33 +02:00
|
|
|
#include "argv-array.h"
|
2006-10-09 12:32:05 +02:00
|
|
|
|
|
|
|
int cmd_annotate(int argc, const char **argv, const char *prefix)
|
|
|
|
{
|
2014-07-16 10:51:33 +02:00
|
|
|
struct argv_array args = ARGV_ARRAY_INIT;
|
2006-10-09 12:32:05 +02:00
|
|
|
int i;
|
|
|
|
|
2014-07-16 10:51:33 +02:00
|
|
|
argv_array_pushl(&args, "annotate", "-c", NULL);
|
2006-10-09 12:32:05 +02:00
|
|
|
|
|
|
|
for (i = 1; i < argc; i++) {
|
2014-07-16 10:51:33 +02:00
|
|
|
argv_array_push(&args, argv[i]);
|
2006-10-09 12:32:05 +02:00
|
|
|
}
|
|
|
|
|
2014-07-16 10:51:33 +02:00
|
|
|
return cmd_blame(args.argc, args.argv, prefix);
|
2006-10-09 12:32:05 +02:00
|
|
|
}
|