Re: [PATCH] rm: honor sparse checkout patterns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 23, 2020 at 10:23 AM Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
>
> Hi Matheus,
>
> On Mon, 16 Nov 2020, Matheus Tavares Bernardino wrote:
>
> > On Sun, Nov 15, 2020 at 6:42 PM Johannes Sixt <j6t@xxxxxxxx> wrote:
> > >
> > > Am 15.11.20 um 21:12 schrieb Matheus Tavares Bernardino:
> > > > 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@xxxxxxxxx> wrote:
> > > >>
> > > >> 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 'git sparse-checkout' is run from a bash command line, I would not be
> > > surprised if the absolute path is munched in the way that you observe,
> > > provided that D:/a/git/git/git-sdk-64-minimal is where your MinGW
> > > subsystem is located. I that the case?
> >
> > Yeah, that must be it, thanks. I didn't run the command myself as I'm
> > not on Windows, but D:/a/git/git/git-sdk-64-minimal must be the path
> > where MinGW was installed by our GitHub Actions script, then. I'll use
> > "sub/dir" without the root slash in t3600 to avoid the conversion.
> > Thanks again!
>
> In the `windows-test` job, the construct `$(pwd)` will give you the
> Windows form (`D:/a/git/git/git-sdk-64-minimal`) whereas the `$PWD` form
> will give you the Unix-y form (`/`). What form to use depends on the
> context (if the absolute path comes from a shell script, the Unix-y form,
> if the absolute path comes from `git.exe` itself, the Windows form).

Got it, thanks for the explanation!



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux