threads / patch / 12103

patchbisect view: check for MinGW32 and MacOSX in addition to X11

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

## tl;dr

7 messages between Feb 14, 2008 and Mar 13, 2008. Diffs are folded; open one to read it.

replies: 6people: 2as markdown or json

Johannes Schindelin· Feb 14, 2008, 12:29 UTC · lore

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(-)
Show changes to git-bisect.sh +2 −2
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· Feb 15, 2008, 09:40 UTC · re: Johannes Schindelin · lore

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

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· Feb 15, 2008, 10:51 UTC · re: Peter Karlsson · lore

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

Hi,
On Fri, 15 Feb 2008, Peter Karlsson wrote:
Show 9 quoted lines
> 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· Feb 15, 2008, 12:46 UTC · re: Johannes Schindelin · lore

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

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· Feb 15, 2008, 12:50 UTC · re: Peter Karlsson · lore

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

Hi,
On Fri, 15 Feb 2008, Peter Karlsson wrote:
Show 6 quoted lines
> 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· Mar 10, 2008, 18:20 UTC · re: Peter Karlsson · lore

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

Hi,
On Fri, 15 Feb 2008, Peter Karlsson wrote:
Show 9 quoted lines
> 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(-)
Show changes to git-bisect.sh +1 −1
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· Mar 13, 2008, 19:19 UTC · re: Johannes Schindelin · lore

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

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/

← back to recent threads