From: phillip.wood123@gmail.com Date: Sun, 25 Feb 2024 16:58:11 GMT Subject: Re: [PATCH v2 7/8] cherry-pick: enforce `--keep-redundant-commits` incompatibility Message-ID: In-Reply-To: <17b669c4bfe6602f.70b1dd9aae081c6e.203dcd72f6563036@zivdesk> Hi Brian On 23/02/2024 06:23, Brian Lyles wrote: > On Thu, Feb 22, 2024 at 10:35 AM Phillip Wood 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. Best Wishes Phillip