summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-21 04:28:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-21 04:28:50 (GMT)
commite98f80f50bf9b78aab8cea6184fd708259d0c3b3 (patch)
tree71457289ee60e6a80b14ab867c987b16f637eb3b
parentadd0951ab0bee43b5f634d1be68a7a80f627c18f (diff)
parent4e1a7baa2e466afded9ff50b9a4539b24dbd3584 (diff)
downloadgit-e98f80f50bf9b78aab8cea6184fd708259d0c3b3.zip
git-e98f80f50bf9b78aab8cea6184fd708259d0c3b3.tar.gz
git-e98f80f50bf9b78aab8cea6184fd708259d0c3b3.tar.bz2
Merge branch 'nd/status-partial-refresh'
* nd/status-partial-refresh: rm: only refresh entries that we may touch status: only touch path we may need to check
-rw-r--r--builtin-commit.c2
-rw-r--r--builtin-rm.c3
-rw-r--r--wt-status.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index fedcda0..55676fd 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -1047,7 +1047,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
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/builtin-rm.c b/builtin-rm.c
index 57975db..f3772c8 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -169,9 +169,10 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
if (read_cache() < 0)
die("index file corrupt");
- refresh_cache(REFRESH_QUIET);
pathspec = get_pathspec(prefix, argv);
+ refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);
+
seen = NULL;
for (i = 0; pathspec[i] ; i++)
/* nothing */;
diff --git a/wt-status.c b/wt-status.c
index 5d56988..65feb29 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))