Stefan Beller <sbel...@google.com> 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 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 imagine that it
is an essential prerequisite to move this outside the "client" code
if we want to later replace the backing storage of refs and reflogs
outside the filesystem, so from that point of view,  I think the
suggestion makes sense.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to