提交 d5350fd2 编写于 作者: G Gerrit Pape 提交者: Junio C Hamano

commit --interactive: properly update the index before commiting

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/480429Signed-off-by: NGerrit Pape <pape@smarden.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 1f684dc0
......@@ -219,6 +219,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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册