diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2011-06-16 21:23:14 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-06-16 15:10:54 -0700 |
commit | 452993c297530498780d4b0c7b2b267258cb625f (patch) | |
tree | 452764f89023424f2601d2c6156c06326d26830a /test-index-version.c | |
parent | b8a9733377a648483958bf5472158f7c01641420 (diff) | |
download | git-452993c297530498780d4b0c7b2b267258cb625f.tar.gz git-452993c297530498780d4b0c7b2b267258cb625f.tar.xz |
t1301-*.sh: Fix the 'forced modes' test on cygwin
The 'forced modes' test fails on cygwin because the post-update
hook loses it's executable bit when copied from the templates
directory by git-init. The template loses it's executable bit
because the lstat() function resolves to the "native Win32 API"
implementation.
This call to lstat() happens after git-init has set the "git_dir"
(so has_git_dir() returns true), but before the configuration has
been fully initialised. At this point git_config() does not find
any config files to parse and returns 0. Unfortunately, the code
used to determine the cygwin l/stat() function bindings did not
check the return from git_config() and assumed that the config
was complete and accessible once "git_dir" was set.
In order to fix the test, we simply change the binding code to
test the return value from git_config(), to ensure that it actually
had config values to read, before determining the requested binding.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-index-version.c')
0 files changed, 0 insertions, 0 deletions