git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: git-repack not removing files from $GIT_DIR/objects/[00-ff]

From
PKPost, Mark K <mark.post@eds.com>
Date
Jul 17, 2006, 02:48 UTC
Message-ID
<5A14AF34CFF8AD44A44891F7C9FF410507E43009@usahm236.amer.corp.eds.com>
In-Reply-To
<20060717015149.GB27389@spearce.org>

That doesn't generate any error messages, but it also doesn't clean up the files in the object directory.

Mark Post 
-----Original Message-----
From: spearce@spearce.org [mailto:spearce@spearce.org] 
Sent: Sunday, July 16, 2006 9:52 PM
To: Post, Mark K
Cc: git@vger.kernel.org
Subject: Re: git-repack not removing files from $GIT_DIR/objects/[00-ff]
So try:
  GIT_DIR=/home/git/pub/scm/linux-2.6.git git-prune-packed

On a bare repository you should always set the GIT_DIR environment variable to the directory of the repository before running the command.

"Post, Mark K" <mark.post@eds.com> wrote:
> Thanks for the suggestion, but it didn't help.  One reason is that
this
> is a bare repository.  When I ran the command, it aborted with "fatal:
> Not a git repository."  Most likely because bare repositories don't
have
Show 11 quoted lines
> a .git directory in them.
> 
> 
> Mark Post 
> 
> -----Original Message-----
> From: spearce@spearce.org [mailto:spearce@spearce.org] 
> Sent: Sunday, July 16, 2006 9:22 PM
> To: Post, Mark K
> Cc: git@vger.kernel.org
> Subject: Re: git-repack not removing files from
$GIT_DIR/objects/[00-ff]
> 
> "Post, Mark K" <mark.post@eds.com> wrote:
> > I'm having a problem that just started occurring with git-repack not
> > removing the files from $GIT_DIR/objects/*, and therefore not
removing
Show 6 quoted lines
> > the directories, since they're not empty.  The command I'm using (as
> the
> > git user) is this:
> > GIT_DIR=/home/git/pub/scm/linux-2.6.git git-repack -a -d -l
> > 
> > This used to work, but then suddenly stopped working.  I ran an
strace
Show 11 quoted lines
> > -f -F with this same command, and I don't see any attempt being made
> to
> > unlink the files in $GIT_DIR/objects/*/, but I do see the rmdir
> commands
> > failing because the directories are not empty.  All of the files in
> > those directories are owned by git:git.
> 
> Try running `git-prune-packed` after git-repack.  git-repack doesn't
> delete the loose objects.
> 
> I don't remember git-repack ever doing it either.
-- 
Shawn.
Previous: Shawn PearceNext: Jeff King
Message 5 of 6 in “git-repack not removing files from $GIT_DIR/objects/[00-ff]”
  1. Post, Mark KJul 17, 2006
  2. Shawn PearceJul 17, 2006
  3. Post, Mark KJul 17, 2006
  4. Shawn PearceJul 17, 2006
  5. Post, Mark KJul 17, 2006
  6. Jeff KingJul 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.