Skip to content

Commit e98f80f

Browse files
committed
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
2 parents add0951 + 4e1a7ba commit e98f80f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

builtin-commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
10471047
s.pathspec = get_pathspec(prefix, argv);
10481048

10491049
read_cache();
1050-
refresh_cache(REFRESH_QUIET|REFRESH_UNMERGED);
1050+
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
10511051
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
10521052
s.in_merge = in_merge;
10531053
wt_status_collect(&s);

builtin-rm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
169169

170170
if (read_cache() < 0)
171171
die("index file corrupt");
172-
refresh_cache(REFRESH_QUIET);
173172

174173
pathspec = get_pathspec(prefix, argv);
174+
refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);
175+
175176
seen = NULL;
176177
for (i = 0; pathspec[i] ; i++)
177178
/* nothing */;

wt-status.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static void wt_status_collect_untracked(struct wt_status *s)
343343
DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES;
344344
setup_standard_excludes(&dir);
345345

346-
fill_directory(&dir, NULL);
346+
fill_directory(&dir, s->pathspec);
347347
for (i = 0; i < dir.nr; i++) {
348348
struct dir_entry *ent = dir.entries[i];
349349
if (!cache_name_is_other(ent->name, ent->len))

0 commit comments

Comments
 (0)