Git development
 help / color / mirror / Atom feed
* [PATCH] Fix +x-related show-diff false positives
@ 2005-04-17 11:44 Petr Baudis
  0 siblings, 0 replies; only message in thread
From: Petr Baudis @ 2005-04-17 11:44 UTC (permalink / raw)
  To: torvalds; +Cc: git

  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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-17 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-17 11:44 [PATCH] Fix +x-related show-diff false positives Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox