git rm: refresh index before up-to-date check
Since "git rm" is supposed to be porcelain, we should convince it to be user friendly by refreshing the index itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:

committed by
Shawn O. Pearce

parent
daf6c2edc2
commit
cced48a808
@ -137,6 +137,7 @@ 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);
|
||||
seen = NULL;
|
||||
|
Reference in New Issue
Block a user