annotate: fix for cvsserver.
git-cvsserver does not want the boundary commits shown any differently. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 6, 2007 at 01:52 UTC
e68989a739d8b1c5effb898d1ac78d27ca9d313a
2 files changed
+7
-4
builtin-annotate.c
+1
-1
@@ -12,7 +12,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix)
12
int i;
13
nargv = xmalloc(sizeof(char *) * (argc + 2));
14
15
- nargv[0] = "blame";
15
+ nargv[0] = "annotate";
16
nargv[1] = "-c";
17
18
for (i = 1; i < argc; i++) {
builtin-blame.c
+6
-3
@@ -41,6 +41,7 @@ static int max_score_digits;
41
static int show_root;
42
static int blank_boundary;
43
static int incremental;
44
+static int cmd_is_annotate;
45
46
#ifndef DEBUG
47
#define DEBUG 0
@@ -1554,12 +1555,12 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
1555
int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? 40 : 8;
1556
1557
if (suspect->commit->object.flags & UNINTERESTING) {
1557
- if (!blank_boundary) {
1558
+ if (blank_boundary)
1559
+ memset(hex, ' ', length);
1560
+ else if (!cmd_is_annotate) {
1561
length--;
1562
putchar('^');
1563
}
1561
- else
1562
- memset(hex, ' ', length);
1564
}
1565
1566
printf("%.*s", length, hex);
@@ -2070,6 +2071,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
2071
const char *bottomtop = NULL;
2072
const char *contents_from = NULL;
2073
2074
+ cmd_is_annotate = !strcmp(argv[0], "annotate");
2075
+
2076
git_config(git_blame_config);
2077
save_commit_buffer = 0;
2078