summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-11-12 15:48:22 -0500
committerJunio C Hamano <gitster@pobox.com>2007-11-22 17:05:03 -0800
commitef12b50d0cf0123377a6fb96584a287a6c24346b (patch)
treee0e43b2493b269c2172054ba5be0f60537d8c92e /builtin-commit.c
parent129fa606365c172d07a5d98bea9345277f221363 (diff)
downloadgit-ef12b50d0cf0123377a6fb96584a287a6c24346b.tar.gz
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 2233300f40..ee9fe72c61 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");