From: "Shawn O. Pearce" <spearce@spearce•org>
To: Junio C Hamano <junkio@cox•net>
Cc: git@vger•kernel.org, Alex Riesen <raa.lkml@gmail•com>,
Johannes Schindelin <Johannes.Schindelin@gmx•de>
Subject: Re: [PATCH] Introduce git version --list-features for porcelain use
Date: Fri, 1 Jun 2007 00:14:58 -0400 [thread overview]
Message-ID: <20070601041458.GC7044@spearce.org> (raw)
In-Reply-To: <7vvee8z5q9.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox•net> wrote:
> "Shawn O. Pearce" <spearce@spearce•org> writes:
>
> > Why cat? Tcl is so horribly broken that to get data for both stdout
> > and stderr through a pipe I have to do something sick like:
> >
> > git fetch 2>&1 | cat
> >
> > because in Tcl its actually:
> >
> > set rdr [open "| git fetch |& cat" r]
> >
> > The |& means 2>&1| in normal shell. But that means I have to have
> > a process after it to receive the data. Normally that's cat.
> > But MinGW doesn't have cat. (Nor do they have dog, but neither
> > does Linux...). So I need a way to redirect output.
>
> Wait a minute. Who interprets |& in the above? Isn't it a
> shell?
My understanding was it is Tcl itself. My $SHELL doesn't understand
it:
$ echo hi |& cat
-bash: syntax error near unexpected token `&'
> That's why I asked if you are writing for shell-less
> environment. If you are _not_, can't you do something like this
> instead?
Ideally with MinGW we wouldn't need a UNIX shell to get things
working in git-gui. But we have to have one for git-merge for
example, as git-gui doesn't have a builtin Grand Unified Merge
Driver. Also for git-fetch, which is one of the prime uses of this
cat redirect thing. ;-)
> set rdr [open "| sh -c 'git fetch 2>&1'" r]
Yeah, I'm already doing that sh -c trick for a different reason in
another context. I may have to do just that here too.
--
Shawn.
next prev parent reply other threads:[~2007-06-01 4:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-30 4:31 [PATCH] Introduce git-supported-features for porcelain use Shawn O. Pearce
2007-05-30 12:04 ` Alex Riesen
2007-05-30 12:34 ` Johannes Schindelin
2007-05-31 0:20 ` [PATCH] Introduce git version --list-features " Shawn O. Pearce
2007-05-31 0:25 ` Johannes Schindelin
2007-05-31 6:50 ` Alex Riesen
2007-05-31 13:30 ` Shawn O. Pearce
2007-05-31 23:46 ` Junio C Hamano
2007-06-01 3:09 ` Shawn O. Pearce
2007-06-01 3:57 ` Junio C Hamano
2007-06-01 4:14 ` Shawn O. Pearce [this message]
2007-06-01 7:13 ` Johannes Sixt
-- strict thread matches above, loose matches on Subject: below --
2007-06-21 4:59 Shawn O. Pearce
2007-06-21 5:47 ` Junio C Hamano
2007-06-21 6:10 ` Shawn O. Pearce
2007-06-21 7:02 ` Junio C Hamano
2007-06-21 11:58 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070601041458.GC7044@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=junkio@cox$(echo .)net \
--cc=raa.lkml@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox