diff options
author | Martin Renold <martinxyz@gmx.ch> | 2009-07-01 22:18:04 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-01 19:46:30 -0700 |
commit | 606475f3178784e5a6b3a01dce1a54314345cf43 (patch) | |
tree | bd641f06c6fd9d71d54e6909e26560ab21c254d5 /merge-recursive.c | |
parent | 702beb3af0531bae95ab559fff043785614d53f2 (diff) | |
download | git-606475f3178784e5a6b3a01dce1a54314345cf43.tar.gz |
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.c | 9 |
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); |