Code

builtin-fetch.c (store_updated_refs): Honor update_local_ref() return value
[git.git] / builtin-commit.c
index 07872c8ea71064c1bcf5813dd66b4a7e5feb9bec..b294c1f88c1eecde8d96d265c72376c789f24899 100644 (file)
@@ -223,6 +223,8 @@ static char *prepare_index(int argc, const char **argv, const char *prefix)
 
        if (interactive) {
                interactive_add(argc, argv, prefix);
+               if (read_cache() < 0)
+                       die("index file corrupt");
                commit_style = COMMIT_AS_IS;
                return get_index_file();
        }