Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Tomas Pospisek <tpo_deb@sourcepole.ch>
Cc: git@vger.kernel.org
Subject: Re: Bug? file at the same time being deleted and not registered
Date: Sun, 23 May 2010 19:44:59 -0400	[thread overview]
Message-ID: <20100523234459.GA8285@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1005232245220.18372@tpo-laptop>

On Sun, May 23, 2010 at 11:09:53PM +0200, Tomas Pospisek wrote:

> So we have a file that was committed, that git thinks it's scheduled to be
> deleted and at the same time is untracked. Doesn't make any sense,
> does it?
> 
> This happens only on the mhddfs backed filesystem. The same procedure
> works well in /tmp or on plain ext3.
> 
> Here's the strace of the commit step (from a identical try):
> 
>    http://pastebin.com/htUmWYGh
> 
> Jan 'jast' Krüger from the git IRC channel spotted in that strace the
> fact that the 'link' call is failing.
> 
> In that case IMHO git should complain and let the user know, that
> something went wrong and it can't proceed meaningfully.

If you mean this (from your strace):

  link(".git/objects/df/tmp_obj_cL0wfQ", ".git/objects/df/2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078") = -1 ENOSYS (Function not implemented)

Note that it is immediately followed by:

  rename(".git/objects/df/tmp_obj_cL0wfQ", ".git/objects/df/2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078") = 0

IOW, git tries the hard-link first, then falls back to the rename. If
the rename also fails, git does complain. So I don't think that is your
problem.

I would guess your real problem is that when we traverse the directory
structure and see "a_file", for some reason git is not connecting that
with the index entry for "a_file". In the past, problems like this are
usually due to filesystems which munge the filename behind git's back.
I.e., if you do "touch foo" you get some file whose name _looks_ like
"foo" but is not bit-for-bit compatible. HFS will do this when
normalizing utf8 characters, but I don't think we've ever seen it on
anything as plain as "a_file".

Can you try running the output of "git diff-files --name-only" and "git
ls-files -o" through xxd or something that would show individual bytes?
My suspicion is that the "a_file" shown in each may not be bit-for-bit
identical.

-Peff

  reply	other threads:[~2010-05-23 23:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 21:09 Bug? file at the same time being deleted and not registered Tomas Pospisek
2010-05-23 23:44 ` Jeff King [this message]
2010-05-24  8:02   ` Tomas Pospisek
2010-05-24  8:24     ` Jeff King
2010-05-24  8:29       ` Tomas Pospisek
2010-05-24  8:49         ` Jeff King
2010-05-24  9:26           ` Tomas Pospisek
2010-05-24 10:32           ` Tomas Pospisek
2010-05-24 14:46             ` Tomas Pospisek

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=20100523234459.GA8285@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=tpo_deb@sourcepole.ch \
    /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