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

Re: Could Git be smarter about object reuse?

From
Simon Richter <simon.richter@hogyros.de>
Date
Sep 22, 2025, 10:41 UTC
Message-ID
<f478fc6f-77ab-4d4e-a8d9-2d44622ba8dd@hogyros.de>
In-Reply-To
<pmKix6R7b3WVLrcK6ig1Lh7RhrB5G4Hm5yam_fEoC839aatB-OjJEmSJJ-weErGEnt4Mvgf5slxgu6Pm1xlGZ4mr_i4MIAAEMYy8DjJnWgk=@calamity.inc>
Hi,
On 9/22/25 7:06 PM, Sainan wrote:
> It's especially annoying because I know the server already has basically all the blobs needed and hence would only need to receive the commit and tree objects.

Git already does this. The receiver sends a list of commits it has, and the sender omits all objects (of any kind) that are reachable from any of these.

For this to work, the sender needs to be able to follow the commits from these references, so this does not work properly if the sender is operating from a shallow clone, or is missing branches, because the receiver only sends a list of branch tips (and, if the receiver is shallow, missing commits), not a full list of objects present, because that would be a lot.

    Simon
Previous: SainanNext: Sainan
Message 2 of 8 in “Could Git be smarter about object reuse?”
  1. SainanSep 22, 2025
  2. Simon RichterSep 22, 2025
  3. SainanSep 22, 2025
  4. Jeff KingSep 22, 2025
  5. SainanSep 22, 2025
  6. Jeff KingSep 23, 2025
  7. SainanOct 3, 2025
  8. SainanOct 3, 2025

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.