From: Kirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
To: git@vger.kernel.org
Subject: git ls-files handles paths differently in Windows and Mac (probably Linux)
Date: Tue, 12 Oct 2010 16:14:10 +0400 [thread overview]
Message-ID: <3C33A244-2449-4A3C-A8B5-2060CE61EE04@jetbrains.com> (raw)
Hi all,
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
On Mac (and probably on Linux) git inspects the content of MYDIR and gives me the status of not-indexed changes in this directory.
On Windows git gives the same result (only changes in MYDIR), but it scans the whole repository!
I noticed it because it took a long time to scan a small directory, and then I confirmed it by using monitoring tools:
on Windows I used Process Monitor, on Mac I used FileMon - both give the list of accessed files in the real time.
To narrow the search scope to MYDIR I have to add "/**" and thus call:
> git ls-files -douvm --exclude-standard -- MYDIR/**
This works as expected - scans only MYDIR.
But I can't call it with several directories:
> git ls-files -douvm --exclude-standard -- MYDIR/** ANOTHERDIR/**
This doesn't work as expected and scans the whole repo.
So to scan two directories I have to call ls-files twice.
Looks like a bug. Maybe a bug of porting Git to windows, but the behavior is the same on msys-git and cygwin-git.
It was tested with Git 1.7.1 on Mac,
MsysGit 1.7.3.1 and 1.7.0.2,
CygwinGit 1.7.0.4.
Thanks.
----------------------------------
Kirill Likhodedov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
next reply other threads:[~2010-10-12 12:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-12 12:14 Kirill Likhodedov [this message]
2010-10-12 12:51 ` git ls-files handles paths differently in Windows and Mac (probably Linux) Alex Riesen
2010-10-12 12:59 ` Kirill Likhodedov
2010-10-12 13:52 ` Kirill Likhodedov
2010-10-12 15:25 ` Alex Riesen
2010-10-13 9:09 ` Kirill Likhodedov
2010-10-13 10:35 ` Alex Riesen
2010-10-13 11:20 ` Jakub Narebski
2010-10-13 11:35 ` Kirill Likhodedov
2010-10-12 15:24 ` Alex Riesen
2010-10-12 13:11 ` Johannes Sixt
2010-10-12 13:24 ` Kirill Likhodedov
2010-10-12 13:28 ` Johannes Sixt
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C33A244-2449-4A3C-A8B5-2060CE61EE04@jetbrains.com \
--to=kirill.likhodedov@jetbrains.com \
--cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).