commit: abort commit if interactive add failed

Previously we ignored the result of calling add_interactive,
which meant that if an error occurred we simply committed
whatever happened to be in the index.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/builtin-commit.c b/builtin-commit.c
index 6cbdd55..fde7b89 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -224,7 +224,8 @@
 	const char **pathspec = NULL;
 
 	if (interactive) {
-		interactive_add(argc, argv, prefix);
+		if (interactive_add(argc, argv, prefix) != 0)
+			die("interactive add failed");
 		if (read_cache() < 0)
 			die("index file corrupt");
 		commit_style = COMMIT_AS_IS;