Remove filename from conflict markers

Put filenames into the conflict markers only when they are different.
Otherwise they are redundant information clutter.

Print the filename explicitely when warning about a binary conflict.

Signed-off-by: Martin Renold <martinxyz@gmx.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Renold
2009-07-01 22:18:04 +02:00
committed by Junio C Hamano
parent 702beb3af0
commit 606475f317
4 changed files with 17 additions and 13 deletions

View File

@ -622,8 +622,13 @@ static int merge_3way(struct merge_options *o,
char *name1, *name2;
int merge_status;
name1 = xstrdup(mkpath("%s:%s", branch1, a->path));
name2 = xstrdup(mkpath("%s:%s", branch2, b->path));
if (strcmp(a->path, b->path)) {
name1 = xstrdup(mkpath("%s:%s", branch1, a->path));
name2 = xstrdup(mkpath("%s:%s", branch2, b->path));
} else {
name1 = xstrdup(mkpath("%s", branch1));
name2 = xstrdup(mkpath("%s", branch2));
}
fill_mm(one->sha1, &orig);
fill_mm(a->sha1, &src1);