Fix pre-commit hooks under MinGW/MSYS
authorAlexander Gavrilov <angavrilov@gmail.com>
Wed, 16 Jul 2008 20:12:28 +0000 (00:12 +0400)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 17 Jul 2008 01:17:27 +0000 (21:17 -0400)
Apply the work-around for checking the executable
permission of hook files not only on Cygwin, but on
Windows in general.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh
index 940677cbd8558574fd9f9fb5812a0bbf46198588..e3b6669880f79eaaf6cf6cc91e70971a08d72e7b 100755 (executable)
@@ -473,10 +473,10 @@ proc githook_read {hook_name args} {
        set pchook [gitdir hooks $hook_name]
        lappend args 2>@1
 
-       # On Cygwin [file executable] might lie so we need to ask
+       # On Windows [file executable] might lie so we need to ask
        # the shell if the hook is executable.  Yes that's annoying.
        #
-       if {[is_Cygwin]} {
+       if {[is_Windows]} {
                upvar #0 _sh interp
                if {![info exists interp]} {
                        set interp [_which sh]