summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-13 14:31:36 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-13 14:31:36 -0700
commit551d75dbd80cb6af08376ea8a12bdaa3f5860f35 (patch)
tree006ba5c9799ef415c5531bfd122f0899823b351a /help.c
parentbc50897b90177f03c74e53467d1b62aec74789c5 (diff)
parent924aaf3ef764a5e8e976f68e024ecacf54ff6306 (diff)
downloadgit-551d75dbd80cb6af08376ea8a12bdaa3f5860f35.tar.gz
Merge branch 'rj/config-cygwin'
* rj/config-cygwin: config.c: Make git_config() work correctly when called recursively t1301-*.sh: Fix the 'forced modes' test on cygwin help.c: Fix detection of custom merge strategy on cygwin
Diffstat (limited to 'help.c')
-rw-r--r--help.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/help.c b/help.c
index 7654f1bfd6..e925ca1f89 100644
--- a/help.c
+++ b/help.c
@@ -127,7 +127,10 @@ static int is_executable(const char *name)
!S_ISREG(st.st_mode))
return 0;
-#ifdef WIN32
+#if defined(WIN32) || defined(__CYGWIN__)
+#if defined(__CYGWIN__)
+if ((st.st_mode & S_IXUSR) == 0)
+#endif
{ /* cannot trust the executable bit, peek into the file instead */
char buf[3] = { 0 };
int n;