Re: git ls-files handles paths differently in Windows and Mac (probably Linux)
- From
Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
- Date
- Oct 12, 2010, 12:59 UTC
- Message-ID
- <C29949EA-5717-4BA3-936E-354FCB107877@jetbrains.com>
- In-Reply-To
- <AANLkTimB6s_yt6L59xpqsWO_yBsZxuVCiExFoSm9FcN1@mail.gmail.com>
Show 8 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".
"git status" doesn't fit, because it's porcelain (btw, git diff is also porcelain) and its output may change in time; "git status --porcelain" appeared only in 1.7.0, so I can't use it to work with older Git.
---------------------------------- Kirill Likhodedov JetBrains, Inc http://www.jetbrains.com "Develop with pleasure!"