{"thread":{"id":"4906","subject":"git-repack not removing files from $GIT_DIR/objects/[00-ff]","startedAt":"2006-07-17T00:44:52Z","lastAt":"2006-07-17T03:26:23Z","messageCount":6,"participants":["Post, Mark K","Shawn Pearce","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"23885","messageId":"5A14AF34CFF8AD44A44891F7C9FF410507E43005@usahm236.amer.corp.eds.com","threadId":"4906","inReplyTo":null,"subject":"git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Post, Mark K","fromEmail":"mark.post@eds.com","sentAt":"2006-07-17T00:44:52Z","receivedAt":"2006-07-17T00:44:52Z","isPatch":false,"sender":{"key":"mark.post@eds.com","avatar":null},"body":"I'm having a problem that just started occurring with git-repack not\nremoving the files from $GIT_DIR/objects/*, and therefore not removing\nthe directories, since they're not empty.  The command I'm using (as the\ngit user) is this:\nGIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n\nThis used to work, but then suddenly stopped working.  I ran an strace\n-f -F with this same command, and I don't see any attempt being made to\nunlink the files in $GIT_DIR/objects/*/, but I do see the rmdir commands\nfailing because the directories are not empty.  All of the files in\nthose directories are owned by git:git.\n\nI tried upgrading to git 1.4.1, but the same thing happens.  The gzipped\nstrace output is almost 5MB in size, certainly not appropriate to attach\nhere.  I can make it available from the system's web server if anyone\nwants to look at it.\n\nPlease let me know if there's any other information needed.\n\n\nMark Post\n"},{"id":"23886","messageId":"20060717012154.GA27389@spearce.org","threadId":"4906","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF410507E43005@usahm236.amer.corp.eds.com","subject":"Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-07-17T01:21:54Z","receivedAt":"2006-07-17T01:21:54Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Post, Mark K\" <mark.post@eds.com> wrote:\n> I'm having a problem that just started occurring with git-repack not\n> removing the files from $GIT_DIR/objects/*, and therefore not removing\n> the directories, since they're not empty.  The command I'm using (as the\n> git user) is this:\n> GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n> \n> This used to work, but then suddenly stopped working.  I ran an strace\n> -f -F with this same command, and I don't see any attempt being made to\n> unlink the files in $GIT_DIR/objects/*/, but I do see the rmdir commands\n> failing because the directories are not empty.  All of the files in\n> those directories are owned by git:git.\n\nTry running `git-prune-packed` after git-repack.  git-repack doesn't\ndelete the loose objects.\n\nI don't remember git-repack ever doing it either.\n\n-- \nShawn.\n"},{"id":"23887","messageId":"5A14AF34CFF8AD44A44891F7C9FF410507E43006@usahm236.amer.corp.eds.com","threadId":"4906","inReplyTo":"20060717012154.GA27389@spearce.org","subject":"RE: git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Post, Mark K","fromEmail":"mark.post@eds.com","sentAt":"2006-07-17T01:47:37Z","receivedAt":"2006-07-17T01:47:37Z","isPatch":false,"sender":{"key":"mark.post@eds.com","avatar":null},"body":"Thanks for the suggestion, but it didn't help.  One reason is that this\nis a bare repository.  When I ran the command, it aborted with \"fatal:\nNot a git repository.\"  Most likely because bare repositories don't have\na .git directory in them.\n\n\nMark Post \n\n-----Original Message-----\nFrom: spearce@spearce.org [mailto:spearce@spearce.org] \nSent: Sunday, July 16, 2006 9:22 PM\nTo: Post, Mark K\nCc: git@vger.kernel.org\nSubject: Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]\n\n\"Post, Mark K\" <mark.post@eds.com> wrote:\n> I'm having a problem that just started occurring with git-repack not\n> removing the files from $GIT_DIR/objects/*, and therefore not removing\n> the directories, since they're not empty.  The command I'm using (as\nthe\n> git user) is this:\n> GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n> \n> This used to work, but then suddenly stopped working.  I ran an strace\n> -f -F with this same command, and I don't see any attempt being made\nto\n> unlink the files in $GIT_DIR/objects/*/, but I do see the rmdir\ncommands\n> failing because the directories are not empty.  All of the files in\n> those directories are owned by git:git.\n\nTry running `git-prune-packed` after git-repack.  git-repack doesn't\ndelete the loose objects.\n\nI don't remember git-repack ever doing it either.\n\n-- \nShawn.\n"},{"id":"23888","messageId":"20060717015149.GB27389@spearce.org","threadId":"4906","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF410507E43006@usahm236.amer.corp.eds.com","subject":"Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-07-17T01:51:49Z","receivedAt":"2006-07-17T01:51:49Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"So try:\n\n  GIT_DIR=/home/git/pub/scm/linux-2.6.git git-prune-packed\n\nOn a bare repository you should always set the GIT_DIR environment\nvariable to the directory of the repository before running the\ncommand.\n\n\"Post, Mark K\" <mark.post@eds.com> wrote:\n> Thanks for the suggestion, but it didn't help.  One reason is that this\n> is a bare repository.  When I ran the command, it aborted with \"fatal:\n> Not a git repository.\"  Most likely because bare repositories don't have\n> a .git directory in them.\n> \n> \n> Mark Post \n> \n> -----Original Message-----\n> From: spearce@spearce.org [mailto:spearce@spearce.org] \n> Sent: Sunday, July 16, 2006 9:22 PM\n> To: Post, Mark K\n> Cc: git@vger.kernel.org\n> Subject: Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]\n> \n> \"Post, Mark K\" <mark.post@eds.com> wrote:\n> > I'm having a problem that just started occurring with git-repack not\n> > removing the files from $GIT_DIR/objects/*, and therefore not removing\n> > the directories, since they're not empty.  The command I'm using (as\n> the\n> > git user) is this:\n> > GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n> > \n> > This used to work, but then suddenly stopped working.  I ran an strace\n> > -f -F with this same command, and I don't see any attempt being made\n> to\n> > unlink the files in $GIT_DIR/objects/*/, but I do see the rmdir\n> commands\n> > failing because the directories are not empty.  All of the files in\n> > those directories are owned by git:git.\n> \n> Try running `git-prune-packed` after git-repack.  git-repack doesn't\n> delete the loose objects.\n> \n> I don't remember git-repack ever doing it either.\n\n-- \nShawn.\n"},{"id":"23890","messageId":"5A14AF34CFF8AD44A44891F7C9FF410507E43009@usahm236.amer.corp.eds.com","threadId":"4906","inReplyTo":"20060717015149.GB27389@spearce.org","subject":"RE: git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Post, Mark K","fromEmail":"mark.post@eds.com","sentAt":"2006-07-17T02:48:56Z","receivedAt":"2006-07-17T02:48:56Z","isPatch":false,"sender":{"key":"mark.post@eds.com","avatar":null},"body":"That doesn't generate any error messages, but it also doesn't clean up\nthe files in the object directory.\n\n\nMark Post \n\n-----Original Message-----\nFrom: spearce@spearce.org [mailto:spearce@spearce.org] \nSent: Sunday, July 16, 2006 9:52 PM\nTo: Post, Mark K\nCc: git@vger.kernel.org\nSubject: Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]\n\nSo try:\n\n  GIT_DIR=/home/git/pub/scm/linux-2.6.git git-prune-packed\n\nOn a bare repository you should always set the GIT_DIR environment\nvariable to the directory of the repository before running the\ncommand.\n\n\"Post, Mark K\" <mark.post@eds.com> wrote:\n> Thanks for the suggestion, but it didn't help.  One reason is that\nthis\n> is a bare repository.  When I ran the command, it aborted with \"fatal:\n> Not a git repository.\"  Most likely because bare repositories don't\nhave\n> a .git directory in them.\n> \n> \n> Mark Post \n> \n> -----Original Message-----\n> From: spearce@spearce.org [mailto:spearce@spearce.org] \n> Sent: Sunday, July 16, 2006 9:22 PM\n> To: Post, Mark K\n> Cc: git@vger.kernel.org\n> Subject: Re: git-repack not removing files from\n$GIT_DIR/objects/[00-ff]\n> \n> \"Post, Mark K\" <mark.post@eds.com> wrote:\n> > I'm having a problem that just started occurring with git-repack not\n> > removing the files from $GIT_DIR/objects/*, and therefore not\nremoving\n> > the directories, since they're not empty.  The command I'm using (as\n> the\n> > git user) is this:\n> > GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n> > \n> > This used to work, but then suddenly stopped working.  I ran an\nstrace\n> > -f -F with this same command, and I don't see any attempt being made\n> to\n> > unlink the files in $GIT_DIR/objects/*/, but I do see the rmdir\n> commands\n> > failing because the directories are not empty.  All of the files in\n> > those directories are owned by git:git.\n> \n> Try running `git-prune-packed` after git-repack.  git-repack doesn't\n> delete the loose objects.\n> \n> I don't remember git-repack ever doing it either.\n\n-- \nShawn.\n"},{"id":"23891","messageId":"20060717032623.GA32406@coredump.intra.peff.net","threadId":"4906","inReplyTo":"5A14AF34CFF8AD44A44891F7C9FF410507E43005@usahm236.amer.corp.eds.com","subject":"Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-07-17T03:26:23Z","receivedAt":"2006-07-17T03:26:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jul 16, 2006 at 08:44:52PM -0400, Post, Mark K wrote:\n\n> I'm having a problem that just started occurring with git-repack not\n> removing the files from $GIT_DIR/objects/*, and therefore not removing\n> the directories, since they're not empty.  The command I'm using (as the\n> git user) is this:\n> GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l\n\ngit-prune-packed (which, contrary to what Shawn said, is run by\ngit-repack -d) will only remove objects which are redundant because of\ntheir presence in packs. It will not remove objects which are not\nreachable (which is normal if you have, for example, done a rebase in\nthis repository). Check out git-prune and git-fsck-objects.\n\n-Peff\n"}]}