Re: [PATCH v2 7/8] cherry-pick: enforce `--keep-redundant-commits` incompatibility
- From
Brian Lyles <brianmlyles@gmail.com>
- Date
- Feb 26, 2024, 03:04 UTC
- Message-ID
- <17b74aa40b428632.70b1dd9aae081c6e.203dcd72f6563036@zivdesk>
- In-Reply-To
- <f10cc07a-0e77-462c-bc86-ca0452c20a1c@gmail.com>
Hi Phillip
On Sun, Feb 25, 2024 at 10:58 AM <phillip.wood123@gmail.com> wrote:
Show 29 quoted lines
> Hi Brian > > On 23/02/2024 06:23, Brian Lyles wrote: >> On Thu, Feb 22, 2024 at 10:35 AM Phillip Wood <phillip.wood123@gmail.com> wrote: >> >>> Well spotted, do we really need a new test file just for this though? I >>> wonder if the new test would be better off living in >>> t3505-cherry-pick-empty.sh or t3507-cherry-pick-conflict.sh >> >> I was modelling this off of 't3422-rebase-incompatible-options.sh'. > > The rebase case is more complicated due to different options being > supported by the two different backends. Thankfully here we only have to > worry about options that are incompatible with "--continue/--abort" and > so adding "--continue rejects --foo" into the file that tests option > "--foo" keeps everything together. > >> Additionally, I do feel like these tests are only tangentially related >> to the tests that actually exercise the features themselves. Notably, >> the setup requirements are drastically different (simpler) since the >> test should fail long before any setup actually matters. For that >> reason, I think a separate file where other future tests for >> incompatible options can also live does make sense. >> >> Is there any particular downside to the new file that I am unaware of? > > The main downside is that it spreads the tests for a particular option > over several test files. There is also an overhead in setting up the > repository at the start of each test file.
That makes sense. I'll move these tests into `t3505-cherry-pick-empty.sh` for v3, along with the corresponding incompatibility tests for `--empty` introduced in the ultimate commit for the series.
-- Thank you, Brian Lyles