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

git-receive-pack doesn't understand objects/info/alternates?

From
Theodore Ts'o <tytso@mit.edu>
Date
Apr 16, 2007, 12:22 UTC
Message-ID
<E1HdQDl-0005ia-Bn@candygram.thunk.org>

When I push a kernel repository to master.kernel.org, where the repository only has at most a dozen changes on top of 2.6.21-rc7, I noticed that it tried to push a *lot* of objects over ssh. As in:

% git push master
updating 'refs/heads/master'
  from 5a8f676142f0c4714c7820793f58a63d33bf4c2a
  to   e8bea23a40138e4958728dc06b00e9a730456b68
updating 'refs/heads/2.6.21-rc7-ext4-1'
  from 0000000000000000000000000000000000000000
  to   e8bea23a40138e4958728dc06b00e9a730456b68
Generating pack...
Done counting 49509 objects.
Result has 42471 objects.
Deltifying 42471 objects.
 100% (42471/42471) done
Writing 42471 objects.
   9% (3823/42471) done

Ouch. This problem seems to occur locally as well, but I had always ignored it since it wasn't that annoying, and I could always do a "git gc --prune" to get rid of the mess afterwards. It seems that git-receive-pack isn't communicating the fact that there's no need to send objects that can be referenced via the alternates file.

Am I doing something wrong? Is there a better way of dealing with this situation? At this point I'm thinking scp'ing over the 252k pack file, installing it in my git tree on master.kernel.org, and then running "git gc --prune". Is there a better way?

						- Ted
Next: Santi Béjar
Message 1 of 6 in “git-receive-pack doesn't understand objects/info/alternates?”
  1. Theodore Ts'oApr 16, 2007
  2. Santi BéjarApr 16, 2007
  3. Theodore TsoApr 16, 2007
  4. Junio C HamanoApr 16, 2007
  5. Theodore TsoApr 16, 2007
  6. Linus TorvaldsApr 16, 2007

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.