From: Jeff King Date: Fri, 03 Apr 2009 19:28:56 GMT Subject: [PATCH 1/4] commit: abort commit if interactive add failed Message-ID: <20090403192856.GA5547@coredump.intra.peff.net> In-Reply-To: <20090403192700.GA14965@coredump.intra.peff.net> 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 --- Just a fix I noticed while looking at t7501. builtin-commit.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/builtin-commit.c b/builtin-commit.c index 46e649c..81371b1 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -224,7 +224,8 @@ static char *prepare_index(int argc, const char **argv, const char *prefix) 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_preload(NULL) < 0) die("index file corrupt"); commit_style = COMMIT_AS_IS; -- 1.6.2.2.569.g2d4b2