summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index bbaddcb..c513d7e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -243,11 +243,15 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from,
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;
}