From: Linus Torvalds <torvalds@osdl.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Support for configurable git command aliases (v2)
Date: Sun, 4 Jun 2006 16:31:54 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0606041621010.5498@g5.osdl.org> (raw)
In-Reply-To: <20060604212050.GV10488@pasky.or.cz>
On Sun, 4 Jun 2006, Petr Baudis wrote:
>
> And I forgot to mention that it also adds the interactivity test
> requested by Janek - aliases are now interpreted only when stdout is a
> tty.
I don't think that's a good test.
The fact is, I do
git diff | less -S
all the time, and if I start doing aliases, I'd expect them to work the
same regardless of whether I piped the output to "less" or not.
Also, a lot of scripts have stdout going to the regular stdout, so I don't
think it's even a sufficient test for scripting anyway.
So I would suggest some other way to suppress aliases if we need it, not
based on "isatty()" and frields.
But I suspect that the easiest solution is to just disallow aliases of
real built-ins. I realize it could be cool, but the fact is, it's also
extremely confusing if "git diff" does something else than what it's
supposed to do, and it _will_ break scripts.
The alternatives is to
- not do aliases for the "git-xyzzy" format
- and add a special environment flag ("GIT_NO_ALIASES") to allow scripts
to easily disable aliases (and add a "export GIT_NO_ALIASES" line to
the git-sh-setup.sh script)
Hmm?
Linus
next prev parent reply other threads:[~2006-06-04 23:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-04 21:19 [PATCH] Support for configurable git command aliases (v2) Petr Baudis
2006-06-04 21:20 ` Petr Baudis
2006-06-04 22:11 ` Martin Mares
2006-06-04 22:19 ` Petr Baudis
2006-06-04 22:38 ` Junio C Hamano
2006-06-04 23:31 ` Linus Torvalds [this message]
2006-06-06 23:58 ` [PATCH/RFC] "git --less cmd" to page anywhere Junio C Hamano
2006-06-07 0:05 ` Linus Torvalds
2006-06-07 0:08 ` Petr Baudis
2006-06-07 0:12 ` Linus Torvalds
2006-06-07 2:29 ` Martin Langhoff
2006-06-07 3:21 ` Linus Torvalds
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=Pine.LNX.4.64.0606041621010.5498@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).