summaryrefslogtreecommitdiff
path: root/builtin-annotate.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-25 13:18:06 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-25 13:18:06 -0700
commit8e95026f2942c2c485d9686736d861a6477480b5 (patch)
tree34fe30ed2981d79cae5791c85e8f0db183c602b8 /builtin-annotate.c
parent7756b1f1dc07fae9abab4126a687a2609dfbf009 (diff)
parent48fd688ab0ba7d41ff4286aee20f6f0b86e4c41c (diff)
downloadgit-8e95026f2942c2c485d9686736d861a6477480b5.tar.gz
Merge branch 'jc/web-blame'
* jc/web-blame: gitweb: spell "blame --porcelain" with -p blame: Document and add help text for -f, -n, and -p gitweb: blame porcelain: lineno and orig lineno swapped Remove git-annotate.perl and create a builtin-alias for git-blame gitweb: use blame --porcelain git-blame --porcelain blame.c: move code to output metainfo into a separate function. git-blame: --show-number (and -n) git-blame: --show-name (and -f) blame.c: whitespace and formatting clean-up. Gitweb - provide site headers and footers gitweb: blame: Mouse-over commit-8 shows author and date gitweb: blame: print commit-8 on the leading row of a commit-block Revert 954a6183756a073723a7c9fd8d2feb13132876b0 gitweb: prepare for repositories with packed refs. gitweb: make leftmost column of blame less cluttered.
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);
+}
+