git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Stefan Beller <sbeller@google.com>
Cc: gitster@pobox.com, git@vger.kernel.org,
	Matthieu.Moy@grenoble-inp.fr, johannes.schindelin@gmail.com,
	Lucien.Kong@ensimag.imag.fr
Subject: Re: [PATCH] rebase -x: do not die without -i
Date: Thu, 17 Mar 2016 07:20:49 +0100	[thread overview]
Message-ID: <56EA4CC1.9060602@kdbg.org> (raw)
In-Reply-To: <1458177584-11378-1-git-send-email-sbeller@google.com>

Am 17.03.2016 um 02:19 schrieb Stefan Beller:
> -test_expect_success 'rebase --exec without -i shows error message' '
> +test_expect_success 'rebase --exec works without -i ' '
>   	git reset --hard execute &&
> -	set_fake_editor &&
> -	test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual &&
> -	echo "The --exec option must be used with the --interactive option" >expected &&
> -	test_i18ncmp expected actual
> +	git rebase --exec true HEAD~2 2>actual2 >actual1 &&
> +	echo "Successfully rebased and updated refs/heads/autosquash_expected." >expected &&
> +	test_i18ncmp expected actual2 &&
> +	test_line_count = 2 actual1

We don't have an explicit guideline, but please do not check stderr 
output using test_cmp or test_i18ncmp. The reason is that some shells 
write trace output to stderr when run under 'set -x'. That is, when you 
run this test as

      ./t3404-rebase-interactive.sh -x -v

it will fail because there is now more text in actual2 than expected. We 
have a number of cases like this elsewhere, but we should not stack new 
cases on the pile.

Please use test_i18ngrep:

	test_i18ngrep "Successfully rebased and updated" actual2 &&
	test_line_count = 2 actual1

-- Hannes

  reply	other threads:[~2016-03-17  6:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  1:19 [PATCH] rebase -x: do not die without -i Stefan Beller
2016-03-17  6:20 ` Johannes Sixt [this message]
2016-03-17  6:48 ` Johannes Schindelin
2016-03-17  7:50 ` Junio C Hamano
2016-03-17 13:11   ` Johannes Schindelin
2016-03-17 18:10     ` 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=56EA4CC1.9060602@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=Lucien.Kong@ensimag.imag.fr \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmail.com \
    --cc=sbeller@google.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).