1 |
On Thu, Jan 14, 2010 at 7:17 PM, Nguyen Thai Ngoc Duy <pclouds@×××××.com> wrote: |
2 |
> What you need is "git update-index --assume-unchanged". That feature |
3 |
> was introduced exactly to reduce stat(). |
4 |
> |
5 |
> BTW, if you know you only work in certain directories, doing "git diff |
6 |
> --stat <dir>", "git diff --cached --stat <dir>" instead of "git |
7 |
> status" would also help. Make aliases for them ("git dis" and "git |
8 |
> dics" in my ~/.gitconfig) so you don't have to type full command every |
9 |
> time. |
10 |
> |
11 |
|
12 |
This is very interesting; I did not know about this feature! Thanks |
13 |
for pointing it out :) |
14 |
|
15 |
I'll try this stuff out and report back once I have my portage tmpfs |
16 |
created again. |
17 |
|
18 |
> "git commit <dir>" and "git status <dir>" still do full tree lstat(). |
19 |
> I can try to make a patch or two to reduce lstat() in such cases. |
20 |
> |
21 |
|
22 |
That would definitely compliment the --stat option to git diff et al, |
23 |
making git more usable on repos with a huge no. of files. Now that I |
24 |
think about it, why does git <command> <dir> need to do a full tree |
25 |
stat at all? Doesn't the added specification of <dir> mean "I'm only |
26 |
interested in this dir for this command, other stuff doesn't matter"? |
27 |
|
28 |
> Does that help? |
29 |
|
30 |
Quite helpful indeed; now if only someone would implement recursive |
31 |
timestamps for directories... ;) |
32 |
|
33 |
-- |
34 |
~Nirbheek Chauhan |
35 |
|
36 |
Gentoo GNOME+Mozilla Team |