Commit ef12b50d authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Junio C Hamano

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: default avatarKristian Høgsberg <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 129fa606
......@@ -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);
if (write_cache(fd, active_cache, active_nr) || close(fd))
die("unable to write new_index file");
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment