Re: [PATCH v2 7/8] cherry-pick: enforce `--keep-redundant-commits` incompatibility
- From
- phillip.wood123@gmail.com <phillip.wood123@gmail.com>
- Date
- Feb 25, 2024, 16:58 UTC
- Message-ID
- <f10cc07a-0e77-462c-bc86-ca0452c20a1c@gmail.com>
- In-Reply-To
- <17b669c4bfe6602f.70b1dd9aae081c6e.203dcd72f6563036@zivdesk>
Hi Brian
On 23/02/2024 06:23, Brian Lyles wrote:
Show 7 quoted lines
> 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.
Show 8 quoted lines
> 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.
Best Wishes
Phillip