On Thu, Jan 14, 2010 at 7:17 PM, Nguyen Thai Ngoc Duy <pclo...@gmail.com> wrote:
> What you need is "git update-index --assume-unchanged". That feature
> was introduced exactly to reduce stat().
>
> BTW, if you know you only work in certain directories, doing "git diff
> --stat <dir>", "git diff --cached --stat <dir>" instead of "git
> status" would also help. Make aliases for them ("git dis" and "git
> dics" in my ~/.gitconfig) so you don't have to type full command every
> time.
>

This is very interesting; I did not know about this feature! Thanks
for pointing it out :)

I'll try this stuff out and report back once I have my portage tmpfs
created again.

> "git commit <dir>" and "git status <dir>" still do full tree lstat().
> I can try to make a patch or two to reduce lstat() in such cases.
>

That would definitely compliment the --stat option to git diff et al,
making git more usable on repos with a huge no. of files. Now that I
think about it, why does git <command> <dir> need to do a full tree
stat at all? Doesn't the added specification of <dir> mean "I'm only
interested in this dir for this command, other stuff doesn't matter"?

> Does that help?

Quite helpful indeed; now if only someone would implement recursive
timestamps for directories... ;)

-- 
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team

Reply via email to