summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 741707b)
raw | patch | inline | side by side (parent: 741707b)
author | Kristian Høgsberg <krh@redhat.com> | |
Fri, 9 Nov 2007 16:40:27 +0000 (11:40 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Nov 2007 01:05:03 +0000 (17:05 -0800) |
We have promised our users that after running git-status or
git-commit the index will be refreshed for a long time since
these commands were introduced. Do refresh the index before
writing it out to keep the promise.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-commit the index will be refreshed for a long time since
these commands were introduced. Do refresh the index before
writing it out to keep the promise.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index c8f79a88fb16b0ab142ea95790dbb9593f386d3d..a84a729da1fddc83e3ced1c2b5b9156ce52294e0 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
if (all || also) {
add_files_to_cache(verbose, also ? prefix : NULL, files);
+ refresh_cache(REFRESH_QUIET);
if (write_cache(fd, active_cache, active_nr) || close(fd))
die("unable to write new_index file");
return lock_file.filename;
fd = hold_lock_file_for_update(next_index_lock,
git_path("next-index-%d", getpid()), 1);
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");