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

Re: Quick question: how to generate a patch?

From
Linus Torvalds <torvalds@osdl.org>
Date
Feb 28, 2006, 02:09 UTC
Message-ID
<Pine.LNX.4.64.0602271802110.22647@g5.osdl.org>
In-Reply-To
<6d6a94c50602271755v41e0d31ch25892192547003a9@mail.gmail.com>
On Tue, 28 Feb 2006, Aubrey wrote:
> 
> I'm using suse9.3. The filesystem is EXT3.

Ok, something else is going on. There's no way ext3 can get confused about times that I can see.

> I think I forgot one thing last night. When I changed the file, I
> compiled the package to verify my modification. It should be the
> reason. But should it really affect the result of "git diff"?
Nope. Something else is happening.

If you can re-create this at will, it would be interesting to see _what_ makes git think you've modified a file. A small mod to "read-cache.c" like the appended patch should give you (very very verbose) output that could help us figure this out.

		Linus
----
diff --git a/read-cache.c b/read-cache.c
index f97f92d..4946163 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -183,6 +183,8 @@ int ce_match_stat(struct cache_entry *ce
 	    index_file_timestamp <= ntohl(ce->ce_mtime.sec))
 		changed |= ce_modified_check_fs(ce, st);
 
+if (changed) error("changed: 0x%x %s", changed, ce->name);
+
 	return changed;
 }
 
Previous: AubreyNext: Aubrey
Message 11 of 13 in “Quick question: how to generate a patch?”
  1. AubreyFeb 27, 2006
  2. Andreas EricssonFeb 27, 2006
  3. Linus TorvaldsFeb 27, 2006
  4. AubreyFeb 27, 2006
  5. Linus TorvaldsFeb 27, 2006
  6. AubreyFeb 27, 2006
  7. Andreas EricssonFeb 27, 2006
  8. AubreyFeb 27, 2006
  9. Linus TorvaldsFeb 27, 2006
  10. AubreyFeb 28, 2006
  11. Linus TorvaldsFeb 28, 2006
  12. AubreyFeb 28, 2006
  13. Linus TorvaldsFeb 27, 2006

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.