summaryrefslogtreecommitdiff
path: root/builtin-annotate.c
diff options
context:
space:
mode:
authorRyan Anderson <ryan@michonline.com>2006-10-09 03:32:05 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-09 20:25:28 -0700
commitf789e347465dded7fcec3a605473fa3f549792d8 (patch)
tree82f7ed797ba6dce9d6aea93a90ebcd84690eaf7e /builtin-annotate.c
parentb5c698d947c236559e338e45c6234ece7c819338 (diff)
downloadgit-f789e347465dded7fcec3a605473fa3f549792d8.tar.gz
Remove git-annotate.perl and create a builtin-alias for git-blame
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
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..25ad473711
--- /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 "exec_cmd.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] = "blame";
+ nargv[1] = "-c";
+
+ for (i = 1; i < argc; i++) {
+ nargv[i+1] = argv[i];
+ }
+ nargv[argc + 1] = NULL;
+
+ return execv_git_cmd(nargv);
+}
+