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

Re: [PATCH v2] sequencer: honor --empty when a fixup!/squash! empties its target

From
Michael Montalbo <mmontalbo@gmail.com>
Date
Jul 10, 2026, 17:55 UTC
Message-ID
<alEw1Cxl_LkRQrx4@nixos>
In-Reply-To
<20260710-fz-autosquash-empty-v2-1-fa1e277e05f8@gmail.com>
On Fri, Jul 10, 2026 at 10:42:37AM -0700, Farid Zakaria wrote:
Show 21 quoted lines
>  
> +test_expect_success 'fixup! that empties its target is dropped with --empty=drop' '
> +	git reset --hard base &&
> +	test_commit --no-tag addX fileX 1 &&
> +	test_commit --no-tag changeX fileX 2 &&
> +	test_commit --no-tag later fileW hello &&
> +	echo 1 >fileX &&
> +	git commit -m "fixup! changeX" fileX &&
> +
> +	git rebase -i --autosquash --empty=drop HEAD~4 &&
> +
> +	git log --format=%s >actual &&
> +	! grep changeX actual &&
> +	grep addX actual &&
> +	grep later actual &&
> +	echo 1 >expect &&
> +	test_cmp expect fileX &&
> +	echo hello >expect &&
> +	test_cmp expect fileW
> +'
> +

Just a small drive-by comment. We should switch these from `grep` to `test_grep` (and `! grep` to `test_grep !`) here and for all the other tests. `test_grep` provides better error diagnostics, and bare `grep` used as an assertion in tests will be flagged by the linting process in the near future.

Previous: Farid Zakaria
Message 2 of 2 in “sequencer: honor --empty when a fixup!/squash! empties its target”
  1. sequencer: honor --empty when a fixup!/squash! empties its targetFarid Zakaria, Jul 10, 2026
  2. Michael MontalboJul 10, 2026

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.