summaryrefslogtreecommitdiff
path: root/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-annotate.c')
-rw-r--r--builtin-annotate.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/builtin-annotate.c b/builtin-annotate.c
new file mode 100644
index 0000000000..9db7cfe74c
--- /dev/null
+++ b/builtin-annotate.c
@@ -0,0 +1,25 @@
+/*
+ * "git annotate" builtin alias
+ *
+ * Copyright (C) 2006 Ryan Anderson
+ */
+#include "git-compat-util.h"
+#include "builtin.h"
+
+int cmd_annotate(int argc, const char **argv, const char *prefix)
+{
+ const char **nargv;
+ int i;
+ nargv = xmalloc(sizeof(char *) * (argc + 2));
+
+ nargv[0] = "annotate";
+ nargv[1] = "-c";
+
+ for (i = 1; i < argc; i++) {
+ nargv[i+1] = argv[i];
+ }
+ nargv[argc + 1] = NULL;
+
+ return cmd_blame(argc + 1, nargv, prefix);
+}
+