git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] files-backend: cheapen refname_available check when locking refs

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2017, 21:37 UTC
Message-ID
<xmqqtw15euz4.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170817152240.coioktoqfkcvxldj@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
>> diff --git a/refs/files-backend.c b/refs/files-backend.c
>> index e9b95592b6..f2a420c611 100644
>> --- a/refs/files-backend.c
>> +++ b/refs/files-backend.c
>> @@ -631,11 +631,11 @@ static int lock_raw_ref(struct files_ref_store *refs,
>>  
>>  		/*
>>  		 * If the ref did not exist and we are creating it,
>> -		 * make sure there is no existing ref that conflicts
>> -		 * with refname:
>> +		 * make sure there is no existing packed ref that
>> +		 * conflicts with refname:
>>  		 */
>>  		if (refs_verify_refname_available(
>> -				    &refs->base, refname,
>> +				    refs->packed_ref_store, refname,
>>  				    extras, skip, err))
>>  			goto error_return;
>>  	}
>
> This seems too easy to be true. :) But I think it matches what we were
> doing before 524a9fdb51 (so it's correct), and the performance numbers
> don't lie.

Thanks, all. The log message explained the change very well, even though I agree that the patch text does indeed look too easy to be true ;-).

Will queue.
Previous: Brandon Williams
Message 6 of 6 in “Fetching new refs gets progressively slower”
  1. s@kazlauskas.meJul 9, 2017
  2. Jeff KingJul 9, 2017
  3. files-backend: cheapen refname_available check when locking refsMichael Haggerty, Aug 17, 2017
  4. Jeff KingAug 17, 2017
  5. Brandon WilliamsAug 17, 2017
  6. Junio C HamanoAug 17, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.