author | Junio C Hamano <gitster@pobox.com> | |
Fri, 1 Feb 2008 04:23:25 +0000 (20:23 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 5 Feb 2008 08:46:49 +0000 (00:46 -0800) | ||
commit | 6831a88ac03759a8133f10ffd52ad235a081a8a3 | |
tree | 1f9dcec12142df59bcaff2200349fbef78ee4100 | tree | snapshot |
parent | d6b8fc303b389b026f2bf9918f6f83041488989b | commit | diff |
gitignore: lazily find dtype
When we process "foo/" entries in gitignore files on a system
that does not have d_type member in "struct dirent", the earlier
implementation ran lstat(2) separately when matching with
entries that came from the command line, in-tree .gitignore
files, and $GIT_DIR/info/excludes file.
This optimizes it by delaying the lstat(2) call until it becomes
absolutely necessary.
The initial idea for this change was by Jeff King, but I
optimized it further to pass pointers to around.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When we process "foo/" entries in gitignore files on a system
that does not have d_type member in "struct dirent", the earlier
implementation ran lstat(2) separately when matching with
entries that came from the command line, in-tree .gitignore
files, and $GIT_DIR/info/excludes file.
This optimizes it by delaying the lstat(2) call until it becomes
absolutely necessary.
The initial idea for this change was by Jeff King, but I
optimized it further to pass pointers to around.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-ls-files.c | diff | blob | history | |
dir.c | diff | blob | history | |
dir.h | diff | blob | history | |
unpack-trees.c | diff | blob | history |