Re: [PATCH v3 7/7] rm: honor sparse checkout patterns
- From
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
- Date
- Mar 22, 2021, 01:08 UTC
- Message-ID
- <CAHd-oW7bycPCnAtme1+LnKxnBbUFdaoi11ff7J5OPgcfqExktw@mail.gmail.com>
- In-Reply-To
- <87h7l4qfdn.fsf@evledraar.gmail.com>
On Sun, Mar 21, 2021 at 8:03 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 29 quoted lines
>
>
> On Fri, Mar 12 2021, Matheus Tavares wrote:
>
> > + test_expect_success "rm${opt:+ $opt} does not remove sparse entries" '
> > + git sparse-checkout set a &&
> > + test_must_fail git rm $opt b 2>stderr &&
> > + test_i18ncmp b_error_and_hint stderr &&
> > + git ls-files --error-unmatch b
> > + '
> > +done
> > +
> > +test_expect_success 'recursive rm does not remove sparse entries' '
> > + git reset --hard &&
> > + git sparse-checkout set sub/dir &&
> > + git rm -r sub &&
> > + git status --porcelain -uno >actual &&
> > + echo "D sub/dir/e" >expected &&
> > + test_cmp expected actual
> > +'
> > +
> > +test_expect_success 'rm obeys advice.updateSparsePath' '
> > + git reset --hard &&
> > + git sparse-checkout set a &&
> > + test_must_fail git -c advice.updateSparsePath=false rm b 2>stderr &&
> > + test_i18ncmp sparse_entry_b_error stderr
>
> Calls to the test_i18ncmp function should just be test_cmp now. See
> 1108cea7f8e (tests: remove most uses of test_i18ncmp, 2021-02-11).Thanks for letting me know, I'll fix it for the next version.