git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org, spearce@spearce.org
Subject: Re: [PATCH] Add core.trustlowlevelstat for diffs in dev,ino,uid and gid
Date: Sun, 26 Apr 2009 11:38:08 -0700	[thread overview]
Message-ID: <7vocujjm5r.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 200904261306.15448.robin.rosenberg.lists@dewire.com

Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:

> söndag 26 april 2009 12:55:17 skrev Robin Rosenberg:
>> This reason we may want to ignore these fields is that the Java implementation 
>> of Git cannot set these fields properly. To mark this JGit sets these fields
>> to to UINT_MAX (all bits set).
>
> Oopps, you won't be able to apply this one,...

Yeah, I noticed your ~0u hack, but it is clear what is going on in the
patch.

I had a similar patch that disables inum checking in my private tree for
different reasons of my own; the set of fields your patch ignores is a
compatible superset of, and I think makes more sense than, what I was
planning to do, so no objections from me on this _optional_ feature.

It might be easier (with proper re-indentation, which I omitted from this
patch with "diff -w") and more efficient to do this, though...

diff --git a/read-cache.c b/read-cache.c
index 3f58711..03ecd11 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -210,6 +210,8 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 		changed |= CTIME_CHANGED;
 #endif
 
+	if (trust_lowlevel_stat) {
+
 	if (ce->ce_uid != (unsigned int) st->st_uid ||
 	    ce->ce_gid != (unsigned int) st->st_gid)
 		changed |= OWNER_CHANGED;
@@ -226,6 +228,7 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 		changed |= INODE_CHANGED;
 #endif
 
+	}
 	if (ce->ce_size != (unsigned int) st->st_size)
 		changed |= DATA_CHANGED;
 

  parent reply	other threads:[~2009-04-26 18:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-26 10:55 [PATCH] Add core.trustlowlevelstat for diffs in dev,ino,uid and gid Robin Rosenberg
2009-04-26 11:06 ` Robin Rosenberg
2009-04-26 12:06   ` [PATCH 1/2] Silence diffs due to use by non-C code Robin Rosenberg
2009-04-26 18:38   ` Junio C Hamano [this message]
2009-04-26 19:25     ` [PATCH] Add core.trustlowlevelstat for diffs in dev,ino,uid and gid Linus Torvalds
2009-04-26 22:02       ` Robin Rosenberg
2009-04-27  6:55       ` Junio C Hamano
2009-04-27 15:00         ` Linus Torvalds
2009-04-27 15:58           ` Kjetil Barvik
2010-03-14 20:51             ` Robin Rosenberg
2010-03-15  6:50               ` Junio C Hamano
2010-03-15  7:41                 ` Alex Riesen

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=7vocujjm5r.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg.lists@dewire.com \
    --cc=spearce@spearce.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).