{"thread":{"id":"11265","subject":"git-pull followed by git-gc often yields *much* bigger pack than git-pull alone","startedAt":"2007-12-12T20:47:41Z","lastAt":"2007-12-12T20:47:41Z","messageCount":1,"participants":["Nix"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"62962","messageId":"87ejdrej2q.fsf@hades.wkstn.nix","threadId":"11265","inReplyTo":null,"subject":"git-pull followed by git-gc often yields *much* bigger pack than git-pull alone","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2007-12-12T20:47:41Z","receivedAt":"2007-12-12T20:47:41Z","isPatch":false,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"I've seen this intermittently, but this is a particularly extreme\nexample. This happens to be with 1.5.3.7, but I've seen the same\nsymptoms back in git 1.4.x. I assumed it was something I was doing wrong\nthen, but I'm no longer so sure.\n\n,----\n| hades /usr/packages/poppler/poppler% ls -al .git/objects/pack\n| drwxr-xr-x 2 compiler hackers    2048 2007-12-12 20:35 .\n| drwxr-xr-x 9 compiler hackers    2048 2007-12-12 20:35 ..\n| -r--r--r-- 1 compiler hackers  149288 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.idx\n| -rw-r--r-- 1 compiler hackers       0 2007-12-06 14:45 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.keep\n| -r--r--r-- 1 compiler hackers 1610421 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.pack\n| \n| hades /usr/packages/poppler/poppler% git-count-objects\n| 0 objects, 0 kilobytes\n| \n| hades /usr/packages/poppler/poppler% git-remote update\n| Updating origin\n| remote: Generating pack...\n| remote: Done counting 491 objects.\n| remote: Result has 351 objects.\n| remote: Deltifying 351 objects.\n| remote:  100% (351/351) done\n| remote: Total 351, written 351 (delta 274), reused 0 (delta 0)\n| * refs/remotes/origin/master: fast forward to branch 'master' of git://git.freedesktop.org/git/poppler/poppler\n|   old..new: ab0a6c3..f24259c\n| * refs/remotes/origin/poppler-0.6: fast forward to branch 'poppler-0.6' of git://git.freedesktop.org/git/poppler/poppler\n|   old..new: 5c321d3..db1e360\n| Auto-following refs/tags/poppler-0.6.2\n| Auto-following refs/tags/poppler-0.6.3\n| remote: Generating pack...\n| remote: Done counting 2 objects.\n| remote: Deltifying 2 objects.\n| remote: /2) done\n| remote: Total 2, written 2 (delta 0), reused 0 (delta 0)\n| Unpacking 2 objects...\n|  100% (2/2) done\n| * refs/tags/poppler-0.6.2: storing tag 'poppler-0.6.2' of git://git.freedesktop.org/git/poppler/poppler\n|   tag: 26470b3\n| * refs/tags/poppler-0.6.3: storing tag 'poppler-0.6.3' of git://git.freedesktop.org/git/poppler/poppler\n|   tag: fdf7e0b\n| \n| hades /usr/packages/poppler/poppler% ls -al .git/objects/pack\n| drwxr-xr-x 2 compiler hackers    2048 2007-12-12 20:35 .\n| drwxr-xr-x 6 compiler hackers    2048 2007-12-12 20:35 ..\n| -r--r--r-- 1 compiler hackers   12080 2007-12-12 20:35 pack-f534c957f3ee7f3f1046dee0081fcc315d9698bb.idx\n| -r--r--r-- 1 compiler hackers  678643 2007-12-12 20:35 pack-f534c957f3ee7f3f1046dee0081fcc315d9698bb.pack\n| -r--r--r-- 1 compiler hackers  149288 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.idx\n| -rw-r--r-- 1 compiler hackers       0 2007-12-06 14:45 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.keep\n| -r--r--r-- 1 compiler hackers 1610421 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.pack\n`----\n\nOK, so that's a 662Kb packfile, 351/274...\n\n[... a couple of trivial merges, then ...]\n\n,----\n| hades /usr/packages/poppler/poppler% git-count-objects\n| 5 objects, 10 kilobytes\n| \n| hades /usr/packages/poppler/poppler% git-gc\n| Generating pack...\n| Done counting 827 objects.\n| Deltifying 827 objects...\n|  100% (827/827) done\n| Writing 827 objects...\n|  100% (827/827) done\n| Total 827 (delta 393), reused 695 (delta 331)\n| Pack pack-5145ce9770077cee99795fc21cfcc6ea30eb6d47 created.\n| Removing unused objects 100%...\n| Done.\n| \n| hades /usr/packages/poppler/poppler% ls -al .git/objects/pack\n| drwxr-xr-x 2 compiler hackers    2048 2007-12-12 20:36 .\n| drwxr-xr-x 4 compiler hackers    2048 2007-12-12 20:36 ..\n| -r--r--r-- 1 compiler hackers   20912 2007-12-12 20:36 pack-5145ce9770077cee99795fc21cfcc6ea30eb6d47.idx\n| -r--r--r-- 1 compiler hackers 1144055 2007-12-12 20:36 pack-5145ce9770077cee99795fc21cfcc6ea30eb6d47.pack\n| -r--r--r-- 1 compiler hackers  149288 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.idx\n| -rw-r--r-- 1 compiler hackers       0 2007-12-06 14:45 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.keep\n| -r--r--r-- 1 compiler hackers 1610421 2007-10-25 23:51 pack-f5a84fe3e212f9dc62a65aee617be4bf1387cb2b.pack\n`----\n\nThe git-gc figures are wildly different from the original server-side\npacking, as is the size of the resulting packfile.\n\nThis has me scared to do git-gc, which is presumably not good if we're\nsupposed to get into the habit of running it whenever we have a spare\nmoment :)\n\nA while back I did a git-gc on the kernel and watched as a 10Mb pack\nresulting from a git-pull blew right up to 130Mb: I had to zap the .keep\nfile, do a complete repack, and blow a backup CD to get the space\nback. (This only happens if you have .keep files lying around: if git-gc\nis allowed to amalgamate all your packs, it doesn't do this.)\n\nPossibly-relevant .gitconfig settings:\n\n[core]\nlegacyheaders=false\ndeltabasecachelimit=32m\n\n[pack]\nwindow=50\naggressiveWindow=100\ndepth=100\n\n[repack]\nusedeltabaseoffset=true\n\n(yes, those windows and depths are intentionally high. I was hoping that\nmaybe the servers were running with enormous windows... it didn't help.)\n\n-- \n`The rest is a tale of post and counter-post.' --- Ian Rawlings\n                                                   describes USENET\n"}]}