Re: [PATCH v2 6/8] refs: add update_refs for multiple simultaneous updates
- From
Brad King <brad.king@kitware.com>
- Date
- Sep 2, 2013, 17:20 UTC
- Message-ID
- <5224C8C6.4050500@kitware.com>
- In-Reply-To
- <xmqqob8dul99.fsf@gitster.dls.corp.google.com>
On 09/01/2013 02:08 AM, Junio C Hamano wrote:
>> Though the refs themeselves cannot be modified together in a single > > "themselves".
Fixed.
> I notice that we are using an array of structures and letting qsort > swap 50~64 bytes of data
Michael suggested this too, so fixed.
> Optionally we could silently dedup multiple identical updates and > not fail it in ref-update-reject-duplicates. But that does not have > to be done until we find people's script would benefit from such a > nicety.
We can always be less strict about input later, so I'd like to keep the implementation simpler for now.
> By the way, unless there is a strong reason not to do so, > post-increment "i++" (and pre-decrement "--i", if you use it) is the > norm around here.
Okay, fixed in entire series.
>> + locks[i] = 0; /* freed by update_ref_write */ > > I think what is assigned here is a NULL pointer.
Yes, fixed.
Thanks, -Brad