X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fcommit.c;h=54b20497b120bc2bf5ee6e4904eca0ca5d83ff4f;hb=84dd63ee1d6ce08d7b85e4f1c4d7e77ef27a1578;hp=3979b823ef4227aac641be48c47581c56423b9d7;hpb=a91df69cbb5ced7837525106ff57ff349180770b;p=git.git diff --git a/builtin/commit.c b/builtin/commit.c index 3979b823e..54b20497b 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1203,13 +1203,8 @@ int cmd_status(int argc, const char **argv, const char *prefix) refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL); fd = hold_locked_index(&index_lock, 0); - if (0 <= fd) { - if (active_cache_changed && - !write_cache(fd, active_cache, active_nr)) - commit_locked_index(&index_lock); - else - rollback_lock_file(&index_lock); - } + if (0 <= fd) + update_index_if_able(&the_index, &index_lock); s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0; s.ignore_submodule_arg = ignore_submodule_arg;