From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Support for configurable git command aliases (v2)
Date: Sun, 04 Jun 2006 15:38:54 -0700 [thread overview]
Message-ID: <7v8xoc8s1t.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060604221930.GW10488@pasky.or.cz> (Petr Baudis's message of "Mon, 5 Jun 2006 00:19:30 +0200")
Petr Baudis <pasky@ucw.cz> 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 </dev/null after each git invocation and get a serious case of
> 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.
next prev parent reply other threads:[~2006-06-04 22:39 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 [this message]
2006-06-04 23:31 ` Linus Torvalds
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=7v8xoc8s1t.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--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).