git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -x: do not die without -i

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 17, 2016, 06:20 UTC
Message-ID
<56EA4CC1.9060602@kdbg.org>
In-Reply-To
<1458177584-11378-1-git-send-email-sbeller@google.com>
Am 17.03.2016 um 02:19 schrieb Stefan Beller:
Show 11 quoted lines
> -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
Previous: Stefan BellerNext: Johannes Schindelin
Message 2 of 6 in “rebase -x: do not die without -i”
  1. rebase -x: do not die without -iStefan Beller, Mar 17, 2016
  2. Johannes SixtMar 17, 2016
  3. Johannes SchindelinMar 17, 2016
  4. Junio C HamanoMar 17, 2016
  5. Johannes SchindelinMar 17, 2016
  6. Junio C HamanoMar 17, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.