On Tue, Dec 09, 2014 at 10:47:24AM -0800, Junio C Hamano wrote:
> Michael Haggerty writes:
>
> > This isn't documented very well. I thought I saw a comment somewhere in
> > the code that stated it explicitly, but I can't find it now. In any
> > case, my understanding of the locking protocol for
Michael Haggerty writes:
> This isn't documented very well. I thought I saw a comment somewhere in
> the code that stated it explicitly, but I can't find it now. In any
> case, my understanding of the locking protocol for reflogs is:
>
> The reflog for "$refname", which is stored at
> "$G
On 12/05/2014 01:23 AM, Jonathan Nieder wrote:
> Michael Haggerty wrote:
>
>> We don't actually need the locking functionality, because we already
>> hold the lock on the reference itself, which is how the reflog file is
>> locked. But the lock_file code still does some of the bookkeeping for
>> u
On 12/05/2014 03:59 AM, ronnie sahlberg wrote:
> On Thu, Dec 4, 2014 at 3:08 PM, Michael Haggerty wrote:
>> We don't actually need the locking functionality, because we already
>> hold the lock on the reference itself,
>
> No. You do need the lock.
> The ref is locked only during transaction_comm
On 12/05/2014 03:19 AM, Stefan Beller wrote:
> On Thu, Dec 04, 2014 at 04:23:31PM -0800, Jonathan Nieder wrote:
>> Michael Haggerty wrote:
>>
>>> We don't actually need the locking functionality, because we already
>>> hold the lock on the reference itself, which is how the reflog file is
>>> locke
Stefan Beller writes:
>>> After the series completes, this lock is only used in reflog_expire.
>>> So I'd rather move it inside the function? Then we could run the
>>> reflog_expire
>>> function in parallel for different locks in theory?
>>
>> I am not sure about the "parallel" part, but I would
On Fri, Dec 5, 2014 at 11:32 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>>> > +static struct lock_file reflog_lock;
>>>
>>> If this lockfile is only used in that one function, it can be declared
>>> inside the function.
>>>
>>> If it is meant to be used throughout the 'git reflog' comman
Stefan Beller writes:
>> > +static struct lock_file reflog_lock;
>>
>> If this lockfile is only used in that one function, it can be declared
>> inside the function.
>>
>> If it is meant to be used throughout the 'git reflog' command, then it
>> can go near the top of the file.
>>
>
> After th
On Thu, Dec 04, 2014 at 04:23:31PM -0800, Jonathan Nieder wrote:
> Michael Haggerty wrote:
>
> > We don't actually need the locking functionality, because we already
> > hold the lock on the reference itself, which is how the reflog file is
> > locked. But the lock_file code still does some of the
On Thu, Dec 04, 2014 at 06:51:36PM -0800, ronnie sahlberg wrote:
> On Thu, Dec 4, 2014 at 3:08 PM, Michael Haggerty
> wrote:
>
> > We don't actually need the locking functionality, because we already
> > hold the lock on the reference itself,
>
>
> No. You do need the lock.
> The ref is locked
On Thu, Dec 4, 2014 at 3:08 PM, Michael Haggerty wrote:
> We don't actually need the locking functionality, because we already
> hold the lock on the reference itself,
No. You do need the lock.
The ref is locked only during transaction_commit()
If you don't want to lock the reflog file and inste
On Thu, Dec 04, 2014 at 04:23:31PM -0800, Jonathan Nieder wrote:
> Michael Haggerty wrote:
>
> > We don't actually need the locking functionality, because we already
> > hold the lock on the reference itself, which is how the reflog file is
> > locked. But the lock_file code still does some of the
Michael Haggerty wrote:
> We don't actually need the locking functionality, because we already
> hold the lock on the reference itself, which is how the reflog file is
> locked. But the lock_file code still does some of the bookkeeping for
> us and is more careful than the old code here was.
As y
We don't actually need the locking functionality, because we already
hold the lock on the reference itself, which is how the reflog file is
locked. But the lock_file code still does some of the bookkeeping for
us and is more careful than the old code here was.
For example:
* Correctly handle the
14 matches
Mail list logo