From: Linus Torvalds Date: Sun, 04 Jun 2006 23:31:54 GMT Subject: Re: [PATCH] Support for configurable git command aliases (v2) Message-ID: 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