Re: [PATCH] Support for configurable git command aliases (v2)

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

 




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
-
: 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]