# [PATCH] gitk - work around stderr redirection on Cygwin

6 messages from 2008-06-14 to 2008-07-18. Participants: Mark Levedahl, Junio C Hamano, Eric Blake.
Thread: https://gitlist.dev/t/13953

## Mark Levedahl, 2008-06-14 16:57

Subject: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <1213462668-424-1-git-send-email-mlevedahl@gmail.com>
URL: https://gitlist.dev/e/1213462668-424-1-git-send-email-mlevedahl%40gmail.com

```
Cygwin is *still* shipping with antiquated Tcl 8.4.1, and will continue
to do so for the indefinite future. This version does not understand
the "2>@1" redirection syntax, so such redirection of stderr must be
done using sh.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 gitk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index fddcb45..386a385 100755
--- a/gitk
+++ b/gitk
@@ -7625,7 +7625,7 @@ proc resethead {} {
     tkwait window $w
     if {!$confirm_ok} return
     if {[catch {set fd [open \
-	    [list | git reset --$resettype $rowmenuid 2>@1] r]} err]} {
+	    [list | sh -c "git reset --$resettype $rowmenuid 2>&1"] r]} err]} {
 	error_popup $err
     } else {
 	dohidelocalchanges
@@ -7691,7 +7691,7 @@ proc cobranch {} {
     update
     dohidelocalchanges
     if {[catch {
-	set fd [open [list | git checkout $headmenuhead 2>@1] r]
+	set fd [open [list | sh -c "git checkout $headmenuhead 2>&1"] r]
     } err]} {
 	notbusy checkout
 	error_popup $err
-- 
1.5.6.rc2.67.g19fe3

```

## Mark Levedahl, 2008-07-13 20:37

Subject: Re: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <487A6780.7030500@gmail.com>
URL: https://gitlist.dev/e/487A6780.7030500%40gmail.com
In-Reply-To: <1213462668-424-1-git-send-email-mlevedahl@gmail.com>

```
Mark Levedahl wrote:
> Cygwin is *still* shipping with antiquated Tcl 8.4.1, and will continue
> to do so for the indefinite future. This version does not understand
> the "2>@1" redirection syntax, so such redirection of stderr must be
> done using sh.
>   

Ping. This bug is in 1.5.6.x, and thus also in the current Cygwin git 
release: as a result, several gitk context menu items cause errors. (Let 
me know if I should resend the patch).

Mark

```

## Junio C Hamano, 2008-07-13 21:35

Subject: Re: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <7vfxqdqxh7.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfxqdqxh7.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <487A6780.7030500@gmail.com>

```
Mark Levedahl <mlevedahl@gmail.com> writes:

> Mark Levedahl wrote:
>> Cygwin is *still* shipping with antiquated Tcl 8.4.1, and will continue
>> to do so for the indefinite future. This version does not understand
>> the "2>@1" redirection syntax, so such redirection of stderr must be
>> done using sh.
>
> Ping. This bug is in 1.5.6.x, and thus also in the current Cygwin git
> release: as a result, several gitk context menu items cause
> errors. (Let me know if I should resend the patch).

In the meantime, is it an option to apply this as a port specific patch
when Cygwin and whichever distribution ship with old Tcl package their
binary releases?

Just checking how urgent this issue is (8.4.1 was from Oct 2002 if I am
not mistaken) for maintainers of Cygwin port, and I am suspecting that
kernel folks are somewhat busy near/around OLS/KS timeframe (but not me).

```

## Mark Levedahl, 2008-07-13 21:53

Subject: Re: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <487A7949.9050800@gmail.com>
URL: https://gitlist.dev/e/487A7949.9050800%40gmail.com
In-Reply-To: <7vfxqdqxh7.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano wrote:
> Mark Levedahl <mlevedahl@gmail.com> writes:
>
>   
>> Mark Levedahl wrote:
>>     
>>> Cygwin is *still* shipping with antiquated Tcl 8.4.1, and will continue
>>> to do so for the indefinite future. This version does not understand
>>> the "2>@1" redirection syntax, so such redirection of stderr must be
>>> done using sh.
>>>       
>> Ping. This bug is in 1.5.6.x, and thus also in the current Cygwin git
>> release: as a result, several gitk context menu items cause
>> errors. (Let me know if I should resend the patch).
>>     
>
> In the meantime, is it an option to apply this as a port specific patch
> when Cygwin and whichever distribution ship with old Tcl package their
> binary releases?
>
> Just checking how urgent this issue is (8.4.1 was from Oct 2002 if I am
> not mistaken) for maintainers of Cygwin port, and I am suspecting that
> kernel folks are somewhat busy near/around OLS/KS timeframe (but not me).
>
>   
(I didn't trim the message as I've copied the Cygwin git maintainer).

I certainly have this patch in my tree so the folks I supply git to who 
use Cygwin have this patch. The question of whether to maintain this out 
of tree for the official Cygwin release is up to Eric.

Mark

```

## Eric Blake, 2008-07-17 03:55

Subject: Re: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <487EC2BB.5050503@byu.net>
URL: https://gitlist.dev/e/487EC2BB.5050503%40byu.net
In-Reply-To: <487A7949.9050800@gmail.com>

```
According to Mark Levedahl on 7/13/2008 3:53 PM:
>>>    
>>>> Cygwin is *still* shipping with antiquated Tcl 8.4.1
>>>>       
>>> Ping. This bug is in 1.5.6.x, and thus also in the current Cygwin git
>>> release: as a result, several gitk context menu items cause
>>> errors. (Let me know if I should resend the patch).

> I certainly have this patch in my tree so the folks I supply git to who 
> use Cygwin have this patch. The question of whether to maintain this out 
> of tree for the official Cygwin release is up to Eric.

Could you point me to the patch?  I need to roll the Cygwin git release of
1.5.6.3 anyway (in part because cygwin has upgraded from perl 5.8 to
5.10).  This sounds like something worth me including as a vendor patch,
if it does not get folded into the main repo.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net

```

## Mark Levedahl, 2008-07-18 02:41

Subject: Re: [PATCH] gitk - work around stderr redirection on Cygwin
Message-ID: <488002EB.8080100@gmail.com>
URL: https://gitlist.dev/e/488002EB.8080100%40gmail.com
In-Reply-To: <487EC2BB.5050503@byu.net>

```
Eric Blake wrote:
> Could you point me to the patch?  I need to roll the Cygwin git 
> release of
> 1.5.6.3 anyway (in part because cygwin has upgraded from perl 5.8 to
> 5.10).  This sounds like something worth me including as a vendor patch,
> if it does not get folded into the main repo.
>
The patch is at the top of this thread:
http://article.gmane.org/gmane.comp.version-control.git/85023/match=gitk+work+around+stderr+redirection

(I'll send you a patch against Junio's tree privately as a backup).

Mark

```
