Re: [PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > Instead of the suggestions above, would you accept an alternative > approach where I would > add an err argument to ref_transaction_begin() instead? > > For a hypothetical mysql backend, this could then do something like : [...] > fatal: refs/heads/master: cannot update th

Re: [PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-15 Thread Ronnie Sahlberg
On Wed, May 14, 2014 at 5:27 PM, Jonathan Nieder wrote: > Ronnie Sahlberg wrote: > >> --- a/builtin/tag.c >> +++ b/builtin/tag.c >> @@ -701,11 +702,12 @@ int cmd_tag(int argc, const char **argv, const char >> *prefix) >> if (annotate) >> create_tag(object, tag, &buf, &opt, pre

Re: [PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-14 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > --- a/builtin/tag.c > +++ b/builtin/tag.c > @@ -701,11 +702,12 @@ int cmd_tag(int argc, const char **argv, const char > *prefix) > if (annotate) > create_tag(object, tag, &buf, &opt, prev, object); > > - lock = lock_any_ref_for_update(ref.buf, pr

[PATCH v6 11/42] tag.c: use ref transactions when doing updates

2014-05-01 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Signed-off-by: Ronnie Sahlberg --- builtin/tag.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index f344002..1cf5650 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -54