summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f684dc)
raw | patch | inline | side by side (parent: 1f684dc)
author | Gerrit Pape <pape@smarden.org> | |
Tue, 27 May 2008 08:59:16 +0000 (08:59 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 May 2008 05:32:47 +0000 (22:32 -0700) |
When adding files through git commit --interactive, and 'quit'
afterwards, the message in the editor of the commit message indicates
that many (maybe all) files are deleted from the tree. Dismissing that
and running git commit afterwards does the right thing. This commit
fixes git commit --interactive to properly update the index before
commiting.
Reported by Jiří Paleček through
http://bugs.debian.org/480429
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
afterwards, the message in the editor of the commit message indicates
that many (maybe all) files are deleted from the tree. Dismissing that
and running git commit afterwards does the right thing. This commit
fixes git commit --interactive to properly update the index before
commiting.
Reported by Jiří Paleček through
http://bugs.debian.org/480429
Signed-off-by: Gerrit Pape <pape@smarden.org>
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 e3564a526a29927702e2aab368feae3e641c1256..b0fe69ecad6523dd40f8f5f777a7b81e31eefa3d 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();
}