Re: [PATCH] rm: honor sparse checkout patterns
- From
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
- Date
- Nov 15, 2020, 20:12 UTC
- Message-ID
- <CAHd-oW7X3fEM8PDFWQVc4kG_vfkY4LbvADzJfQrocjyaAr28TQ@mail.gmail.com>
- In-Reply-To
- <70ae5b1d-b1d2-1b3f-11cf-8e5ceafe6048@gmail.com>
Hi, Stolee and Elijah
Thank you both for the comments. I'll try to send v2 soon.
On Fri, Nov 13, 2020 at 10:47 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 9 quoted lines
> > On 11/12/2020 6:54 PM, Elijah Newren wrote: > > > > Do we also want to include a testcase where the user specifies a > > directory and part of that directory is within the sparsity paths and > > part is out? E.g. 'git sparse-checkout set /sub/dir && git rm -r > > sub' ? > > That is definitely an interesting case.
I've added the test [1], but it's failing on Windows and I'm not quite sure why. The trash dir artifact shows that `git sparse-checkout set /sub/dir` produced the following path on the sparse-checkout file: "D:/a/git/git/git-sdk-64-minimal/sub/dir".
If I change the setup cmd to `git sparse-checkout set sub/dir` (i.e. without the root slash), it works as expected. Could this be a bug, or am I missing something?
[1]: https://github.com/matheustavares/git/commit/656bffa1793ce86b638d7ad1da2452103ce8b14b#diff-69312bb98fb0cf46e6906e3384c11529f3f04713d331a85d67fc77a3e43944f9R919