{"thread":{"id":"6880","subject":"Optimizing repository speed","startedAt":"2007-02-19T14:37:38Z","lastAt":"2007-02-19T15:14:10Z","messageCount":2,"participants":["Bill Lear","Theodore Tso"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"35007","messageId":"17881.46642.843674.49482@lisa.zopyra.com","threadId":"6880","inReplyTo":null,"subject":"Optimizing repository speed","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-02-19T14:37:38Z","receivedAt":"2007-02-19T14:37:38Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"As part of our conversion to git 1.5, I would like to ensure that\nour code repository does not get crufty and slow.  Currently, I have\na cron job that runs each morning that does a 'git repack -a -d'.\n\nI know there is 'git-gc', and it appears to do all sorts of good\nthings.  Can I simply replace my call to 'git repack -d -a' with 'git\ngc', or is there anything else I might want to do?\n\n\nBill\n"},{"id":"35012","messageId":"20070219151410.GG25490@thunk.org","threadId":"6880","inReplyTo":"17881.46642.843674.49482@lisa.zopyra.com","subject":"Re: Optimizing repository speed","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-19T15:14:10Z","receivedAt":"2007-02-19T15:14:10Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Mon, Feb 19, 2007 at 08:37:38AM -0600, Bill Lear wrote:\n> As part of our conversion to git 1.5, I would like to ensure that\n> our code repository does not get crufty and slow.  Currently, I have\n> a cron job that runs each morning that does a 'git repack -a -d'.\n> \n> I know there is 'git-gc', and it appears to do all sorts of good\n> things.  Can I simply replace my call to 'git repack -d -a' with 'git\n> gc', or is there anything else I might want to do?\n\ngit-gc is a strict superset of git repack -a -d.  Specifically, what\nit does is:\n\ngit-pack-refs --prune\ngit-reflog expire --al \ngit-repack -a -d -l\ngit-rerere gc\n\nIt will also through in a git-prune if you do add --prune to the\ngit-gc call, but you really don't want to run that out of a cron job.\n\nRegards,\n\n\t\t\t\t\t\t- Ted\n"}]}