# [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11

7 messages from 2008-02-14 to 2008-03-13. Participants: Johannes Schindelin, Peter Karlsson.
Thread: https://gitlist.dev/t/12103

## Johannes Schindelin, 2008-02-14 12:29

Subject: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <alpine.LSU.1.00.0802141228300.30505@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802141228300.30505%40racer.site

```

When deciding if gitk or git-log should be used to visualize the current
state, the environment variable DISPLAY was checked.  Now, we check
MSYSTEM (for MinGW32/MSys) and SECURITYSESSIONID (for MacOSX) in addition.

Note that there is currently no way to ssh into MinGW32, and that
SECURITYSESSIONID is not set automatically on MacOSX when ssh'ing into it.  
So this patch should be safe.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	Technically, we do not even support MinGW32 yet in git.git,
	but does it really hurt?  After all, you can call cygwin's git
	from MinGW32 as well...

 git-bisect.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 6594a62..74715ed 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -331,9 +331,9 @@ bisect_visualize() {
 
 	if test $# = 0
 	then
-		case "${DISPLAY+set}" in
+		case "${DISPLAY+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in
 		'')	set git log ;;
-		set)	set gitk ;;
+		set*)	set gitk ;;
 		esac
 	else
 		case "$1" in
-- 
1.5.4.1.1353.g0d5dd

```

## Peter Karlsson, 2008-02-15 09:40

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <Pine.LNX.4.64.0802151038520.18292@ds9.cixit.se>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0802151038520.18292%40ds9.cixit.se
In-Reply-To: <alpine.LSU.1.00.0802141228300.30505@racer.site>

```
Johannes Schindelin:

> When deciding if gitk or git-log should be used to visualize the current
> state, the environment variable DISPLAY was checked.  Now, we check
> MSYSTEM (for MinGW32/MSys) and SECURITYSESSIONID (for MacOSX) in addition.

That was quick! I haven't tried it, but I guess it should solve the
problem I was seeing.

-- 
\\// Peter - http://www.softwolves.pp.se/

```

## Johannes Schindelin, 2008-02-15 10:51

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <alpine.LSU.1.00.0802151050340.30505@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802151050340.30505%40racer.site
In-Reply-To: <Pine.LNX.4.64.0802151038520.18292@ds9.cixit.se>

```
Hi,

On Fri, 15 Feb 2008, Peter Karlsson wrote:

> Johannes Schindelin:
> 
> > When deciding if gitk or git-log should be used to visualize the 
> > current state, the environment variable DISPLAY was checked.  Now, we 
> > check MSYSTEM (for MinGW32/MSys) and SECURITYSESSIONID (for MacOSX) in 
> > addition.
> 
> That was quick! I haven't tried it, but I guess it should solve the 
> problem I was seeing.

Can you please test?  The we could at least add a "Tested-by:" to the 
commit message.

Thanks,
Dscho

```

## Peter Karlsson, 2008-02-15 12:46

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <Pine.LNX.4.64.0802151346000.18292@ds9.cixit.se>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0802151346000.18292%40ds9.cixit.se
In-Reply-To: <alpine.LSU.1.00.0802151050340.30505@racer.site>

```
Johannes Schindelin:

> Can you please test?  The we could at least add a "Tested-by:" to the 
> commit message.

When starting from the "Git bash" shell, it works.

When starting from a Cygwin prompt, it does not work ($MSYSTEM is not
set).

-- 
\\// Peter - http://www.softwolves.pp.se/

```

## Johannes Schindelin, 2008-02-15 12:50

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <alpine.LSU.1.00.0802151249290.30505@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0802151249290.30505%40racer.site
In-Reply-To: <Pine.LNX.4.64.0802151346000.18292@ds9.cixit.se>

```
Hi,

On Fri, 15 Feb 2008, Peter Karlsson wrote:

> Johannes Schindelin:
> 
> > Can you please test?  The we could at least add a "Tested-by:" to the 
> > commit message.
> 
> When starting from the "Git bash" shell, it works.

Great.

> When starting from a Cygwin prompt, it does not work ($MSYSTEM is not 
> set).

That is expected.  You _can_ ssh into Cygwin, so we need a way to tell if 
this is a desktop session or a terminal session.  If you have ideas how to 
tell that, please tell me.

Ciao,
Dscho

```

## Johannes Schindelin, 2008-03-10 18:20

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <alpine.LSU.1.00.0803101919060.3975@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803101919060.3975%40racer.site
In-Reply-To: <Pine.LNX.4.64.0802151346000.18292@ds9.cixit.se>

```
Hi,

On Fri, 15 Feb 2008, Peter Karlsson wrote:

> Johannes Schindelin:
> 
> > Can you please test?  The we could at least add a "Tested-by:" to the 
> > commit message.
> 
> When starting from the "Git bash" shell, it works.
> 
> When starting from a Cygwin prompt, it does not work ($MSYSTEM is not 
> set).

Can you please test this patch (both from interactive and ssh'ed 
sessions)?

-- snipsnap --
[PATCH] bisect view: call gitk if Cygwin's SESSIONNAME variable is set

It seems that Cygwin sets the variable SESSIONNAME when an interactive
session is running, and does not set it when you log in via ssh.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 git-bisect.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 2c32d0b..af8f9e3 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -333,7 +333,7 @@ bisect_visualize() {
 
 	if test $# = 0
 	then
-		case "${DISPLAY+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in
+		case "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in
 		'')	set git log ;;
 		set*)	set gitk ;;
 		esac
-- 
1.5.4.4.643.g7cb9b.dirty

```

## Peter Karlsson, 2008-03-13 19:19

Subject: Re: [PATCH] bisect view: check for MinGW32 and MacOSX in addition to X11
Message-ID: <alpine.DEB.1.00.0803132018410.23484@perkele.intern.softwolves.pp.se>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0803132018410.23484%40perkele.intern.softwolves.pp.se
In-Reply-To: <alpine.LSU.1.00.0803101919060.3975@racer.site>

```
Johannes Schindelin:

> Can you please test this patch (both from interactive and ssh'ed
> sessions)?

It does indeed seem to work. I get gitk when running from a local Cygwin 
shell and from a local cmd.exe shell, and git log when logging in over ssh.

Thank you.

-- 
\\// Peter - http://www.softwolves.pp.se/

```
