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

Re: Question about how git determines the minimum packfile for a push.

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2015, 04:39 UTC
Message-ID
<CAPc5daV2GmtaknNhrBc7ofMZPsKPUn81SHBVPNdHHTXJs8ubdQ@mail.gmail.com>
In-Reply-To
<E51394554A503C4E852F9BEE46B03E8D01E4E784@TI-ODIN.tasernet.com>
On Sun, Apr 26, 2015 at 5:41 PM, Brad Litterell <brad@evidence.com> wrote:
>
> Is it possible git is not computing the delta correctly?
> Or does git only look at the top-level commit objects to figure out what to
> include in the push packfile?

We walk the commit graph backwards to discover the common ancestries to minimize the network cost when fetching, but I do not think the reverse direction has such smart in the protocol.

If you fetch (not "pull") first to remote tracking branches and then push, that probably will reduce the transfer, as the side that pushes is the only one that decides what objects are sent in "git push -> git receive-pack" direction.

Previous: Brad LitterellNext: Jeff King
Message 2 of 3 in “Question about how git determines the minimum packfile for a push.”
  1. Brad LitterellApr 27, 2015
  2. Junio C HamanoApr 27, 2015
  3. Jeff KingApr 28, 2015

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.