summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 702beb3)
raw | patch | inline | side by side (parent: 702beb3)
author | Martin Renold <martinxyz@gmx.ch> | |
Wed, 1 Jul 2009 20:18:04 +0000 (22:18 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 2 Jul 2009 02:46:30 +0000 (19:46 -0700) |
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>
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>
ll-merge.c | patch | blob | history | |
merge-recursive.c | patch | blob | history | |
t/t3404-rebase-interactive.sh | patch | blob | history | |
t/t6024-recursive-merge.sh | patch | blob | history |
diff --git a/ll-merge.c b/ll-merge.c
index 9168958e863e50f0d1bd1446b3314cb3dd2e772f..a2c13c4c087f7b4961f0507783d34d19ff4b2921 100644 (file)
--- a/ll-merge.c
+++ b/ll-merge.c
static int ll_xdl_merge(const struct ll_merge_driver *drv_unused,
mmbuffer_t *result,
- const char *path_unused,
+ const char *path,
mmfile_t *orig,
mmfile_t *src1, const char *name1,
mmfile_t *src2, const char *name2,
if (buffer_is_binary(orig->ptr, orig->size) ||
buffer_is_binary(src1->ptr, src1->size) ||
buffer_is_binary(src2->ptr, src2->size)) {
- warning("Cannot merge binary files: %s vs. %s\n",
- name1, name2);
+ warning("Cannot merge binary files: %s (%s vs. %s)\n",
+ path, name1, name2);
return ll_binary_merge(drv_unused, result,
- path_unused,
+ path,
orig, src1, name1,
src2, name2,
virtual_ancestor);
diff --git a/merge-recursive.c b/merge-recursive.c
index c703445a9cdf66f2933c1ffce636bfe3c11a048c..53cad9605bf1bb599b9c0ceb14788afa719dd5ac 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
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);
index c32ff6682b932b3d9b270de7260a2671d8d07403..a973628e8e3767ae017a6b18742bf4b66a68cdaa 100755 (executable)
EOF
cat > expect2 << EOF
-<<<<<<< HEAD:file1
+<<<<<<< HEAD
2
=======
3
->>>>>>> b7ca976... G:file1
+>>>>>>> b7ca976... G
EOF
test_expect_success 'stop on conflicting pick' '
index 129fa3000c9543804b43e74e27eec523e328bb5c..b3fbf659c003acbed785558c21950046b8caced8 100755 (executable)
"
cat > expect << EOF
-<<<<<<< HEAD:a1
+<<<<<<< HEAD
F
=======
G
->>>>>>> G:a1
+>>>>>>> G
EOF
test_expect_success "result contains a conflict" "test_cmp expect a1"
git ls-files --stage > out
cat > expect << EOF
-100644 da056ce14a2241509897fa68bb2b3b6e6194ef9e 1 a1
+100644 439cc46de773d8a83c77799b7cc9191c128bfcff 1 a1
100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2 a1
100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
EOF
git add binary-file &&
git commit -m binary2 &&
test_must_fail git merge F > merge.out 2> merge.err &&
- grep "Cannot merge binary files: HEAD:binary-file vs. F:binary-file" \
- merge.err
+ grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.err
'
test_expect_success 'mark rename/delete as unmerged' '