@matheusbsbs / matheus-bagliano / commits / ef12b50d0c
Fork 0

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>

Kristian Høgsberg committed Nov 12, 2007 at 15:48 UTC ef12b50d0cf0123377a6fb96584a287a6c24346b
1 file changed +1
builtin-commit.c
+1
@@ -109,6 +109,7 @@ static char *prepare_index(const char **files, const char *prefix)
109
110 /* update the user index file */
111 add_files_to_cache(verbose, prefix, files);
112 + refresh_cache(REFRESH_QUIET);
113 if (write_cache(fd, active_cache, active_nr) || close(fd))
114 die("unable to write new_index file");
115