All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Remy <alexandre.remy.contact@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: Git pathspecs difference in behavior between linux (wsl) and windows
Date: Thu, 13 May 2021 10:05:10 +0200	[thread overview]
Message-ID: <CAKToE5DgtW1Kuw4AE5+Am_=9gATN-S=xk1kYXMZUWvtdtNy_PQ@mail.gmail.com> (raw)
In-Reply-To: <81d06db6-fd91-7ec5-6aa5-84f69a227204@kdbg.org>

Thank you, that was that. I was misled by the doc and the single-quote
which indeed is specific to the linux platform.

Thank you again for your prompt reply.

Le jeu. 13 mai 2021 à 09:49, Johannes Sixt <j6t@kdbg.org> a écrit :
>
> Am 13.05.21 um 08:57 schrieb Alexandre Remy:
> > Hi,
> >
> > I do not understand why the same command works on linux and not on
> > windows. Is the pathspecs syntax differ or there is a problem on the
> > git windows version?
> >
> > * On windows (git version 2.31.1.windows.1)
> >
> > git status -- 'src/test.js'
> > On branch master
> > nothing to commit, working tree clean
> >
> >
> > * On linux (wsl: git version 2.25.1)
> >
> > git status -- 'src/test.js'
> > On branch master
> > Changes not staged for commit:
> >   (use "git add <file>..." to update what will be committed)
> >   (use "git restore <file>..." to discard changes in working directory)
> >         modified:   src/test.js
> > A classic git status gives the same result between linux and windows
> > (with correct file detected).
>
> Which shell did you use to invoke the Windows version? If it was from
> CMD or PowerShell, then you must not put the name in single-quotes:
>
>    git status -- src/test.js
>
> The reason is that the single-quote does not have a special meaning for
> CMD and PowerShell like it does for a POSIX shell.
>
> -- Hannes

  reply	other threads:[~2021-05-13  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  6:57 Git pathspecs difference in behavior between linux (wsl) and windows Alexandre Remy
2021-05-13  7:49 ` Johannes Sixt
2021-05-13  8:05   ` Alexandre Remy [this message]
2021-05-13  9:31     ` Alexandre Remy
2021-05-13 13:02       ` Johannes Sixt
2021-05-13 20:08         ` Junio C Hamano
2021-05-13 21:03           ` Johannes Sixt
2021-05-13 21:17             ` Alexandre Remy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKToE5DgtW1Kuw4AE5+Am_=9gATN-S=xk1kYXMZUWvtdtNy_PQ@mail.gmail.com' \
    --to=alexandre.remy.contact@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.