From: Kristian Høgsberg Date: Mon, 12 Nov 2007 20:48:22 +0000 (-0500) Subject: Call refresh_cache() when updating the user index for --only commits. X-Git-Tag: v1.5.4-rc0~78^2~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef12b50d0cf0123377a6fb96584a287a6c24346b;p=git.git 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 ' case. Signed-off-by: Kristian Høgsberg Signed-off-by: Junio C Hamano --- diff --git a/builtin-commit.c b/builtin-commit.c index 2233300f4..ee9fe72c6 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -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");