From: Junio C Hamano <gitster@pobox•com>
To: Johannes Sixt <j6t@kdbg•org>
Cc: Jonathan Nieder <jrnieder@gmail•com>,
Stefan Beller <stefanbeller@gmail•com>,
Johannes.Schindelin@gmx•de, barkalow@iabervon•org,
git@vger•kernel.org
Subject: Re: [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged
Date: Wed, 13 Aug 2014 13:02:27 -0700 [thread overview]
Message-ID: <xmqqr40k2m5o.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <53EBBCC3.4060309@kdbg.org> (Johannes Sixt's message of "Wed, 13 Aug 2014 21:30:11 +0200")
Johannes Sixt <j6t@kdbg•org> writes:
> Am 13.08.2014 20:59, schrieb Junio C Hamano:
>> diff --git a/t/t7201-co.sh b/t/t7201-co.sh
>> index 0c9ec0a..cedbb6a 100755
>> --- a/t/t7201-co.sh
>> +++ b/t/t7201-co.sh
>> @@ -223,6 +223,23 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
>> test_cmp two expect
>> '
>>
>> +test_expect_success 'switch to another branch while carrying a deletion' '
>> +
>> + git checkout -f master && git reset --hard && git clean -f &&
>> + git rm two &&
>> +
>> + test_must_fail git checkout simple 2>errs &&
>> + test_i18ngrep overwritten errs &&
>> +
>> + git checkout --merge simple 2>errs &&
>> + ! test_i18ngrep overwritten errs &&
>
> This must be written as
>
> test_i18ngrep ! overwritten errs &&
Oops. Thanks for spotting.
> I see a few wrong usages in the current code base. Here's a fix.
Will apply; thanks.
> --- >8 ---
> Subject: [PATCH] tests: fix negated test_i18ngrep calls
>
> The helper function test_i18ngrep pretends that it found the expected
> results when it is running under GETTEXT_POISON. For this reason, it must
> not be used negated like so
>
> ! test_i18ngrep foo bar
>
> because the test case would fail under GETTEXT_POISON. The function offers
> a special syntax to test that a pattern is *not* found:
>
> test_i18ngrep ! foo bar
>
> Convert incorrect uses to this syntax.
>
> Signed-off-by: Johannes Sixt <j6t@kdbg•org>
> ---
> t/t4018-diff-funcname.sh | 8 ++++----
> t/t9800-git-p4-basic.sh | 2 +-
> t/t9807-git-p4-submit.sh | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
> index 34591c2..1dbaa38 100755
> --- a/t/t4018-diff-funcname.sh
> +++ b/t/t4018-diff-funcname.sh
> @@ -52,15 +52,15 @@ do
> echo "*.java diff=$p" >.gitattributes &&
> test_expect_code 1 git diff --no-index \
> A.java B.java 2>msg &&
> - ! test_i18ngrep fatal msg &&
> - ! test_i18ngrep error msg
> + test_i18ngrep ! fatal msg &&
> + test_i18ngrep ! error msg
> '
> test_expect_success "builtin $p wordRegex pattern compiles" '
> echo "*.java diff=$p" >.gitattributes &&
> test_expect_code 1 git diff --no-index --word-diff \
> A.java B.java 2>msg &&
> - ! test_i18ngrep fatal msg &&
> - ! test_i18ngrep error msg
> + test_i18ngrep ! fatal msg &&
> + test_i18ngrep ! error msg
> '
> done
>
> diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
> index 665607c..5b56212 100755
> --- a/t/t9800-git-p4-basic.sh
> +++ b/t/t9800-git-p4-basic.sh
> @@ -145,7 +145,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
> test_expect_code 1 git p4 clone --dest="$git" //depot >errs 2>&1
> ) &&
> cat errs &&
> - ! test_i18ngrep Traceback errs
> + test_i18ngrep ! Traceback errs
> '
>
> # Hide a file from p4d, make sure we catch its complaint. This won't fail in
> diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
> index 7fab2ed..1f74a88 100755
> --- a/t/t9807-git-p4-submit.sh
> +++ b/t/t9807-git-p4-submit.sh
> @@ -404,7 +404,7 @@ test_expect_success 'submit --prepare-p4-only' '
> git p4 submit --prepare-p4-only >out &&
> test_i18ngrep "prepared for submission" out &&
> test_i18ngrep "must be deleted" out &&
> - ! test_i18ngrep "everything below this line is just the diff" out
> + test_i18ngrep ! "everything below this line is just the diff" out
> ) &&
> (
> cd "$cli" &&
next prev parent reply other threads:[~2014-08-13 20:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 19:44 [PATCH] unpack-tree.c: remove dead code Stefan Beller
2014-08-12 18:13 ` Junio C Hamano
2014-08-12 21:15 ` Stefan Beller
2014-08-12 22:24 ` Junio C Hamano
2014-08-12 23:57 ` [PATCH 0/3] " Jonathan Nieder
2014-08-12 23:59 ` [PATCH 1/3] unpack-trees: simplify 'all other failures' case Jonathan Nieder
2014-08-13 0:00 ` [PATCH 2/3] unpack-trees: use 'cuddled' style for if-else cascade Jonathan Nieder
2014-08-13 14:52 ` Ronnie Sahlberg
2014-08-13 0:03 ` [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged Jonathan Nieder
2014-08-13 0:38 ` Junio C Hamano
2014-08-13 17:48 ` Junio C Hamano
2014-08-13 18:59 ` Junio C Hamano
2014-08-13 19:30 ` Johannes Sixt
2014-08-13 20:02 ` Junio C Hamano [this message]
2014-08-13 6:41 ` [PATCH 0/3] Re: [PATCH] unpack-tree.c: remove dead code Stefan Beller
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=xmqqr40k2m5o.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=barkalow@iabervon$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
--cc=jrnieder@gmail$(echo .)com \
--cc=stefanbeller@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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