Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-08 Thread Michael Haggerty
On 07/08/2015 07:11 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> I think your v7 of this patch goes too far, by turning a failure to >> write to the reflog into a failure of the whole transaction. The problem >> is that this failure comes too late, in the commit phase of the >> trans

Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-08 Thread Junio C Hamano
Michael Haggerty writes: > I think your v7 of this patch goes too far, by turning a failure to > write to the reflog into a failure of the whole transaction. The problem > is that this failure comes too late, in the commit phase of the > transaction. Aborting at this late stage can leave some ref

Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-08 Thread Michael Haggerty
On 07/08/2015 12:41 AM, David Turner wrote: > On Mon, 2015-07-06 at 17:53 +0200, Michael Haggerty wrote: >> On 06/29/2015 10:17 PM, David Turner wrote: >>> [...] >>> @@ -3317,7 +3322,8 @@ static int commit_ref_update(struct ref_lock *lock, >>> head_sha1, &h

Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-07 Thread David Turner
On Mon, 2015-07-06 at 17:53 +0200, Michael Haggerty wrote: > On 06/29/2015 10:17 PM, David Turner wrote: > > Add an err argument to log_ref_setup that can explain the reason > > for a failure. This then eliminates the need to manage errno through > > this function since we can just add strerror(err

Re: [PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-07-06 Thread Michael Haggerty
On 06/29/2015 10:17 PM, David Turner wrote: > Add an err argument to log_ref_setup that can explain the reason > for a failure. This then eliminates the need to manage errno through > this function since we can just add strerror(errno) to the err string > when meaningful. No callers relied on errno

[PATCH v6 1/7] refs.c: add err arguments to reflog functions

2015-06-29 Thread David Turner
Add an err argument to log_ref_setup that can explain the reason for a failure. This then eliminates the need to manage errno through this function since we can just add strerror(errno) to the err string when meaningful. No callers relied on errno from this function for anything else than the error