Re: [PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-29 Thread Michael Haggerty
On 04/28/2014 09:16 PM, Ronnie Sahlberg wrote: On Fri, Apr 25, 2014 at 4:16 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/25/2014 06:14 PM, Ronnie Sahlberg wrote: Change create_branch to use a ref transaction when creating the new branch. ref_transaction_create will check that the

Re: [PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-29 Thread Ronnie Sahlberg
On Tue, Apr 29, 2014 at 2:35 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/28/2014 09:16 PM, Ronnie Sahlberg wrote: On Fri, Apr 25, 2014 at 4:16 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/25/2014 06:14 PM, Ronnie Sahlberg wrote: Change create_branch to use a ref

Re: [PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-29 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: I have no compunctions about using update() to create or delete a reference. My point of view is that update() is the general case, and create() and delete() are special-cases that exist only for the convenience of callers. For example, our

Re: [PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-28 Thread Ronnie Sahlberg
On Fri, Apr 25, 2014 at 4:16 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 04/25/2014 06:14 PM, Ronnie Sahlberg wrote: Change create_branch to use a ref transaction when creating the new branch. ref_transaction_create will check that the ref does not already exist and fail otherwise

[PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-25 Thread Ronnie Sahlberg
Change create_branch to use a ref transaction when creating the new branch. ref_transaction_create will check that the ref does not already exist and fail otherwise meaning that we no longer need to keep a lock on the ref during the setup_tracking. This simplifies the code since we can now do the

Re: [PATCH v3 16/19] branch.c: use ref transaction for all ref updates

2014-04-25 Thread Michael Haggerty
On 04/25/2014 06:14 PM, Ronnie Sahlberg wrote: Change create_branch to use a ref transaction when creating the new branch. ref_transaction_create will check that the ref does not already exist and fail otherwise meaning that we no longer need to keep a lock on the ref during the