{"thread":{"id":"7676","subject":"git-receive-pack doesn't understand objects/info/alternates?","startedAt":"2007-04-16T12:22:13Z","lastAt":"2007-04-16T18:57:40Z","messageCount":6,"participants":["Theodore Ts'o","Santi Béjar","Theodore Tso","Junio C Hamano","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"39519","messageId":"E1HdQDl-0005ia-Bn@candygram.thunk.org","threadId":"7676","inReplyTo":null,"subject":"git-receive-pack doesn't understand objects/info/alternates?","fromName":"Theodore Ts'o","fromEmail":"tytso@mit.edu","sentAt":"2007-04-16T12:22:13Z","receivedAt":"2007-04-16T12:22:13Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"\nWhen I push a kernel repository to master.kernel.org, where the\nrepository only has at most a dozen changes on top of 2.6.21-rc7, I\nnoticed that it tried to push a *lot* of objects over ssh.  As in:\n\n% git push master\nupdating 'refs/heads/master'\n  from 5a8f676142f0c4714c7820793f58a63d33bf4c2a\n  to   e8bea23a40138e4958728dc06b00e9a730456b68\nupdating 'refs/heads/2.6.21-rc7-ext4-1'\n  from 0000000000000000000000000000000000000000\n  to   e8bea23a40138e4958728dc06b00e9a730456b68\nGenerating pack...\nDone counting 49509 objects.\nResult has 42471 objects.\nDeltifying 42471 objects.\n 100% (42471/42471) done\nWriting 42471 objects.\n   9% (3823/42471) done\n\nOuch.  This problem seems to occur locally as well, but I had always\nignored it since it wasn't that annoying, and I could always do a \"git\ngc --prune\" to get rid of the mess afterwards.  It seems that\ngit-receive-pack isn't communicating the fact that there's no need to\nsend objects that can be referenced via the alternates file.\n\nAm I doing something wrong?  Is there a better way of dealing with this\nsituation?  At this point I'm thinking scp'ing over the 252k pack file,\ninstalling it in my git tree on master.kernel.org, and then running \"git\ngc --prune\".  Is there a better way?\n\n\t\t\t\t\t\t- Ted\n"},{"id":"39523","messageId":"8aa486160704160613t3ac17e4co9177ad91fda8eb36@mail.gmail.com","threadId":"7676","inReplyTo":"E1HdQDl-0005ia-Bn@candygram.thunk.org","subject":"Re: git-receive-pack doesn't understand objects/info/alternates?","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-04-16T13:13:25Z","receivedAt":"2007-04-16T13:13:25Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On 4/16/07, Theodore Ts'o <tytso@mit.edu> wrote:\n>\n> When I push a kernel repository to master.kernel.org, where the\n> repository only has at most a dozen changes on top of 2.6.21-rc7, I\n> noticed that it tried to push a *lot* of objects over ssh.  As in:\n\nThis is because git only trusts the the commits in $GIT_DIR/refs.\nSince commit v1.5.1-107-ge3c6f24 (in next) git-fetch first checks if\nwe have all the objects that we are going to fetch available locally.\nThis could be added for the push. But for now you could add a branch\nin your repo in master.kernel.org to track linus' master branch.\n\nSanti\n"},{"id":"39529","messageId":"20070416153040.GG27533@thunk.org","threadId":"7676","inReplyTo":"8aa486160704160613t3ac17e4co9177ad91fda8eb36@mail.gmail.com","subject":"Re: git-receive-pack doesn't understand objects/info/alternates?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-04-16T15:30:40Z","receivedAt":"2007-04-16T15:30:40Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Mon, Apr 16, 2007 at 03:13:25PM +0200, Santi Béjar wrote:\n> On 4/16/07, Theodore Ts'o <tytso@mit.edu> wrote:\n> >\n> >When I push a kernel repository to master.kernel.org, where the\n> >repository only has at most a dozen changes on top of 2.6.21-rc7, I\n> >noticed that it tried to push a *lot* of objects over ssh.  As in:\n> \n> This is because git only trusts the the commits in $GIT_DIR/refs.\n> Since commit v1.5.1-107-ge3c6f24 (in next) git-fetch first checks if\n> we have all the objects that we are going to fetch available locally.\n> This could be added for the push. But for now you could add a branch\n> in your repo in master.kernel.org to track linus' master branch.\n\nThanks for the explanation!  \n\nSo if I add a symlink from .git/refs/heads/kludge to\n<linus'-tree-on-master>/.git/refs/heads/master this should work as a\nworkaround now, right?\n\n\t\t\t\t\t\t- Ted\n"},{"id":"39557","messageId":"7v3b30usth.fsf@assigned-by-dhcp.cox.net","threadId":"7676","inReplyTo":"20070416153040.GG27533@thunk.org","subject":"Re: git-receive-pack doesn't understand objects/info/alternates?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-16T17:34:18Z","receivedAt":"2007-04-16T17:34:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Theodore Tso <tytso@mit.edu> writes:\n\n> On Mon, Apr 16, 2007 at 03:13:25PM +0200, Santi Béjar wrote:\n>> On 4/16/07, Theodore Ts'o <tytso@mit.edu> wrote:\n>> >\n>> >When I push a kernel repository to master.kernel.org, where the\n>> >repository only has at most a dozen changes on top of 2.6.21-rc7, I\n>> >noticed that it tried to push a *lot* of objects over ssh.  As in:\n>> \n>> This is because git only trusts the the commits in $GIT_DIR/refs.\n>> Since commit v1.5.1-107-ge3c6f24 (in next) git-fetch first checks if\n>> we have all the objects that we are going to fetch available locally.\n>> This could be added for the push. But for now you could add a branch\n>> in your repo in master.kernel.org to track linus' master branch.\n>\n> Thanks for the explanation!  \n>\n> So if I add a symlink from .git/refs/heads/kludge to\n> <linus'-tree-on-master>/.git/refs/heads/master this should work as a\n> workaround now, right?\n\nTheoretically speaking, not necessarily.  Practically speaking\nit perhaps may.\n\nWhen Linus runs 'pack-refs --prune', your kludge symlink would\nnot be of any help, as the command removes everything under his\nlinux-2.6.git/refs directory and records the equivalent\ninformation in linux-2.6.git/packed-refs file.\n\n        Word of caution.  Symlinking his packed-refs file to\n        your repository would not work either.\n"},{"id":"39564","messageId":"20070416184851.GH27533@thunk.org","threadId":"7676","inReplyTo":"7v3b30usth.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-receive-pack doesn't understand objects/info/alternates?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-04-16T18:48:51Z","receivedAt":"2007-04-16T18:48:51Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Mon, Apr 16, 2007 at 10:34:18AM -0700, Junio C Hamano wrote:\n> Theoretically speaking, not necessarily.  Practically speaking\n> it perhaps may.\n> \n> When Linus runs 'pack-refs --prune', your kludge symlink would\n> not be of any help, as the command removes everything under his\n> linux-2.6.git/refs directory and records the equivalent\n> information in linux-2.6.git/packed-refs file.\n\nRight, but I thought we weren't supposed to do running pack-refs\n--prune on master.kernel.org since that would break users using old\ngit 1.4.x clients and who are accessing the repository over the http\ntransport.  Or are we not considering that supported anymore on kernel.org?\n\t\n\t\t\t\t\t\t- Ted\n"},{"id":"39565","messageId":"Pine.LNX.4.64.0704161157080.5473@woody.linux-foundation.org","threadId":"7676","inReplyTo":"20070416184851.GH27533@thunk.org","subject":"Re: git-receive-pack doesn't understand objects/info/alternates?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-04-16T18:57:40Z","receivedAt":"2007-04-16T18:57:40Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 16 Apr 2007, Theodore Tso wrote:\n> \n> Right, but I thought we weren't supposed to do running pack-refs\n> --prune on master.kernel.org since that would break users using old\n> git 1.4.x clients and who are accessing the repository over the http\n> transport.\n\nI've been packing refs for many months already..\n\n\t\tLinus\n"}]}