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

Re: [PATCH v2] sequencer: avoid dropping fixup commit that targets self via commit-ish

From
Johannes Altmanninger <aclopte@gmail.com>
Date
Sep 22, 2022, 04:00 UTC
Message-ID
<YyvdwbE6oCeNn035@gmail.com>
In-Reply-To
<xmqqa66s36pt.fsf@gitster.g>
On Wed, Sep 21, 2022 at 11:47:26AM -0700, Junio C Hamano wrote:
Show 26 quoted lines
> Johannes Altmanninger <aclopte@gmail.com> writes:
> 
> > +test_expect_success 'auto squash that matches regex' '
> > +	git reset --hard base &&
> > +	git commit --allow-empty -m "hay needle hay" &&
> > +	git commit --allow-empty -m "fixup! :/needle" &&
> > +	GIT_SEQUENCE_EDITOR="cat >tmp" git rebase --autosquash -i HEAD^^ &&
> > +	sed -ne "/^[^#]/{s/[0-9a-f]\{7,\}/HASH/g;p;}" tmp >actual &&
> > +	cat <<-EOF >expect &&
> > +	pick HASH hay needle hay # empty
> > +	fixup HASH fixup! :/needle # empty
> > +	EOF
> > +	test_cmp expect actual
> > +'
> 
> hint: Waiting for your editor to close the file...
> Successfully rebased and updated refs/heads/main.
> --- expect      2022-09-21 18:45:27.617530848 +0000
> +++ actual      2022-09-21 18:45:27.613530478 +0000
> @@ -1,2 +1,2 @@
>  pick HASH hay needle hay # empty
> -fixup HASH fixup! :/needle # empty
> +pick HASH fixup! :/needle # empty
> not ok 11 - auto squash that matches regex
> 
> That does not look very good X-<.

Sorry the v2 of this test case is very misleading, should probably drop this test entirely. It's been a long a day so I'll send v3 another day (if needed).

Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 19 in “[BUG] fixup commit is dropped during rebase if subject = branch name”
  1. Erik Cervin EdinSep 17, 2022
  2. Junio C HamanoSep 17, 2022
  3. Erik Cervin EdinSep 18, 2022
  4. Johannes AltmanningerSep 17, 2022
  5. sequencer: avoid dropping fixup commit that targets self via commit-ishJohannes Altmanninger, Sep 18, 2022
  6. Erik Cervin EdinSep 18, 2022
  7. Johannes AltmanningerSep 18, 2022
  8. Junio C HamanoSep 19, 2022
  9. Junio C HamanoSep 19, 2022
  10. Johannes AltmanningerSep 20, 2022
  11. Junio C HamanoSep 19, 2022
  12. sequencer: avoid dropping fixup commit that targets self via commit-ishJohannes Altmanninger, Sep 20, 2022
  13. Phillip WoodSep 20, 2022
  14. Junio C HamanoSep 21, 2022
  15. Johannes AltmanningerSep 22, 2022
  16. Junio C HamanoSep 22, 2022
  17. sequencer: avoid dropping fixup commit that targets self via commit-ishJohannes Altmanninger, Sep 24, 2022
  18. Junio C HamanoSep 19, 2022
  19. Johannes AltmanningerSep 20, 2022

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.