git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: Christian Halstrick <christian.halstrick@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: how to produce an index with smudged entries
Date: Sun, 02 Oct 2011 15:10:24 +0200	[thread overview]
Message-ID: <4E8862C0.7010906@dewire.com> (raw)
In-Reply-To: <CAENte7h-sbv7VTBdV7A+=TtONTpgOBBfVWz2Nejm1DqJJ9tFiQ@mail.gmail.com>

Christian Halstrick skrev 2011-09-30 17.33:
> I am trying to find out how native git handles the racy git problem. I
> read https://raw.github.com/git/git/master/Documentation/technical/racy-git.txt.
> But I cannot reproduce the behaviour described in this text.

I guess that code is only likely to work if USE_NSEC is not set or the
file system has only whole second resolution. It might be very hard to 
reproduce the situation since the likehood that a file AND the index has 
the same timestamp at the subsecond level is very small. Nasty thing to 
test :)

Is your file system one that does not have subsecond timestamp 
resolution? The nanosecond part of the timestamp(s) should be 0 (byte 
24-27 for mtime for the first index entry).

Touch can set the timestamp to an explicit value, so you can use that 
instead of waiting for luck. Touch cannot set ctime, but you can make 
git ignore ctime by setting core.trustctime to false.

For testing the issue with nanosecond resolution you have to roll your 
own touch in C, perl or even Java.

-- robin

      reply	other threads:[~2011-10-02 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 15:33 how to produce an index with smudged entries Christian Halstrick
2011-10-02 13:10 ` Robin Rosenberg [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=4E8862C0.7010906@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=christian.halstrick@gmail.com \
    --cc=git@vger.kernel.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).