From: Eric Sunshine <sunshine@sunshineco.com>
To: Philippe Blain via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Philippe Blain <levraiphilippeblain@gmail.com>
Subject: Re: [PATCH 1/3] rebase -r: do create merge commit after empty resolution
Date: Fri, 28 Mar 2025 13:23:40 -0400 [thread overview]
Message-ID: <CAPig+cThwsBdumXB3m2ZA-_tmDVTMojkYx7_YxNp49eK6a2HMg@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cS92W_gYuNsaTvQxiP3xBK7Wpg0__uVkgAU1x0OFJUZgQ@mail.gmail.com>
On Fri, Mar 28, 2025 at 1:14 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Fri, Mar 28, 2025 at 1:03 PM Philippe Blain via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> > diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
> > +test_expect_success '--continue creates merge commit after empty resolution' '
> > + [...]
> > + git commit --no-edit &&
> > + FAKE_LINES="1 2 3 5 6 7 8 9 10 11" &&
> > + export FAKE_LINES &&
> > + test_must_fail git rebase -ir main &&
>
> I don't think you want to be setting FAKE_LINES like this since doing
> so will pollute the environment for all tests following this one. You
> can find existing precedent in this script which demonstrates the
> correct way to handle this case. Specifically, you'd want:
>
> test_must_fail env FAKE_LINES="1 2 3 5 6 7 8 9 10 11" \
> git rebase -ir main &&
To clarify, by "pollute", I mean that it can impact subsequent tests
which don't take care to override FAKE_LINES as necessary. There
certainly are test scripts which use the:
FAKE_LINES=... &&
export FAKE_LINES &&
form successfully, but such scripts are careful to override/set
FAKE_LINES in every test. This particular script (t3418), on the other
hand, does not otherwise employ the form in which the variable is
exported, so introducing it in a test which is inserted into the
middle of the script feels dangerous.
next prev parent reply other threads:[~2025-03-28 17:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 17:03 [PATCH 0/3] rebase -r: a bugfix and two status-related improvements Philippe Blain via GitGitGadget
2025-03-28 17:03 ` [PATCH 1/3] rebase -r: do create merge commit after empty resolution Philippe Blain via GitGitGadget
2025-03-28 17:14 ` Eric Sunshine
2025-03-28 17:23 ` Eric Sunshine [this message]
2025-04-01 16:17 ` Johannes Schindelin
2025-03-31 15:37 ` Phillip Wood
2025-03-28 17:03 ` [PATCH 2/3] wt-status: also abbreviate 'merge' and 'fixup -C' lines during rebase Philippe Blain via GitGitGadget
2025-03-31 15:37 ` Phillip Wood
2025-03-28 17:03 ` [PATCH 3/3] wt-status: suggest 'git rebase --continue' to conclude 'merge' instruction Philippe Blain via GitGitGadget
2025-03-31 15:38 ` Phillip Wood
2025-04-01 16:22 ` Johannes Schindelin
2025-04-02 13:09 ` phillip.wood123
2025-04-03 12:17 ` Johannes Schindelin
2025-04-03 15:08 ` phillip.wood123
2025-04-04 11:41 ` Johannes Schindelin
2025-04-04 14:13 ` Phillip Wood
2025-03-31 15:38 ` [PATCH 0/3] rebase -r: a bugfix and two status-related improvements Phillip Wood
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=CAPig+cThwsBdumXB3m2ZA-_tmDVTMojkYx7_YxNp49eK6a2HMg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=levraiphilippeblain@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).