Re: [PATCH] Add core.trustlowlevelstat for diffs in dev,ino,uid and gid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg <robin.rosenberg.lists@xxxxxxxxxx> 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;
 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]