Re: default aliases (ci, di, st, co)
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Jul 9, 2009, 23:08 UTC
- Message-ID
- <4A56786B.7040904@gnu.org>
- In-Reply-To
- <7vskh53iyt.fsf@alter.siamese.dyndns.org>
On 07/09/2009 06:43 PM, Junio C Hamano wrote:
Show 7 quoted lines
> Jakub Narebski<jnareb@gmail.com> writes: > >> one = show -s --pretty='format:%h (%s)' > > If you use "git one" for quoting a commit in the log message, please use a > format that shows the date as well (I think I posted mine to the list in > the past).
Yes, it's in the wiki and in my .gitconfig:
whatis = "!sh -c 'git show -s --pretty=\"format:%h (%s, %ai\" \"$@\" | sed -e \"s/ [012][0-9]:[0-5][0-9]:[0-5][0-9] [-+][0-9][0-9][0-9][0-9]$/)\\n/\"' -"
BTW, the wiki shows a nice trick to avoid the extra ' quotation:
whatis = "!f() { git show -s --pretty='format:%h (%s, %ai'
\"$@\" | sed -e 's/ [012][0-9]:[0-5][0-9]:[0-5][0-9]
[-+][0-9][0-9][0-9][0-9]$/)\\n/'; }; f"Paolo