diff options
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 07872c8ea7..b294c1f88c 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -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(); } |