{"thread":{"id":"12371","subject":"'git gc' always run, on old kernel repo?","startedAt":"2008-02-28T19:57:39Z","lastAt":"2008-02-28T20:45:25Z","messageCount":6,"participants":["Jeff Garzik","Asheesh Laroia","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70294","messageId":"47C71233.4050705@garzik.org","threadId":"12371","inReplyTo":null,"subject":"'git gc' always run, on old kernel repo?","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2008-02-28T19:57:39Z","receivedAt":"2008-02-28T19:57:39Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"In order to apply a kernel patch diff'd against an older kernel, I ran\n\n\tgit checkout -b tmp v2.6.23\n\tgit-am --signoff --utf8 /g/tmp/mbox\n\nThe patch applied successfully, but each time I run this, it starts an \nautomated 'git gc' run...  even if there is nothing useful to gc:\n\n> [jgarzik@pretzel netdev-2.6]$ git-am --signoff --utf8 /g/tmp/mbox \n> Applying Add support for HT1100 SATA controller - sent from evolution\n> Auto packing your repository for optimum performance. You may also\n> run \"git gc\" manually. See \"git help gc\" for more information.\n> Counting objects: 1, done.\n> Writing objects: 100% (1/1), done.\n> Total 1 (delta 0), reused 0 (delta 0)\n> warning: There are too many unreachable loose objects; run 'git prune' to remove them.\n\nIMO there is a broken hueristic in there somewhere...  I regularly run \n'git gc' on my repos...\n\n\tJeff\n\n\n"},{"id":"70296","messageId":"47C715EB.3060303@garzik.org","threadId":"12371","inReplyTo":"47C71233.4050705@garzik.org","subject":"Re: 'git gc' always run, on old kernel repo?","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2008-02-28T20:13:31Z","receivedAt":"2008-02-28T20:13:31Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"Jeff Garzik wrote:\n>> [jgarzik@pretzel netdev-2.6]$ git-am --signoff --utf8 /g/tmp/mbox \n>> Applying Add support for HT1100 SATA controller - sent from evolution\n>> Auto packing your repository for optimum performance. You may also\n>> run \"git gc\" manually. See \"git help gc\" for more information.\n>> Counting objects: 1, done.\n>> Writing objects: 100% (1/1), done.\n>> Total 1 (delta 0), reused 0 (delta 0)\n>> warning: There are too many unreachable loose objects; run 'git prune' \n>> to remove them.\n> \n> IMO there is a broken hueristic in there somewhere...  I regularly run \n> 'git gc' on my repos...\n\n\nFollow-up...   this is already becoming a PITA.\n\nI am going through and rebasing multiple repos in the same repository... \nand it keeps running 'git gc' on each branch!  grrrr.\n\nStep 1:\npull \"../linux-2.6\" into master branch of local repo.  this repo was \ncreated with \"--reference\".  It _might_ be reasonable to expect 'git gc' \nto be run:\n\n> [jgarzik@pretzel libata-dev]$ git pull ../linux-2.6/\n> Updating bfa274e..7704a8b\n> Fast forward\n> Auto packing your repository for optimum performance. You may also\n> run \"git gc\" manually. See \"git help gc\" for more information.\n> Counting objects: 462, done.\n> Compressing objects: 100% (333/333), done.\n> Writing objects: 100% (462/462), done.\n> Total 462 (delta 345), reused 176 (delta 129)\n> warning: There are too many unreachable loose objects; run 'git prune' to remove them.\n\n\nStep 2:\nIn the same repo, rebase a branch (contains a single changeset), \nimmediately following step #1:\n\n> [jgarzik@pretzel libata-dev]$ git branch\n>   ALL\n>   NEXT\n> * master\n>   mv-ahci-pata\n>   new-eh\n>   sii-lbt\n> [jgarzik@pretzel libata-dev]$ git-checkout sii-lbt && git-rebase master\n> Switched to branch \"sii-lbt\"\n> First, rewinding head to replay your work on top of it...\n> HEAD is now at 7704a8b... Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6\n> Applying [libata] sata_sil: Turn on Large Block Transfer (LBT) feature\n> Auto packing your repository for optimum performance. You may also\n> run \"git gc\" manually. See \"git help gc\" for more information.\n> Counting objects: 4, done.\n> Compressing objects: 100% (4/4), done.\n> Writing objects: 100% (4/4), done.\n> Total 4 (delta 0), reused 0 (delta 0)\n> warning: There are too many unreachable loose objects; run 'git prune' to remove them.\n\n\nStep 3:\nDitto, a second rebase in the same repo, immediately following step #2:\n\n> [jgarzik@pretzel libata-dev]$ git-checkout new-eh && git-rebase master\n> Switched to branch \"new-eh\"\n> First, rewinding head to replay your work on top of it...\n> HEAD is now at 7704a8b... Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6\n> Applying [libata #new-eh] sata_sx4: convert to new EH\n> Auto packing your repository for optimum performance. You may also\n> run \"git gc\" manually. See \"git help gc\" for more information.\n> Counting objects: 4, done.\n> Compressing objects: 100% (4/4), done.\n> Writing objects: 100% (4/4), done.\n> Total 4 (delta 0), reused 0 (delta 0)\n> warning: There are too many unreachable loose objects; run 'git prune' to remove them.\n\n\nStep 4:\nDitto, a third rebase in the same repo, immediately following step #3:\n\n> [jgarzik@pretzel libata-dev]$ git-checkout mv-ahci-pata && git-rebase master\n> Switched to branch \"mv-ahci-pata\"\n> First, rewinding head to replay your work on top of it...\n> HEAD is now at 7704a8b... Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6\n> Applying [libata #mv-ahci-pata] ahci: add rough draft Marvell PATA support\n> Auto packing your repository for optimum performance. You may also\n> run \"git gc\" manually. See \"git help gc\" for more information.\n> Counting objects: 5, done.\n> Compressing objects: 100% (5/5), done.\n> Writing objects: 100% (5/5), done.\n> Total 5 (delta 0), reused 0 (delta 0)\n> warning: There are too many unreachable loose objects; run 'git prune' to remove them.\n\n\nWill the 'git gc' never end???\n\n\tJeff\n\n\n\n"},{"id":"70300","messageId":"alpine.DEB.1.00.0802281231060.23558@alchemy.localdomain","threadId":"12371","inReplyTo":"47C715EB.3060303@garzik.org","subject":"Re: 'git gc' always run, on old kernel repo?","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2008-02-28T20:32:41Z","receivedAt":"2008-02-28T20:32:41Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Thu, 28 Feb 2008, Jeff Garzik wrote:\n\n> Will the 'git gc' never end???\n\nsudo ln -sf /usr/bin/git-gc /bin/echo\n\n(-;\n\n-- Asheesh.\n\n-- \nMaternity pay?\tNow every Tom, Dick and Harry will get pregnant.\n \t\t-- Malcolm Smith\n"},{"id":"70301","messageId":"alpine.DEB.1.00.0802281233570.30784@alchemy.localdomain","threadId":"12371","inReplyTo":"alpine.DEB.1.00.0802281231060.23558@alchemy.localdomain","subject":"Re: 'git gc' always run, on old kernel repo?","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2008-02-28T20:34:39Z","receivedAt":"2008-02-28T20:34:39Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Thu, 28 Feb 2008, Asheesh Laroia wrote:\n\n> On Thu, 28 Feb 2008, Jeff Garzik wrote:\n>\n>> Will the 'git gc' never end???\n>\n> sudo ln -sf /usr/bin/git-gc /bin/echo\n\nEr, the other way around.  Must have had too much crack this morning.\n\n*blushes*\n\n-- Asheesh.\n\n-- \nYour boss is a few sandwiches short of a picnic.\n"},{"id":"70302","messageId":"alpine.LFD.1.00.0802281533190.4911@xanadu.home","threadId":"12371","inReplyTo":"47C715EB.3060303@garzik.org","subject":"Re: 'git gc' always run, on old kernel repo?","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-02-28T20:36:33Z","receivedAt":"2008-02-28T20:36:33Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 28 Feb 2008, Jeff Garzik wrote:\n\n> > warning: There are too many unreachable loose objects; run 'git prune' to\n> > remove them.\n> \n> Will the 'git gc' never end???\n\nWhat happens if you try to run \"git prune\"?\n\n\nNicolas\n"},{"id":"70306","messageId":"47C71D65.7020308@garzik.org","threadId":"12371","inReplyTo":"alpine.LFD.1.00.0802281533190.4911@xanadu.home","subject":"Re: 'git gc' always run, on old kernel repo?","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2008-02-28T20:45:25Z","receivedAt":"2008-02-28T20:45:25Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"Nicolas Pitre wrote:\n> On Thu, 28 Feb 2008, Jeff Garzik wrote:\n> \n>>> warning: There are too many unreachable loose objects; run 'git prune' to\n>>> remove them.\n>> Will the 'git gc' never end???\n> \n> What happens if you try to run \"git prune\"?\n\nSame behavior.\n\nFWIW I run \"git prune\" immediately prior to \"git push\", _every_ time I \npush to master.kernel.org (git.kernel.org).\n\n\tJeff\n"}]}