Git development
 help / color / mirror / Atom feed
From: Michael Montalbo <mmontalbo@gmail.com>
To: Farid Zakaria <farid.m.zakaria@gmail.com>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>,
	 Elijah Newren <newren@gmail.com>, Patrick Steinhardt <ps@pks.im>,
	 Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] sequencer: honor --empty when a fixup!/squash! empties its target
Date: Fri, 10 Jul 2026 10:55:33 -0700	[thread overview]
Message-ID: <alEw1Cxl_LkRQrx4@nixos> (raw)
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:

>  
> +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.

      reply	other threads:[~2026-07-10 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 17:42 [PATCH v2] sequencer: honor --empty when a fixup!/squash! empties its target Farid Zakaria
2026-07-10 17:55 ` Michael Montalbo [this message]

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=alEw1Cxl_LkRQrx4@nixos \
    --to=mmontalbo@gmail.com \
    --cc=farid.m.zakaria@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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