diff options
author | Jeff King <peff@peff.net> | 2009-04-03 15:28:56 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-05 00:37:32 -0700 |
commit | 4f6a32f8af9cceaf0c8ccf6d00d2f100dab5a6db (patch) | |
tree | 5becc1ddbe0aa3b92630cc2a26cf043173db46b9 | |
parent | git-repack: use non-dashed update-server-info (diff) | |
download | tgif-4f6a32f8af9cceaf0c8ccf6d00d2f100dab5a6db.tar.xz |
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>
-rw-r--r-- | builtin-commit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 6cbdd55f16..fde7b891d9 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() < 0) die("index file corrupt"); commit_style = COMMIT_AS_IS; |