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

[PATCH] Fix +x-related show-diff false positives

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 17, 2005, 11:44 UTC
Message-ID
<20050417114451.GB1487@pasky.ji.cz>
  Hi,
  the following patch fixes show-diff listing all +x files as differring.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
--- read-cache.c
+++ read-cache.c	2005-04-17 13:42:13.322938268 +0200
@@ -306,7 +306,7 @@
 	    ce->ce_gid != htonl(st->st_gid))
 		changed |= OWNER_CHANGED;
 	/* We consider only the owner x bit to be relevant for "mode changes" */
-	if (0100 & (ntohs(ce->ce_mode) ^ st->st_mode))
+	if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))
 		changed |= MODE_CHANGED;
 	if (ce->ce_dev != htonl(st->st_dev) ||
 	    ce->ce_ino != htonl(st->st_ino))

  (It is against my tree, but I think it should apply cleanly to yours
too; perhaps with a tiny offset.)

  Kind regards,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Message 1 of 1 in “Fix +x-related show-diff false positives”
  1. Fix +x-related show-diff false positivesPetr Baudis, Apr 17, 2005

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.