git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk - work around stderr redirection on Cygwin

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jun 14, 2008, 16:57 UTC
Message-ID
<1213462668-424-1-git-send-email-mlevedahl@gmail.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
Next: Mark Levedahl
Message 1 of 6 in “gitk - work around stderr redirection on Cygwin”
  1. gitk - work around stderr redirection on CygwinMark Levedahl, Jun 14, 2008
  2. Mark LevedahlJul 13, 2008
  3. Junio C HamanoJul 13, 2008
  4. Mark LevedahlJul 13, 2008
  5. Eric BlakeJul 17, 2008
  6. Mark LevedahlJul 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.