[PATCH 15/15] sequencer: do not die() in fast_forward_to()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 23, 2016, 16:07 UTC
- Message-ID
- <ba172fe9ce41b2430b9f123aba8019e0dbb634dd.1471968378.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1471968378.git.johannes.schindelin@gmx.de>
A fast-forward may fail e.g. when it would overwrite an untracked file. We still must not exit() in that case: the sequencer is supposedly providing a library function.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c index c29de64..9ddd054 100644 --- a/sequencer.c +++ b/sequencer.c @@ -226,7 +226,7 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from, read_cache(); if (checkout_fast_forward(from, to, 1)) - exit(128); /* the callee should have complained already */ + return -1; /* the callee should have complained already */ strbuf_addf(&sb, _("%s: fast-forward"), action_name(opts));
-- 2.10.0.rc1.99.gcd66998