diff --git a/builtin-commit.c b/builtin-commit.c
index 07872c8ea71064c1bcf5813dd66b4a7e5feb9bec..b294c1f88c1eecde8d96d265c72376c789f24899 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
if (interactive) {
interactive_add(argc, argv, prefix);
+ if (read_cache() < 0)
+ die("index file corrupt");
commit_style = COMMIT_AS_IS;
return get_index_file();
}