Call refresh_cache() when updating the user index for --only commits.
We're guaranteeing the user that the index will be stat-clean after git commit. Thus, we need to call refresh_cache() for the user index too, in the 'git commit <paths>' case. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
129fa60636
commit
ef12b50d0c
@ -109,6 +109,7 @@ static char *prepare_index(const char **files, const char *prefix)
|
||||
|
||||
/* update the user index file */
|
||||
add_files_to_cache(verbose, prefix, files);
|
||||
refresh_cache(REFRESH_QUIET);
|
||||
if (write_cache(fd, active_cache, active_nr) || close(fd))
|
||||
die("unable to write new_index file");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user