git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 26, 2009, 18:38 UTC
Message-ID
<7vocujjm5r.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200904261306.15448.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
Show 6 quoted lines
> 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;
 
Previous: Robin RosenbergNext: Linus Torvalds
Message 4 of 12 in “Add core.trustlowlevelstat for diffs in dev,ino,uid and gid”
  1. Add core.trustlowlevelstat for diffs in dev,ino,uid and gidRobin Rosenberg, Apr 26, 2009
  2. Robin RosenbergApr 26, 2009
  3. 1/2 Silence diffs due to use by non-C code.Robin Rosenberg, Apr 26, 2009
  4. Junio C HamanoApr 26, 2009
  5. Linus TorvaldsApr 26, 2009
  6. Robin RosenbergApr 26, 2009
  7. Junio C HamanoApr 27, 2009
  8. Linus TorvaldsApr 27, 2009
  9. Kjetil BarvikApr 27, 2009
  10. Robin RosenbergMar 14, 2010
  11. Junio C HamanoMar 15, 2010
  12. Alex RiesenMar 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.