Browse Source

annotate: fix for cvsserver.

git-cvsserver does not want the boundary commits shown any differently.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 18 years ago
parent
commit
e68989a739
  1. 2
      builtin-annotate.c
  2. 9
      builtin-blame.c

2
builtin-annotate.c

@ -12,7 +12,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix)
int i; int i;
nargv = xmalloc(sizeof(char *) * (argc + 2)); nargv = xmalloc(sizeof(char *) * (argc + 2));


nargv[0] = "blame"; nargv[0] = "annotate";
nargv[1] = "-c"; nargv[1] = "-c";


for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {

9
builtin-blame.c

@ -41,6 +41,7 @@ static int max_score_digits;
static int show_root; static int show_root;
static int blank_boundary; static int blank_boundary;
static int incremental; static int incremental;
static int cmd_is_annotate;


#ifndef DEBUG #ifndef DEBUG
#define DEBUG 0 #define DEBUG 0
@ -1554,12 +1555,12 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? 40 : 8; int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? 40 : 8;


if (suspect->commit->object.flags & UNINTERESTING) { if (suspect->commit->object.flags & UNINTERESTING) {
if (!blank_boundary) { if (blank_boundary)
memset(hex, ' ', length);
else if (!cmd_is_annotate) {
length--; length--;
putchar('^'); putchar('^');
} }
else
memset(hex, ' ', length);
} }


printf("%.*s", length, hex); printf("%.*s", length, hex);
@ -2070,6 +2071,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
const char *bottomtop = NULL; const char *bottomtop = NULL;
const char *contents_from = NULL; const char *contents_from = NULL;


cmd_is_annotate = !strcmp(argv[0], "annotate");

git_config(git_blame_config); git_config(git_blame_config);
save_commit_buffer = 0; save_commit_buffer = 0;



Loading…
Cancel
Save