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

Re: [PATCH 2/2] [WIP] sequencer.c: carry forward notes on HEAD across "rebase -x"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 12, 2021, 12:26 UTC
Message-ID
<87k0qcfthd.fsf@evledraar.gmail.com>
In-Reply-To
<20210312030107.1849942-3-gitster@pobox.com>
On Fri, Mar 12 2021, Junio C Hamano wrote:
Show 8 quoted lines
> +# NEEDSWORK: Fix c762aada1ab3a2c428c with s/@/HEAD/;
> +
>  test_expect_success 'rebase -x with empty command fails' '
>  	test_when_finished "git rebase --abort ||:" &&
>  	test_must_fail env git rebase -x "" @ 2>actual &&
> @@ -867,6 +869,22 @@ test_expect_success 'rebase -i can copy notes over a fixup' '
>  	test_cmp expect output
>  '

I eyeballed c762aada1ab (rebase -x: sanity check command, 2019-01-29) for a bit and still don't quite know what this HEAD v.s. @ is about in that context, seems this is a stray FIXME comment for an unrelated test.

Maybe it would be better to have test_expect_failure etc. here as appropriate?

Show 19 quoted lines
> +test_expect_success 'notes are copied even rebase -x changes HEAD' '
> +	git reset --hard n3 &&
> +	git rebase -x "git commit --amend --no-edit" n1^1 &&
> +	git log --format="%s <%N>" n1^1..n3 >expect &&
> +	git log --format="%s <%N>" n1^1..HEAD >actual &&
> +	test_cmp expect actual
> +'
> +
> +test_expect_failure 'notes are copied even rebase -x changes HEAD' '
> +	git reset --hard n3 &&
> +	git rebase -x "git commit --amend -m tweak" n1^1 &&
> +	git log --format="tweak <%N>" n1^1..n3 >expect &&
> +	git log --format="%s <%N>" n1^1..HEAD >actual &&
> +	test_cmp expect actual
> +'
> +
>  test_expect_success 'rebase while detaching HEAD' '
>  	git symbolic-ref HEAD &&
>  	grandparent=$(git rev-parse HEAD~2) &&
Previous: Phillip WoodNext: Phillip Wood
Message 6 of 8 in “[BUG] cmd given to "rebase -x cmd" cannot see the original HEAD?”
  1. Junio C HamanoMar 11, 2021
  2. 0/2 "rebase -x cmd" loses notesJunio C Hamano, Mar 12, 2021
  3. 1/2 sequencer.c: make commit_post_rewrite() take two object namesJunio C Hamano, Mar 12, 2021
  4. 2/2 [WIP] sequencer.c: carry forward notes on HEAD across "rebase -x"Junio C Hamano, Mar 12, 2021
  5. Phillip WoodMar 12, 2021
  6. Ævar Arnfjörð BjarmasonMar 12, 2021
  7. Phillip WoodMar 12, 2021
  8. [WIP][PATCH] rebase: update the list of rewritten commits when amending pickPhillip Wood, Mar 12, 2021

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.