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

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: "Theodore Ts'o" <tytso@mit.edu>
Date: 2016-06-15 22:43:04

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

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

From: Santi Béjar <hidden>
Date: 2016-06-15 22:43:04

On 4/16/07, Theodore Ts'o [off-list ref] wrote:
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:
This is because git only trusts the the commits in $GIT_DIR/refs.
Since commit v1.5.1-107-ge3c6f24 (in next) git-fetch first checks if
we have all the objects that we are going to fetch available locally.
This could be added for the push. But for now you could add a branch
in your repo in master.kernel.org to track linus' master branch.

Santi

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

From: Theodore Tso <tytso@mit.edu>
Date: 2016-06-15 22:43:04

On Mon, Apr 16, 2007 at 03:13:25PM +0200, Santi Béjar wrote:
On 4/16/07, Theodore Ts'o [off-list ref] wrote:
quoted
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:
This is because git only trusts the the commits in $GIT_DIR/refs.
Since commit v1.5.1-107-ge3c6f24 (in next) git-fetch first checks if
we have all the objects that we are going to fetch available locally.
This could be added for the push. But for now you could add a branch
in your repo in master.kernel.org to track linus' master branch.
Thanks for the explanation!  

So if I add a symlink from .git/refs/heads/kludge to
<linus'-tree-on-master>/.git/refs/heads/master this should work as a
workaround now, right?

						- Ted
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help