Re: [PATCH/RFC 6/7] refs: add update_refs for multiple simultaneous updates
- From
Brad King <brad.king@kitware.com>
- Date
- Aug 29, 2013, 18:38 UTC
- Message-ID
- <521F953A.9090309@kitware.com>
- In-Reply-To
- <xmqqmwo04ac2.fsf@gitster.dls.corp.google.com>
On 08/29/2013 02:32 PM, Junio C Hamano wrote:
> But it may not be a bad idea to keep the callers dumb and have this > function always sort, dedup, *and* fail inconsistent request.
I agree. I was just starting to write the comment for update_refs and it basically would have said "always use ref_update_sort and check for duplicates first". We might was well build it into the function. If some call site in the future wants to optimize a case known to be sorted it can be refactored later.
Thanks, -Brad