git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dmitry Potapov <dpotapov@gmail.com>
To: "Toralf Förster" <toralf.foerster@gmx.de>
Cc: "Jeff King" <peff@peff.net>,
	"Torsten Bögershausen" <tboegi@web.de>,
	"Andrew Ardill" <andrew.ardill@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: problem with BOINC repository and CR/LF
Date: Sat, 22 Dec 2012 21:54:37 +0300	[thread overview]
Message-ID: <CAHkcotjv2EKdzJ3d-2YfFrHe0kv0keq1LVuzGAA5VwYTUTOcvw@mail.gmail.com> (raw)
In-Reply-To: <50D5A81B.1000306@gmx.de>

On Sat, Dec 22, 2012 at 4:31 PM, Toralf Förster <toralf.foerster@gmx.de> wrote:
>
> /me still wonders whether this race condition is a feature or an issue
> in GIT - b/c it means that 2 different people cloning the same
> repository get different results.

The problem is that Git assumes that conversion from git to the worktree
and back produces the same result. Unfortunately, this assumption is not
enforced anywhere and when it is broken by editing .gitattributes, it may
be difficult to notice that immediately unless you do that trick with
removing the index and "git reset". Perhaps, it would be better if
git considered that timestamps on all files changed if .gitattributes
is changed, so it would check all files for consistence, then anyone
who edits .gitattributes will be forced to fix the file ending to be
consistent.

Anyway, when this underlying assumption is broken, it is easy to get
that race, because git checks only those files for modification that
have its timestamp equal or newer than the index. (The equal timestamp
are inspected for modification, because the timestamp resolution can
be 1 second on some systems.) When you check out some version, some
of files are going to have an older timestamp than the index (and thus
they are not inspected for modification) but those that have the same
timestamp as the index are inspected for modification.


Dmitry

  reply	other threads:[~2012-12-22 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 10:23 problem with BOINC repository and CR/LF Toralf Förster
2012-12-17 11:38 ` Andrew Ardill
2012-12-17 16:01   ` Toralf Förster
2012-12-18  1:56     ` Andrew Ardill
2012-12-18  9:55       ` Toralf Förster
2012-12-18  9:58         ` Toralf Förster
2012-12-18 12:15         ` Torsten Bögershausen
2012-12-18 16:41           ` Jeff King
2012-12-19 10:44             ` Toralf Förster
2012-12-22 12:31             ` Toralf Förster
2012-12-22 18:54               ` Dmitry Potapov [this message]
2012-12-22 19:17               ` Junio C Hamano
2012-12-19 10:43           ` Toralf Förster

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAHkcotjv2EKdzJ3d-2YfFrHe0kv0keq1LVuzGAA5VwYTUTOcvw@mail.gmail.com \
    --to=dpotapov@gmail.com \
    --cc=andrew.ardill@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    --cc=toralf.foerster@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).