diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-01-14 22:02:21 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-15 20:40:25 -0800 |
commit | 688cd6d2b9335f2ac20d02996215a0e6da1779b5 (patch) | |
tree | 74e37b0dfe1491b2e96df33d8bcf4718a9c87dc2 /wt-status.c | |
parent | 1f73566af5bec28cd8489c6139a9ede95817349c (diff) | |
download | git-688cd6d2b9335f2ac20d02996215a0e6da1779b5.tar.gz |
status: only touch path we may need to check
This patch gets rid of whole-tree cache refresh and untracked file
search. Instead only specified path will be looked at.
Again some numbers on gentoo-x86, ~80k files:
Unmodified Git:
$ time git st eclass/
nothing to commit (working directory clean)
real 0m3.211s
user 0m1.977s
sys 0m1.135s
Modified Git:
$ time ~/w/git/git st eclass/
nothing to commit (working directory clean)
real 0m1.587s
user 0m1.426s
sys 0m0.111s
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index 5d56988016..65feb29f2e 100644 --- a/wt-status.c +++ b/wt-status.c @@ -343,7 +343,7 @@ static void wt_status_collect_untracked(struct wt_status *s) DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES; setup_standard_excludes(&dir); - fill_directory(&dir, NULL); + fill_directory(&dir, s->pathspec); for (i = 0; i < dir.nr; i++) { struct dir_entry *ent = dir.entries[i]; if (!cache_name_is_other(ent->name, ent->len)) |