Re: [PATCH v14 08/40] refs.c: add an err argument to delete_ref_loose

2014-06-11 Thread Ronnie Sahlberg
Done. Thanks. On Tue, Jun 10, 2014 at 3:49 PM, Jonathan Nieder wrote: > Ronnie Sahlberg wrote: > >> --- a/refs.c >> +++ b/refs.c >> @@ -2510,16 +2510,38 @@ static int repack_without_ref(const char *refname) > [...] >> +static int unlink_or_err(const char *file, struct strbuf *err) >> +{ >> +

Re: [PATCH v14 08/40] refs.c: add an err argument to delete_ref_loose

2014-06-10 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > --- a/refs.c > +++ b/refs.c > @@ -2510,16 +2510,38 @@ static int repack_without_ref(const char *refname) [...] > +static int unlink_or_err(const char *file, struct strbuf *err) > +{ > + if (err) > + return add_err_if_unremovable("unlink", file, err, > +

[PATCH v14 08/40] refs.c: add an err argument to delete_ref_loose

2014-06-06 Thread Ronnie Sahlberg
Add an err argument to delete_loose_ref so that we can pass a descriptive error string back to the caller. Pass the err argument from transaction commit to this function so that transaction users will have a nice error string if the transaction failed due to delete_loose_ref. Add a new function un