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

Re: [PATCH] push: don't fetch commit object when checking existence

From
Tom Hughes <tom@compton.nu>
Date
May 22, 2024, 20:18 UTC
Message-ID
<a546ca21-22ab-4a0d-9afa-e5c91830a5c2@compton.nu>
In-Reply-To
<xmqq8r014pyn.fsf@gitster.g>
On 22/05/2024 20:16, Junio C Hamano wrote:
Show 15 quoted lines
> Tom Hughes <tom@compton.nu> writes:
> 
>> If we're checking to see whether to tell the user to do a fetch
>> before pushing there's no need for us to actually fetch the object
>> from the remote if the clone is partial.
>>
>> Because the promisor doesn't do negotiation actually trying to do
>> the fetch of the new head can be very expensive as it will try and
>> include history that we already have and it just results in rejecting
>> the push with a different message, and in behavior that is different
>> to a clone that is not partial.
> 
> Interesting.  Is this something that is easily testable, perhaps by
> preparing a partial clone and try to push from there and checking
> the non-existence of the object after seeing that push failed?

Sure. I think I've managed to figure out a test and have sent a second version of the patch with it added.

Tom
-- 
Tom Hughes (tom@compton.nu)
http://compton.nu/
Previous: Jeff King
Message 8 of 8 in “push: don't fetch commit object when checking existence”
  1. push: don't fetch commit object when checking existenceTom Hughes, May 22, 2024
  2. Junio C HamanoMay 22, 2024
  3. push: don't fetch commit object when checking existenceTom Hughes, May 22, 2024
  4. Junio C HamanoMay 22, 2024
  5. Tom HughesMay 22, 2024
  6. Junio C HamanoMay 22, 2024
  7. Jeff KingMay 23, 2024
  8. Tom HughesMay 22, 2024

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.