Re: [GIT GUI PATCH 1/2] git-gui: teach _which procedure to work with absolute paths

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

 



Hi,

On Fri, Mar 23, 2012 at 12:31:03PM -0700, Junio C Hamano wrote:
> Heiko Voigt <hvoigt@xxxxxxxxxx> writes:
> >  git-gui/git-gui.sh |    4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
> > index ba4e5c1..35cdee8 100755
> > --- a/git-gui/git-gui.sh
> > +++ b/git-gui/git-gui.sh
> > @@ -429,6 +429,10 @@ proc _git_cmd {name} {
> >  proc _which {what args} {
> >  	global env _search_exe _search_path
> >  
> > +	if {[file exists $what]} {
> > +		return [file normalize $what]
> > +	}
> 
> Has $what been verified that it is either an absolute path, or contains a
> directory separator, at this point in the code?
> 
> Otherwise, "_which Makefile" would say "Yeah, that is the one I will
> launch" in a directory that has a "Makefile" even when the user does not
> have "." in his $PATH, no?

Thats a good point. Will add something for that if we have another
iteration which depends on Berts patch which seems to try to achieve the
same goal as this series.

Cheers Heiko
--
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]