Re: [PATCH] Support for configurable git command aliases
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- May 28, 2006, 22:57 UTC
- Message-ID
- <e5d9sm$5d4$1@sea.gmane.org>
- In-Reply-To
- <20060528215945.GD10488@pasky.or.cz>
Petr Baudis wrote:
Show 14 quoted lines
> Dear diary, on Sat, May 27, 2006 at 02:52:35PM CEST, I got a letter > where Horst von Brand <vonbrand@inf.utfsm.cl> said that... >> >> I don't like this syntax. What other stuff (beside "cmd") would be under >> "[alias "co"]? Why not simply: >> >> [alias] >> co = commit -a >> publish = push public.site.com:/pub/scm/my-public-repo > > Nice, I like this. > > Well, the following isn't exactly the nicest code I have ever written... > But it seems to work. ;-)
Well, if [alias] would be used also for giving default options for git commands, e.g.
[alias]
log = log --pretty(from what Petr "Pasky" Baudis said on IRC, currently on the right side there should be only true git commands, which eliminates nicely problems with recursion ;-), it would be better to ensure that aliases are checked *only* for interactive sessions - otherwise using aliases for default arguments would/could mess the scripts.
-- Jakub Narebski Warsaw, Poland