{"thread":{"id":"13501","subject":"[PATCH] Documentation/git-gc.txt: change --aggressive description","startedAt":"2008-05-13T09:53:33Z","lastAt":"2008-05-24T19:03:24Z","messageCount":10,"participants":["Pieter de Bie","Teemu Likonen","Johannes Schindelin","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"76855","messageId":"1210672413-8761-1-git-send-email-pdebie@ai.rug.nl","threadId":"13501","inReplyTo":null,"subject":"[PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Pieter de Bie","fromEmail":"pdebie@ai.rug.nl","sentAt":"2008-05-13T09:53:33Z","receivedAt":"2008-05-13T09:53:33Z","isPatch":true,"sender":{"key":"pdebie@ai.rug.nl","avatar":null},"body":"The documentation for the --aggressive flag was misleading, hinting that\nrunning git gc with --aggressive is a good thing. However, --aggressive only\nreally makes sense if you have a bad pack file, such as from git-fast-import.\n---\n\nI keep seeing people regularly packing their repo with git gc --aggressive.\nHowever, in my experience, this seldom results in a smaller repository. This\ncan be because the repository was repacked tightly previously (for example,\nwith a high --window value) or because incremental \"git gc\" just makes better\npacks anyway. Throwing away that information is often not a good idea.\n\nThe documentation for the --aggressive flag was misleading, in that it hints that you'll get a smaller pack, which is often not the case.\n\n\n\n Documentation/git-gc.txt |    8 +++++---\n 1 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt\nindex b6b5ce1..ebf972c 100644\n--- a/Documentation/git-gc.txt\n+++ b/Documentation/git-gc.txt\n@@ -36,9 +36,11 @@ OPTIONS\n \tUsually 'git-gc' runs very quickly while providing good disk\n \tspace utilization and performance.  This option will cause\n \tgit-gc to more aggressively optimize the repository at the expense\n-\tof taking much more time.  The effects of this optimization are\n-\tpersistent, so this option only needs to be used occasionally; every\n-\tfew hundred changesets or so.\n+\tof taking much more time. Note that this will throw away all previous\n+\toptimizations. As a result, running git gc with --aggressive will not\n+\tnecessarily create a smaller pack file, especially when the repository was\n+\tpacked tightly already. Using --aggressive only makes sense if you have a\n+\tbadly packed repository, such as created by git-fast-import.\n \n --auto::\n \tWith this option, `git gc` checks whether any housekeeping is\n-- \n1.5.5.1.174.g32fa0.dirty\n"},{"id":"76857","messageId":"20080513105728.GA3088@mithlond.arda.local","threadId":"13501","inReplyTo":"1210672413-8761-1-git-send-email-pdebie@ai.rug.nl","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-05-13T10:57:28Z","receivedAt":"2008-05-13T10:57:28Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Pieter de Bie wrote (2008-05-13 11:53 +0200):\n\n> I keep seeing people regularly packing their repo with git gc\n> --aggressive. However, in my experience, this seldom results in\n> a smaller repository. This can be because the repository was repacked\n> tightly previously (for example, with a high --window value) or\n> because incremental \"git gc\" just makes better packs anyway. Throwing\n> away that information is often not a good idea.\n> \n> The documentation for the --aggressive flag was misleading, in that it\n> hints that you'll get a smaller pack, which is often not the case.\n\nThis patch might be a good thing. But from ordinary user's point of view\nthis raises questions: if gc --aggressive really is not that aggressive\nthen the option itself is misleading. Why not change gc --aggressive to\nbe really effective? Using high --window/--depth value etc.\n"},{"id":"76858","messageId":"20080513110842.GB3088@mithlond.arda.local","threadId":"13501","inReplyTo":"20080513105728.GA3088@mithlond.arda.local","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-05-13T11:08:42Z","receivedAt":"2008-05-13T11:08:42Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Teemu Likonen wrote (2008-05-13 13:57 +0300):\n\n> Pieter de Bie wrote (2008-05-13 11:53 +0200):\n> \n> > I keep seeing people regularly packing their repo with git gc\n> > --aggressive. However, in my experience, this seldom results in\n> > a smaller repository. This can be because the repository was\n> > repacked tightly previously (for example, with a high --window\n> > value) or because incremental \"git gc\" just makes better packs\n> > anyway. Throwing away that information is often not a good idea.\n> >\n> > The documentation for the --aggressive flag was misleading, in that\n> > it hints that you'll get a smaller pack, which is often not the\n> > case.\n> \n> This patch might be a good thing. But from ordinary user's point of\n> view this raises questions: if gc --aggressive really is not that\n> aggressive then the option itself is misleading. Why not change gc\n> --aggressive to be really effective? Using high --window/--depth value\n> etc.\n\nI mean, what I'm seeing many places is suggestions to run\n\n  git repack -a -d -f --window=100 --depth=100\n\nto get the repo small. _If_ there's such a common need for this then\nwouldn't it be good thing if there was easy and self-descriptive command\nfor it, such as gc --aggressive?\n"},{"id":"76860","messageId":"3A0C16C0-601C-408E-BD48-7DB783586C20@ai.rug.nl","threadId":"13501","inReplyTo":"20080513105728.GA3088@mithlond.arda.local","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Pieter de Bie","fromEmail":"pdebie@ai.rug.nl","sentAt":"2008-05-13T11:13:08Z","receivedAt":"2008-05-13T11:13:08Z","isPatch":true,"sender":{"key":"pdebie@ai.rug.nl","avatar":null},"body":"\nOn 13 mei 2008, at 12:57, Teemu Likonen wrote:\n> This patch might be a good thing. But from ordinary user's point of  \n> view\n> this raises questions: if gc --aggressive really is not that  \n> aggressive\n> then the option itself is misleading. Why not change gc --aggressive  \n> to\n> be really effective? Using high --window/--depth value etc.\n\nThe problem is that you don't know what is aggressive for this  \nrepository; that is relative to how it was previously packed.\n\nI'd much rather change --aggressive to something like --rebuild, which  \ndescribes much better what it does. However, I don't think it's easy  \nto just rename a flag, as scripts may depend on it.\n\n- Pieter\n"},{"id":"76863","messageId":"alpine.DEB.1.00.0805131251320.30431@racer","threadId":"13501","inReplyTo":"1210672413-8761-1-git-send-email-pdebie@ai.rug.nl","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-13T11:52:01Z","receivedAt":"2008-05-13T11:52:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 13 May 2008, Pieter de Bie wrote:\n\n> The documentation for the --aggressive flag was misleading, hinting that \n> running git gc with --aggressive is a good thing. However, --aggressive \n> only really makes sense if you have a bad pack file, such as from \n> git-fast-import.\n\nI disagree.  It makes sense to \"git gc --aggressive\" also after cloning \nfrom somebody who did not do so.\n\nCiao,\nDscho\n"},{"id":"76864","messageId":"alpine.DEB.1.00.0805131252310.30431@racer","threadId":"13501","inReplyTo":"20080513110842.GB3088@mithlond.arda.local","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-13T11:53:25Z","receivedAt":"2008-05-13T11:53:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 13 May 2008, Teemu Likonen wrote:\n\n> Teemu Likonen wrote (2008-05-13 13:57 +0300):\n> \n> > But from ordinary user's point of view this raises questions: if gc \n> > --aggressive really is not that aggressive then the option itself is \n> > misleading. Why not change gc --aggressive to be really effective? \n> > Using high --window/--depth value etc.\n> \n> I mean, what I'm seeing many places is suggestions to run\n> \n>   git repack -a -d -f --window=100 --depth=100\n\nI posted a patch to use 250, not just 100, with --aggressive.  See the \nmailing list archives for the discussion.\n\nCiao,\nDscho\n"},{"id":"76873","messageId":"20080513150327.GA8077@mithlond.arda.local","threadId":"13501","inReplyTo":"alpine.DEB.1.00.0805131252310.30431@racer","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-05-13T15:03:27Z","receivedAt":"2008-05-13T15:03:27Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Johannes Schindelin wrote (2008-05-13 14:53 +0300):\n\n> On Tue, 13 May 2008, Teemu Likonen wrote:\n> \n> > Teemu Likonen wrote (2008-05-13 13:57 +0300):\n> >\n> > > But from ordinary user's point of view this raises questions: if\n> > > gc --aggressive really is not that aggressive then the option\n> > > itself is misleading. Why not change gc --aggressive to be really\n> > > effective? Using high --window/--depth value etc.\n> >\n> > I mean, what I'm seeing many places is suggestions to run\n> >\n> >   git repack -a -d -f --window=100 --depth=100\n> \n> I posted a patch to use 250, not just 100, with --aggressive.  See the\n> mailing list archives for the discussion.\n\nThanks. For easy access I'll paste a link to the discussion. I believe\nyou are referring to this message and thread:\n\nhttp://thread.gmane.org/gmane.comp.gcc.devel/94565/focus=67275\n"},{"id":"76922","messageId":"FCA89971-FDBB-4E44-82CE-C0AA854A4667@ai.rug.nl","threadId":"13501","inReplyTo":"alpine.DEB.1.00.0805131251320.30431@racer","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Pieter de Bie","fromEmail":"pdebie@ai.rug.nl","sentAt":"2008-05-14T06:48:19Z","receivedAt":"2008-05-14T06:48:19Z","isPatch":true,"sender":{"key":"pdebie@ai.rug.nl","avatar":null},"body":"\nOn 13 mei 2008, at 13:52, Johannes Schindelin wrote:\n>> The documentation for the --aggressive flag was misleading, hinting  \n>> that\n>> running git gc with --aggressive is a good thing. However, -- \n>> aggressive\n>> only really makes sense if you have a bad pack file, such as from\n>> git-fast-import.\n>\n> I disagree.  It makes sense to \"git gc --aggressive\" also after  \n> cloning\n> from somebody who did not do so.\n\nThe problem with this is that your pack might increase in size, which  \nyou can't know in advance. Running \"git gc --aggressive\" on the git  \nrepo for example increases its size from 20MB to 30MB.\n\nThe current wording at least makes it sound as if --aggressive will  \nalways result in a smaller pack, which is simply not true. Increasing  \nthe window and depth might help, but 250 or even 100 can be too much  \non any decently size repository.\n\nHow about dropping the last sentence (\"Using --aggressive only makes  \nsense if you have a badly packed repository, such as created by git- \nfast-import.\") then?\n\n- Pieter\n"},{"id":"76925","messageId":"vpqd4npz5po.fsf@bauges.imag.fr","threadId":"13501","inReplyTo":"FCA89971-FDBB-4E44-82CE-C0AA854A4667@ai.rug.nl","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-05-14T07:48:35Z","receivedAt":"2008-05-14T07:48:35Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Pieter de Bie <pdebie@ai.rug.nl> writes:\n\n> How about dropping the last sentence (\"Using --aggressive only makes\n> sense if you have a badly packed repository, such as created by git- \n> fast-import.\") then?\n\nI think informing the user that git-fast-import may require\n--aggressive is good. Actually, I like the sentence as it is (the\n\"such as\" makes it clear that it's not the /only/ case where it can be\nrequired).\n\nMy 2cts,\n\n-- \nMatthieu\n"},{"id":"77665","messageId":"25B3A6F3-5650-438D-807F-983C811084CC@frim.nl","threadId":"13501","inReplyTo":"FCA89971-FDBB-4E44-82CE-C0AA854A4667@ai.rug.nl","subject":"Re: [PATCH] Documentation/git-gc.txt: change --aggressive description","fromName":"Pieter de Bie","fromEmail":"pieter@frim.nl","sentAt":"2008-05-24T19:03:24Z","receivedAt":"2008-05-24T19:03:24Z","isPatch":true,"sender":{"key":"pieter@frim.nl","avatar":null},"body":"\nOn May 14, 2008, at 8:48 AM, Pieter de Bie wrote:\n> On 13 mei 2008, at 13:52, Johannes Schindelin wrote:\n>>> The documentation for the --aggressive flag was misleading,  \n>>> hinting that\n>>> running git gc with --aggressive is a good thing. However, -- \n>>> aggressive\n>>> only really makes sense if you have a bad pack file, such as from\n>>> git-fast-import.\n>>\n>> I disagree.  It makes sense to \"git gc --aggressive\" also after  \n>> cloning\n>> from somebody who did not do so.\n>\n> The problem with this is that your pack might increase in size,  \n> which you can't know in advance. Running \"git gc --aggressive\" on  \n> the git repo for example increases its size from 20MB to 30MB.\n>\n> The current wording at least makes it sound as if --aggressive will  \n> always result in a smaller pack, which is simply not true.  \n> Increasing the window and depth might help, but 250 or even 100 can  \n> be too much on any decently size repository.\n\nAny other comments on this patch? I still think it is an improvement  \nover what is currently in the the man-page.\n\n- Pieter\n"}]}