summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f73566)
raw | patch | inline | side by side (parent: 1f73566)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Thu, 14 Jan 2010 15:02:21 +0000 (22:02 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Jan 2010 04:40:25 +0000 (20:40 -0800) |
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>
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>
builtin-commit.c | patch | blob | history | |
wt-status.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index 592b10396d1d6aa25d5d1c0aa27556c93c219877..d5d8eb68cc4dccd0f9f0e634b0d402277933fcfc 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
s.pathspec = get_pathspec(prefix, argv);
read_cache();
- refresh_cache(REFRESH_QUIET|REFRESH_UNMERGED);
+ refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
s.in_merge = in_merge;
wt_status_collect(&s);
diff --git a/wt-status.c b/wt-status.c
index 5d569880163cccec91fdf1e9d50e03a6b5314d58..65feb29f2ee87b85a21907c5087cfcdd6c3be756 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
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))