From: Junio C Hamano Date: Wed, 25 Jun 2014 19:21:45 +0000 (-0700) Subject: Merge branch 'fr/sequencer-fail-with-not-one-upon-no-ff' X-Git-Tag: v2.1.0-rc0~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ce7100b1c1aa3a1523057c904f081abcf87ed60;p=thirdparty%2Fgit.git Merge branch 'fr/sequencer-fail-with-not-one-upon-no-ff' * fr/sequencer-fail-with-not-one-upon-no-ff: sequencer: signal failed ff as an aborted, not a conflicted merge --- 9ce7100b1c1aa3a1523057c904f081abcf87ed60 diff --cc sequencer.c index 0a80c58d11,b087e121b4..923047459b --- a/sequencer.c +++ b/sequencer.c @@@ -278,15 -278,11 +278,15 @@@ static int fast_forward_to(const unsign read_cache(); if (checkout_fast_forward(from, to, 1)) - exit(1); /* the callee should have complained already */ + exit(128); /* the callee should have complained already */ ref_lock = lock_any_ref_for_update("HEAD", unborn ? null_sha1 : from, 0, NULL); + if (!ref_lock) + return error(_("Failed to lock HEAD during fast_forward_to")); + strbuf_addf(&sb, "%s: fast-forward", action_name(opts)); ret = write_ref_sha1(ref_lock, to, sb.buf); + strbuf_release(&sb); return ret; }