Re: [PATCH] git-gui: check whether systems nice command works or disable it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
> > index 1fb3cbf..eec2dc9 100755
> > --- a/git-gui/git-gui.sh
> > +++ b/git-gui/git-gui.sh
> > @@ -388,6 +388,9 @@ proc _lappend_nice {cmd_var} {
> >  
> >  	if {![info exists _nice]} {
> >  		set _nice [_which nice]
> > +		if {[catch {exec $_nice git version}]} {
> > +			set _nice {}
> > +		}
> 
> Where does the output from this "git version" invocation go?

By default Tcl exec returns stdout's contents.  So in this case,
its passed to catch, which discards it, because catch returns true
if exec crashed, false if it ran without error.

Patch looks fine to me as-is.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]