Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Renold <martinxyz@gmx.ch>2009-07-02 00:18:04 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-02 06:46:30 +0400
commit606475f3178784e5a6b3a01dce1a54314345cf43 (patch)
treebd641f06c6fd9d71d54e6909e26560ab21c254d5 /merge-recursive.c
parent702beb3af0531bae95ab559fff043785614d53f2 (diff)
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c9
1 files changed, 7 insertions, 2 deletions
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);