зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
e98f80f50b
|
@ -1047,7 +1047,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
||||||
s.pathspec = get_pathspec(prefix, argv);
|
s.pathspec = get_pathspec(prefix, argv);
|
||||||
|
|
||||||
read_cache();
|
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.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
|
||||||
s.in_merge = in_merge;
|
s.in_merge = in_merge;
|
||||||
wt_status_collect(&s);
|
wt_status_collect(&s);
|
||||||
|
|
|
@ -169,9 +169,10 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
|
||||||
|
|
||||||
if (read_cache() < 0)
|
if (read_cache() < 0)
|
||||||
die("index file corrupt");
|
die("index file corrupt");
|
||||||
refresh_cache(REFRESH_QUIET);
|
|
||||||
|
|
||||||
pathspec = get_pathspec(prefix, argv);
|
pathspec = get_pathspec(prefix, argv);
|
||||||
|
refresh_index(&the_index, REFRESH_QUIET, pathspec, NULL, NULL);
|
||||||
|
|
||||||
seen = NULL;
|
seen = NULL;
|
||||||
for (i = 0; pathspec[i] ; i++)
|
for (i = 0; pathspec[i] ; i++)
|
||||||
/* nothing */;
|
/* nothing */;
|
||||||
|
|
|
@ -343,7 +343,7 @@ static void wt_status_collect_untracked(struct wt_status *s)
|
||||||
DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES;
|
DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES;
|
||||||
setup_standard_excludes(&dir);
|
setup_standard_excludes(&dir);
|
||||||
|
|
||||||
fill_directory(&dir, NULL);
|
fill_directory(&dir, s->pathspec);
|
||||||
for (i = 0; i < dir.nr; i++) {
|
for (i = 0; i < dir.nr; i++) {
|
||||||
struct dir_entry *ent = dir.entries[i];
|
struct dir_entry *ent = dir.entries[i];
|
||||||
if (!cache_name_is_other(ent->name, ent->len))
|
if (!cache_name_is_other(ent->name, ent->len))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче