1
0
mirror of https://github.com/git/git.git synced 2025-03-25 12:25:00 +00:00
Ramsay Jones 452993c297 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>
2011-06-16 15:10:54 -07:00
..
2010-12-16 12:55:36 -08:00
2010-12-16 12:55:36 -08:00
2008-09-30 14:30:06 -07:00
2009-03-02 18:28:06 -08:00
2011-05-23 10:27:12 -07:00
2011-05-23 10:27:12 -07:00
2007-06-07 00:04:01 -07:00
2010-11-23 16:06:50 -08:00
2010-08-14 19:35:38 -07:00
2009-09-18 20:00:42 -07:00