git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Langhoff <martin.langhoff@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Strange unable to unlink error with git-prune-packed
Date: Thu, 5 Jan 2006 11:10:20 +1300	[thread overview]
Message-ID: <46a038f90601041410m7628adfdr3ec81015d80d0f8e@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0601040828590.3668@g5.osdl.org>

On 1/5/06, Linus Torvalds <torvalds@osdl.org> wrote:
> Does it happen for all your files? All your repositories? Or just one
> repo?

Good questions -- should have sorted those basic things out before
posting. Apologies. In any case, I haven't seen that before, but I
don't run git-prune-packed that often on the OSX commandline. My main
dev host is a linux machine, and I have a weekly cron that does repack
and prune packed on all my repos.

> Or just one subdirectory in that repo?

It refused to unlink _any_ files within .git/objects

> The code is _literally_ just doing a
>
>         if (unlink(pathname) < 0)
>                 error("unable to unlink %s", pathname);
>
> but maybe you could just make it print out the reason too. So add a "(%s)"
> and a "strerror(errno)" to that error line..

This morning, after a reboot, I patched prune-packed.c as suggested
and ran it... and it all worked.

Initially I suspected the files were locked somehow, but I just did a
new clone && git-repack && git-prune-packed and it just worked...
Grrr.

> I don't see why you couldn't unlink those files. Maybe it's some strange
> HFS issue and you can't just unlink() things that have attributes or
> something? Maybe some crazy file manager has added a default icon
> attribute to your files if you happened to look at the .git objects
> directory?

It is indeed HFS but I'm pretty sure things should be transparent to
the unix side of things. In any case, the (crazy filemanager) Finder
wasn't involved, as this is a newish repo, I haven't looked at any
directory around it with Finder, and it's known to leave hidden files
all over the place.

In any case, I've got my git-prune-packed patched now, and will be
trying to repro the bug.

cheers,


martin

      reply	other threads:[~2006-01-04 22:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04  4:46 Strange unable to unlink error with git-prune-packed Martin Langhoff
2006-01-04 16:34 ` Linus Torvalds
2006-01-04 22:10   ` Martin Langhoff [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46a038f90601041410m7628adfdr3ec81015d80d0f8e@mail.gmail.com \
    --to=martin.langhoff@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).