git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git ls-files handles paths differently in Windows and Mac (probably Linux)

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 12, 2010, 15:24 UTC
Message-ID
<AANLkTik39Rmjje67KeBYeJ6FkuOxp88e1nBPxXarBZf8@mail.gmail.com>
In-Reply-To
<C29949EA-5717-4BA3-936E-354FCB107877@jetbrains.com>

On Tue, Oct 12, 2010 at 14:59, Kirill Likhodedov <Kirill.Likhodedov@jetbrains.com> wrote:

Show 10 quoted lines
>>> The behavior of ls-files is inconsistent in Windows and Mac.
>>>
>>> I want to see which files were changed in the specific directory of my working tree, so I call ls-files:
>>>> git ls-files -douvm --exclude-standard -- MYDIR
>>>
>>
>> Well, it is an... unconventional way to do that. May I suggest you consider
>> using "git diff --name-status" or just "git status" next time?
>
> My tests show that "git ls-files -douvm" is faster than "git diff --name-status".
I find it hard to believe (the tool was definitely not mean for this).
> "git status" doesn't fit, because it's porcelain (btw, git diff is also porcelain) and its output may change in time;

There is always "git diff-files", but I doubt the output of "git diff --name-status" will change soon. Besides, if you have to just check if the tree under a path is changed you can always use --exit-code or --quiet to "git diff", it will speed them up.

Previous: Kirill LikhodedovNext: Johannes Sixt
Message 10 of 13 in “git ls-files handles paths differently in Windows and Mac (probably Linux)”
  1. Kirill LikhodedovOct 12, 2010
  2. Alex RiesenOct 12, 2010
  3. Kirill LikhodedovOct 12, 2010
  4. Kirill LikhodedovOct 12, 2010
  5. Alex RiesenOct 12, 2010
  6. Kirill LikhodedovOct 13, 2010
  7. Alex RiesenOct 13, 2010
  8. Jakub NarebskiOct 13, 2010
  9. Kirill LikhodedovOct 13, 2010
  10. Alex RiesenOct 12, 2010
  11. Johannes SixtOct 12, 2010
  12. Kirill LikhodedovOct 12, 2010
  13. Johannes SixtOct 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.