{"thread":{"id":"14492","subject":"[PATCH (GIT-GUI)] Fix pre-commit hooks under MinGW/MSYS","startedAt":"2008-07-16T20:12:28Z","lastAt":"2008-07-17T01:18:22Z","messageCount":2,"participants":["Alexander Gavrilov","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"83574","messageId":"200807170012.28769.angavrilov@gmail.com","threadId":"14492","inReplyTo":null,"subject":"[PATCH (GIT-GUI)] Fix pre-commit hooks under MinGW/MSYS","fromName":"Alexander Gavrilov","fromEmail":"angavrilov@gmail.com","sentAt":"2008-07-16T20:12:28Z","receivedAt":"2008-07-16T20:12:28Z","isPatch":true,"sender":{"key":"angavrilov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42666?v=4"},"body":"Apply the work-around for checking the executable\npermission of hook files not only on Cygwin, but on\nWindows in general.\n\nSigned-off-by: Alexander Gavrilov <angavrilov@gmail.com>\n---\n\tThis is a fix for msysgit issue #118.\n\t(http://code.google.com/p/msysgit/issues/detail?id=118)\n\n\tI've already sent this patch, but resend it as I haven't received any reply,\n\tand it is not in git-gui.git yet.\n\n\t-- Alexander\n\n git-gui.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex e6e8890..2d14bf2 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -473,10 +473,10 @@ proc githook_read {hook_name args} {\n \tset pchook [gitdir hooks $hook_name]\n \tlappend args 2>@1\n \n-\t# On Cygwin [file executable] might lie so we need to ask\n+\t# On Windows [file executable] might lie so we need to ask\n \t# the shell if the hook is executable.  Yes that's annoying.\n \t#\n-\tif {[is_Cygwin]} {\n+\tif {[is_Windows]} {\n \t\tupvar #0 _sh interp\n \t\tif {![info exists interp]} {\n \t\t\tset interp [_which sh]\n-- \n1.5.3.3\n"},{"id":"83632","messageId":"20080717011822.GB16740@spearce.org","threadId":"14492","inReplyTo":"200807170012.28769.angavrilov@gmail.com","subject":"Re: [PATCH (GIT-GUI)] Fix pre-commit hooks under MinGW/MSYS","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-07-17T01:18:22Z","receivedAt":"2008-07-17T01:18:22Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Alexander Gavrilov <angavrilov@gmail.com> wrote:\n> Apply the work-around for checking the executable\n> permission of hook files not only on Cygwin, but on\n> Windows in general.\n> \n> Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>\n> ---\n> \tThis is a fix for msysgit issue #118.\n> \t(http://code.google.com/p/msysgit/issues/detail?id=118)\n> \n> \tI've already sent this patch, but resend it as I haven't received any reply,\n> \tand it is not in git-gui.git yet.\n\nThanks.  I'm not sure why I dropped this earlier, but it is\nin my git-gui tree now.\n\n \n> diff --git a/git-gui.sh b/git-gui.sh\n> index e6e8890..2d14bf2 100755\n> --- a/git-gui.sh\n> +++ b/git-gui.sh\n> @@ -473,10 +473,10 @@ proc githook_read {hook_name args} {\n>  \tset pchook [gitdir hooks $hook_name]\n>  \tlappend args 2>@1\n>  \n> -\t# On Cygwin [file executable] might lie so we need to ask\n> +\t# On Windows [file executable] might lie so we need to ask\n>  \t# the shell if the hook is executable.  Yes that's annoying.\n>  \t#\n> -\tif {[is_Cygwin]} {\n> +\tif {[is_Windows]} {\n>  \t\tupvar #0 _sh interp\n>  \t\tif {![info exists interp]} {\n>  \t\t\tset interp [_which sh]\n\n-- \nShawn.\n"}]}