Re: [PATCH] gitk - restore operation of git-reset on Cygwin

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

 



Mark Levedahl <mlevedahl@xxxxxxxxx> wrote:
> >Paul Mackerras wrote:
> >>Are you using Tk 8.4 or 8.5?  The man pages for 8.5 imply that the
> >>2>@1 form should work for all platforms, but maybe that wasn't true in
> >>8.4.  If that's the case it's worth mentioning in the patch
> >>description.
> 
> I just tried installation of ActiveState Tcl 8.4.16, put that on the 
> Cygwin path, and gitk operates correctly without the patch. So, the 
> issue seems to be entirely one of Cygwin's particular Tcl/Tk build, 
> though whether that is due to the version or the odd attributes of its 
> compilation I cannot say.

git-gui ran into this problem and uses the following procedure
anytime it wants both stdout and stderr:

proc _open_stdout_stderr {cmd} {
    _trace_exec $cmd
    if {[catch {
            set fd [open [concat [list | ] $cmd] r]
        } err]} {
        if {   [lindex $cmd end] eq {2>@1}
            && $err eq {can not find channel named "1"}
            } {
            # Older versions of Tcl 8.4 don't have this 2>@1 IO
            # redirect operator.  Fallback to |& cat for those.
            # The command was not actually started, so its safe
            # to try to start it a second time.
            #
            set fd [open [concat \
                [list | ] \
                [lrange $cmd 0 end-1] \
                [list |& cat] \
                ] r]
        } else {
            error $err
        }
    }
    fconfigure $fd -eofchar {}
    return $fd
}

-- 
Shawn.
--
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]

  Powered by Linux