{"thread":{"id":"22561","subject":"[PATCH] git-gui: check whether systems nice command works or disable it","startedAt":"2010-02-07T21:47:56Z","lastAt":"2010-02-08T15:56:31Z","messageCount":3,"participants":["Heiko Voigt","Junio C Hamano","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133892","messageId":"20100207214755.GB3034@book.hvoigt.net","threadId":"22561","inReplyTo":null,"subject":"[PATCH] git-gui: check whether systems nice command works or disable it","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-02-07T21:47:56Z","receivedAt":"2010-02-07T21:47:56Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"This fixes issue 394 from msysgit. It seems that the Gnuwin32 project\nprovides a nice command but it returns a \"not implemented\" error. To\nhelp users we now try to execute once and disable it in case it fails.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n\nsee: http://code.google.com/p/msysgit/issues/detail?id=394\nfor more information.\n\ncheers Heiko\n\n git-gui/git-gui.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 1fb3cbf..eec2dc9 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -388,6 +388,9 @@ proc _lappend_nice {cmd_var} {\n \n \tif {![info exists _nice]} {\n \t\tset _nice [_which nice]\n+\t\tif {[catch {exec $_nice git version}]} {\n+\t\t\tset _nice {}\n+\t\t}\n \t}\n \tif {$_nice ne {}} {\n \t\tlappend cmd $_nice\n-- \n1.7.0.rc1.7.gc0da5\n"},{"id":"133901","messageId":"7vhbps4lwr.fsf@alter.siamese.dyndns.org","threadId":"22561","inReplyTo":"20100207214755.GB3034@book.hvoigt.net","subject":"Re: [PATCH] git-gui: check whether systems nice command works or disable it","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-08T00:21:40Z","receivedAt":"2010-02-08T00:21:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Heiko Voigt <hvoigt@hvoigt.net> writes:\n\n> This fixes issue 394 from msysgit. It seems that the Gnuwin32 project\n> provides a nice command but it returns a \"not implemented\" error. To\n> help users we now try to execute once and disable it in case it fails.\n>\n> Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n> ---\n>\n> see: http://code.google.com/p/msysgit/issues/detail?id=394\n> for more information.\n>\n> cheers Heiko\n>\n>  git-gui/git-gui.sh |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n>\n> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\n> index 1fb3cbf..eec2dc9 100755\n> --- a/git-gui/git-gui.sh\n> +++ b/git-gui/git-gui.sh\n> @@ -388,6 +388,9 @@ proc _lappend_nice {cmd_var} {\n>  \n>  \tif {![info exists _nice]} {\n>  \t\tset _nice [_which nice]\n> +\t\tif {[catch {exec $_nice git version}]} {\n> +\t\t\tset _nice {}\n> +\t\t}\n\nWhere does the output from this \"git version\" invocation go?\n\n>  \t}\n>  \tif {$_nice ne {}} {\n>  \t\tlappend cmd $_nice\n> -- \n> 1.7.0.rc1.7.gc0da5\n"},{"id":"133927","messageId":"20100208155631.GB19288@spearce.org","threadId":"22561","inReplyTo":"7vhbps4lwr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-gui: check whether systems nice command works or disable it","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-02-08T15:56:31Z","receivedAt":"2010-02-08T15:56:31Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\n> > index 1fb3cbf..eec2dc9 100755\n> > --- a/git-gui/git-gui.sh\n> > +++ b/git-gui/git-gui.sh\n> > @@ -388,6 +388,9 @@ proc _lappend_nice {cmd_var} {\n> >  \n> >  \tif {![info exists _nice]} {\n> >  \t\tset _nice [_which nice]\n> > +\t\tif {[catch {exec $_nice git version}]} {\n> > +\t\t\tset _nice {}\n> > +\t\t}\n> \n> Where does the output from this \"git version\" invocation go?\n\nBy default Tcl exec returns stdout's contents.  So in this case,\nits passed to catch, which discards it, because catch returns true\nif exec crashed, false if it ran without error.\n\nPatch looks fine to me as-is.\n\n-- \nShawn.\n"}]}