git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elazar Leibovich <elazar.leibovich@oracle.com>
Cc: Git mailing list <git@vger.kernel.org>,
	idan brown <idan.brown@oracle.com>,
	Liran Alon <liran.alon@oracle.com>,
	Eyal Moscovici <eyal.moscovici@oracle.com>,
	nikita.leshchenko@oracle.com
Subject: Re: Unfortunate interaction between git diff-index and fakeroot
Date: Fri, 08 Dec 2017 07:38:47 -0800	[thread overview]
Message-ID: <xmqqwp1x9qm0.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <a770d158-c472-206f-dcdc-55cea0cf308f@oracle.com> (Elazar Leibovich's message of "Fri, 8 Dec 2017 11:48:40 +0200")

Elazar Leibovich <elazar.leibovich@oracle.com> writes:

> ignore unused information, such as commit
> 2cb45e95438c113871fbbea5b4f629f9463034e7
> which ignores st_dev, because it doesn't actually matter, or

I do not think it ignores because "it doesn't matter".  st_dev is
known not to be stable (e.g. across reboots and reconnects nfs), so
it is a poor indicator to use as a quick measure to see if the file
contents may have changed since we last checked.  On the other hand,
in a sane (it is of course open to debate "by whose definition")
environment, the fact that the owner of the file has changed _is_ a
significant enough sign to suspect that the file contents have
changed (i.e. the file is suspect to be dirty; you can actually
check and refresh, of course, though).

> commit e44794706eeb57f2ee38ed1604821aa38b8ad9d2 which ignores
> mode changes not relevant to the owner.

And that one is not even about the cached stat information used for
the quick "dirty-ness" check.  The change is about the mode bits in
recorded history.

File's mtime is not recorded in the history, either, but we do care
and record it in the index, because it can be used as a good (albeit
a bit too coarse grained) indicator that the contents of a file may
have changed.  

The owner and group fall into the same category.


      reply	other threads:[~2017-12-08 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  9:03 Unfortunate interaction between git diff-index and fakeroot Elazar Leibovich
2017-12-07 15:31 ` Junio C Hamano
2017-12-08  9:48   ` Elazar Leibovich
2017-12-08 15:38     ` Junio C Hamano [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

  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=xmqqwp1x9qm0.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=elazar.leibovich@oracle.com \
    --cc=eyal.moscovici@oracle.com \
    --cc=git@vger.kernel.org \
    --cc=idan.brown@oracle.com \
    --cc=liran.alon@oracle.com \
    --cc=nikita.leshchenko@oracle.com \
    /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).