From: Junio C Hamano Date: Sun, 04 Jun 2006 22:38:54 GMT Subject: Re: [PATCH] Support for configurable git command aliases (v2) Message-ID: <7v8xoc8s1t.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20060604221930.GW10488@pasky.or.cz> Petr Baudis writes: > > Then again, as pointed out on IRC you might get very confused as well > if you do git log | less. Besides, this is not going to help you with > aliases like commit = commit -a. > > So, some other possibilities are to: > > (i) Test stdin. Even in scripts, stdin is frequently terminal, but you > might add RSI. > > (ii) Add a --no-alias git argument. This way lies madness, too. > > (iii) Check a $GIT_NO_ALIAS environment variable. This might work > best, after all. Opinions? Or some other clever idea? Perhaps the simplest: (iv) Refuse/ignore an alias that hides existing command, and train users to write portable scripts by not using aliases. E.g. "alias.log = log --pretty=raw" is ignored, and you would do "alias.l = log --pretty=raw" instead.