From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>, Jeff King <peff@peff.net>,
Erik Faye-Lund <kusmabite@gmail.com>
Subject: Re: [PATCH 2/3] t1301-*.sh: Fix the 'forced modes' test on cygwin
Date: Sat, 18 Jun 2011 20:04:15 +0100 [thread overview]
Message-ID: <4DFCF6AF.3060502@ramsay1.demon.co.uk> (raw)
In-Reply-To: <4DFB0C66.5080904@kdbg.org>
Johannes Sixt wrote:
> BTW, it seems the patch fixes a bug when the two config parameters are
> not assigned a value: the initialization looks like this[*]:
>
> static int native_stat = 1;
> static int core_filemode;
>
> i.e., the default value of core.filemode seen by compat/cygwin.c is
> actually false, and the fast native l/stat would be used, contrary to
> the documentation. Am I missing something?
No, that is indeed a bug. See commit 7974843 (compat/cygwin.c: make
runtime detection of lstat/stat lessor impact, 23-10-2008).
That commit "taught" me to always change the core.filemode key set up
by git-init by changing the value ("false" -> "true"), *not* by simply
deleting that line in .git/config. Otherwise, you end up with the
"trust_executable_bit" (aka core.filemode) set to 1 and core_filemode
set to 0. This leads to yet more schizophrenic behaviour; for example,
in my cygwin git repo:
$ git diff-files -p
$ vim .git/config # remove the core.filemode key
$ git diff-files -p
diff --git a/.gitattributes b/.gitattributes
diff --git a/.gitignore b/.gitignore
diff --git a/.mailmap b/.mailmap
diff --git a/COPYING b/COPYING
diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
...
diff --git a/check-builtins.sh b/check-builtins.sh
old mode 100755
new mode 100644
diff --git a/check-racy.c b/check-racy.c
diff --git a/check_bindir b/check_bindir
old mode 100755
new mode 100644
diff --git a/color.c b/color.c
...
diff --git a/xdiff/xutils.c b/xdiff/xutils.c
diff --git a/xdiff/xutils.h b/xdiff/xutils.h
diff --git a/zlib.c b/zlib.c
$ git diff-files -p | wc -l
3438
$ git diff-files -p | grep '^old mode' | wc -l
641
$ vim .git/config # put "core.filemode true" back in
$ git diff-files -p
$
I had a patch in my cygwin repo which initialized core_filemode to 1
for ages, but never remembered to submit it. (I can't find it anymore,
so I must have deleted that branch). Not that I actually ran a git
with that patch applied.
ATB,
Ramsay Jones
next prev parent reply other threads:[~2011-06-18 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 20:23 [PATCH 2/3] t1301-*.sh: Fix the 'forced modes' test on cygwin Ramsay Jones
2011-06-16 22:10 ` Junio C Hamano
2011-06-17 22:26 ` Ramsay Jones
2011-06-17 8:12 ` Johannes Sixt
2011-06-17 21:27 ` Junio C Hamano
2011-06-18 19:04 ` Ramsay Jones [this message]
2011-06-20 19:31 ` Re* " Junio C Hamano
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=4DFCF6AF.3060502@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=kusmabite@gmail.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.