Re: [PATCH] clone: Remove constraint on --bare and --origin
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 2, 2021, 08:53 UTC
- Message-ID
- <8735rsqlal.fsf@evledraar.gmail.com>
- In-Reply-To
- <20210801082546.18543-1-oystwa@gmail.com>
On Sun, Aug 01 2021, Øystein Walle wrote:
Show 16 quoted lines
> This test has been present since long before clone was ported to C. Now > there is no need for it, and since df61c88979 (clone: also configure url > for bare clones, 2010-03-29) it's especially useful to allow both > options. > > Signed-off-by: Øystein Walle <oystwa@gmail.com> > --- > > A question on this constraint popped up on #git the other day. I > investigated a bit and found no particular reason for its existence. All > tests still pass (except the one removed here) and the behavior is as > expected. I realize it might have gone under the radar for 11 years but > it's still worth the noise to remove it, in my opinion. > > I wanted to include a bit on the reasoning for the original check in the > commit message but I couldn't find it.
Aside from working in Junio's reply as a summary of the original justification in the commit message for a v2...
Show 8 quoted lines
> -test_expect_success 'disallows --bare with --origin' ' > - > - test_must_fail git clone -o foo --bare parent clone-bare-o 2>err && > - test_debug "cat err" && > - test_i18ngrep -e "--bare and --origin foo options are incompatible" err > - > -' > -
This just removes the only test, if it's "especially useful" to allow both options let's replace this with a test that shows and tests for those use-cases.