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

Re: [PATCH 0/3] send-pack: avoid resending unchanged objects after rebasing

From
Marc Strapetz <marc.strapetz@syntevo.com>
Date
Nov 4, 2026, 17:13 UTC
Message-ID
<54bbe02c-3319-477e-a9d9-024ef7027142@syntevo.com>
In-Reply-To
<pull.2281.git.1793029565.gitgitgadget@gmail.com>
On 26/10/2026 16:46, Marc Strapetz via GitGitGadget wrote:
> This series teaches send-pack to request inspection of the old tip's tree
> before packing, so more receiver-known objects can be excluded.

I'd like to give this series one more try, because I think the default push path still misses a worthwhile optimization opportunity.

Rebase-and-force-update workflows are common enough that avoiding redundant transfer on the default path appears worth evaluating. Junio pointed out that push negotiation addresses the same general problem. This series instead targets the non-negotiated default path: it uses the already advertised old destination tip, with no additional round trip, server change, or protocol change.

For qualifying non-fast-forward branch updates, this series can avoid resending objects already present at the destination. This can reduce pack size and network transfer, as well as client-side packing and server-side receive and indexing work. The scope is narrow: ordinary fast-forward pushes are unaffected, and the additional inspection is limited to forced updates with a locally available old tip.

The current measurements show both the potential and the tradeoff: the small cases improve, while the low-benefit worst-case fixture adds about 8% packing time for a negligible size reduction. These measurements cover only local pack generation; they do not include the primary expected benefits of a smaller pack: reduced network transfer and less receive and indexing work on the server. I would appreciate another look at whether this targeted optimization is worthwhile on the default path, and whether its current scope is narrow enough.

I've added Taylor and Derrick because of their work on pack generation and revision traversal. I'd be interested to hear whether this looks like a reasonable tradeoff for rewritten branch updates, or whether there is a simpler approach worth exploring.

-Marc
Previous: Marc Strapetz
Message 7 of 7 in “send-pack: avoid resending unchanged objects after rebasing”
  1. 0/3 send-pack: avoid resending unchanged objects after rebasingMarc Strapetz via GitGitGadget, Oct 26, 2026
  2. 1/3 t5516: record redundant blobs after rebasingMarc Strapetz via GitGitGadget, Oct 26, 2026
  3. 2/3 pack-objects: inspect selected haves for shared objectsMarc Strapetz via GitGitGadget, Oct 26, 2026
  4. 3/3 send-pack: avoid resending unchanged blobs after rebasingMarc Strapetz via GitGitGadget, Oct 26, 2026
  5. Junio C HamanoOct 26, 2026
  6. Marc StrapetzOct 26, 2026
  7. Marc StrapetzNov 4, 2026

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.