git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-receive-pack doesn't understand objects/info/alternates?
@ 2007-04-16 12:22 Theodore Ts'o
  2007-04-16 13:13 ` Santi Béjar
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2007-04-16 12:22 UTC (permalink / raw)
  To: git


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git-receive-pack doesn't understand objects/info/alternates?
  2007-04-16 12:22 git-receive-pack doesn't understand objects/info/alternates? Theodore Ts'o
@ 2007-04-16 13:13 ` Santi Béjar
  2007-04-16 15:30   ` Theodore Tso
  0 siblings, 1 reply; 6+ messages in thread
From: Santi Béjar @ 2007-04-16 13:13 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: git

On 4/16/07, Theodore Ts'o <tytso@mit.edu> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git-receive-pack doesn't understand objects/info/alternates?
  2007-04-16 13:13 ` Santi Béjar
@ 2007-04-16 15:30   ` Theodore Tso
  2007-04-16 17:34     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore Tso @ 2007-04-16 15:30 UTC (permalink / raw)
  To: Santi Béjar; +Cc: git

On Mon, Apr 16, 2007 at 03:13:25PM +0200, Santi Béjar wrote:
> On 4/16/07, Theodore Ts'o <tytso@mit.edu> 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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git-receive-pack doesn't understand objects/info/alternates?
  2007-04-16 15:30   ` Theodore Tso
@ 2007-04-16 17:34     ` Junio C Hamano
  2007-04-16 18:48       ` Theodore Tso
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2007-04-16 17:34 UTC (permalink / raw)
  To: Theodore Tso; +Cc: Santi Béjar, git

Theodore Tso <tytso@mit.edu> writes:

> On Mon, Apr 16, 2007 at 03:13:25PM +0200, Santi Béjar wrote:
>> On 4/16/07, Theodore Ts'o <tytso@mit.edu> 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.
>
> 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?

Theoretically speaking, not necessarily.  Practically speaking
it perhaps may.

When Linus runs 'pack-refs --prune', your kludge symlink would
not be of any help, as the command removes everything under his
linux-2.6.git/refs directory and records the equivalent
information in linux-2.6.git/packed-refs file.

        Word of caution.  Symlinking his packed-refs file to
        your repository would not work either.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git-receive-pack doesn't understand objects/info/alternates?
  2007-04-16 17:34     ` Junio C Hamano
@ 2007-04-16 18:48       ` Theodore Tso
  2007-04-16 18:57         ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore Tso @ 2007-04-16 18:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Santi Béjar, git

On Mon, Apr 16, 2007 at 10:34:18AM -0700, Junio C Hamano wrote:
> Theoretically speaking, not necessarily.  Practically speaking
> it perhaps may.
> 
> When Linus runs 'pack-refs --prune', your kludge symlink would
> not be of any help, as the command removes everything under his
> linux-2.6.git/refs directory and records the equivalent
> information in linux-2.6.git/packed-refs file.

Right, but I thought we weren't supposed to do running pack-refs
--prune on master.kernel.org since that would break users using old
git 1.4.x clients and who are accessing the repository over the http
transport.  Or are we not considering that supported anymore on kernel.org?
	
						- Ted

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git-receive-pack doesn't understand objects/info/alternates?
  2007-04-16 18:48       ` Theodore Tso
@ 2007-04-16 18:57         ` Linus Torvalds
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Torvalds @ 2007-04-16 18:57 UTC (permalink / raw)
  To: Theodore Tso; +Cc: Junio C Hamano, Santi Béjar, git



On Mon, 16 Apr 2007, Theodore Tso wrote:
> 
> Right, but I thought we weren't supposed to do running pack-refs
> --prune on master.kernel.org since that would break users using old
> git 1.4.x clients and who are accessing the repository over the http
> transport.

I've been packing refs for many months already..

		Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-04-16 18:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16 12:22 git-receive-pack doesn't understand objects/info/alternates? Theodore Ts'o
2007-04-16 13:13 ` Santi Béjar
2007-04-16 15:30   ` Theodore Tso
2007-04-16 17:34     ` Junio C Hamano
2007-04-16 18:48       ` Theodore Tso
2007-04-16 18:57         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).