Git development
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@ucw.cz>
To: torvalds@osdl.org
Cc: git@vger.kernel.org
Subject: [PATCH] Fix +x-related show-diff false positives
Date: Sun, 17 Apr 2005 13:44:51 +0200	[thread overview]
Message-ID: <20050417114451.GB1487@pasky.ji.cz> (raw)

  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

                 reply	other threads:[~2005-04-17 11:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050417114451.GB1487@pasky.ji.cz \
    --to=pasky@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox