git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Renold <martinxyz@gmx.ch>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Remove filename from conflict markers
Date: Wed, 1 Jul 2009 09:56:34 +0200	[thread overview]
Message-ID: <20090701075634.GA18326@old.homeip.net> (raw)
In-Reply-To: <20090701123310.6117@nanako3.lavabit.com>

On Wed, Jul 01, 2009 at 12:33:10PM +0900, Nanako Shiraishi wrote:
> 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.

Not true. The filename is still printed two times in the case of "git
merge", and four times with "git rebase".  The user still sees the required
information, there are just fewer repetitions.

The previous warning was a bit nicer for copy-paste, allthough I don't see
why it should print things so differently compared to textual conflicts.

> -     grep "Cannot merge binary files: HEAD:binary-file vs. F:binary-file" \
> +     grep "Cannot merge binary files: HEAD vs. F" \
>               merge.err

We could als fix that test by expecting the filename on stdout:

diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index 129fa30..0c6b1ea 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,8 +93,8 @@ 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" \
-               merge.err
+       grep "Cannot merge binary files: HEAD vs. F" merge.err
+       grep "Merge conflict in binary-file" merge.out
 '
 
 test_expect_success 'mark rename/delete as unmerged' '

bye,
Martin

  reply	other threads:[~2009-07-01  8:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28 15:45 [PATCH] Remove filename from conflict markers Martin Renold
2009-06-30 22:16 ` Junio C Hamano
2009-07-01  3:33   ` Nanako Shiraishi
2009-07-01  7:56     ` Martin Renold [this message]
2009-07-01  8:36       ` Junio C Hamano
2009-07-01 16:16         ` Martin Renold
2009-07-01 20:18           ` [PATCH/v2] " Martin Renold
2009-07-01 20:57             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090701075634.GA18326@old.homeip.net \
    --to=martinxyz@gmx.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nanako3@lavabit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).