Re: [PATCH 1/2] sequencer.c: check for lock failure and bail early in fast_forward_to

2014-04-15 Thread Brandon Casey
On Tue, Apr 15, 2014 at 4:46 PM, Ronnie Sahlberg wrote: > Signed-off-by: Ronnie Sahlberg > --- > sequencer.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/sequencer.c b/sequencer.c > index bde5f04..6aa3b50 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -281,8 +281,15 @@

[PATCH 1/2] sequencer.c: check for lock failure and bail early in fast_forward_to

2014-04-15 Thread Ronnie Sahlberg
Change fast_forward_to() to check if locking the ref failed, print a nice error message and bail out early. The old code did not check if ref_lock was NULL and relied on the fact that the write_ref_sha1() would safely detect this condition and set the return variable ret to indicate an error. While