From 606475f3178784e5a6b3a01dce1a54314345cf43 Mon Sep 17 00:00:00 2001 From: Martin Renold Date: Wed, 1 Jul 2009 22:18:04 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- merge-recursive.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'merge-recursive.c') diff --git a/merge-recursive.c b/merge-recursive.c index c703445a9c..53cad9605b 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -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); -- cgit v1.2.3