Re: Simplify '--prett=xyz' options
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Aug 15, 2009, 19:19 UTC
- Message-ID
- <200908152119.56606.trast@student.ethz.ch>
- In-Reply-To
- <alpine.LFD.2.01.0908151156510.3162@localhost.localdomain>
Linus Torvalds wrote:
Show 10 quoted lines
> > I keep on thinking that I can write > > git log --format:'%aN: %s' > > instead of using the long-form "--pretty=format:xyz' thing. And each time, > I curse myself for being stupid for forgetting the proper format. > > And I'm tired of being stupid. So this patch makes me smart and > forward-thinking instead.
But we already have --format="%aN: %s" since these two commits:
commit 36407548a2825462a91b456755412a65fd611fc0 Author: Nanako Shiraishi <nanako3@lavabit.com> Date: Tue Feb 24 18:59:15 2009 +0900
Give short-hands to --pretty=tformat:%formatstring
Allow --pretty="%h %s" (and --format="%h %s") as shorthand for an often
used option --pretty=tformat:"%h %s". Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>commit 3a4c1a5e212357c3df030b6713c75466694c2e77 Author: Nanako Shiraishi <nanako3@lavabit.com> Date: Tue Feb 24 18:59:14 2009 +0900
Add --format that is a synonym to --pretty
Some people prefer to call the pretty-print styles "format", and get
annoyed to see "git log --format=short" fail. Introduce it as a synonym
to --pretty so that both can be used. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>Granted, it makes it equivalent to --pretty=tformat:foo, but isn't tformat the better choice in many cases?
--
Thomas Rast
trast@{inf,student}.ethz.ch