Re: [PATCH] Remove filename from conflict markers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Junio C Hamano <gitster@xxxxxxxxx>:

> Martin Renold <martinxyz@xxxxxx> writes:
>
>> Put filenames into the conflict markers only when they are different.
>> Otherwise they are redundant information clutter.
>>
>> Signed-off-by: Martin Renold <martinxyz@xxxxxx>
>> ---
>>  merge-recursive.c             |    9 +++++++--
>>  t/t3404-rebase-interactive.sh |    4 ++--
>
> The change seems to break more tests than just 3404.
>
> I also wondered briefly if it will break people's existing scripts;
> I suspect it will not likely to be a huge problem.

I needed to apply the attached patch to make the tests pass. The last part clearly shows that this change introduces a usability regression. In the error message the user can no longer see which file was problematic.

I request Martin's patch to be dropped.

 t/t6024-recursive-merge.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index 129fa30..a9c4a02 100755
--- a/t/t6024-recursive-merge.sh
+++ b/t/t6024-recursive-merge.sh
@@ -65,18 +65,18 @@ test_expect_success "combined merge conflicts" "
 "
 
 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
@@ -93,7 +93,7 @@ test_expect_success 'refuse to merge binary files' '
 	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" \
+	grep "Cannot merge binary files: HEAD vs. F" \
 		merge.err
 '

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]