From: Junio C Hamano <hidden> Date: 2016-06-15 22:47:02
Jakub Narebski [off-list ref] 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).
From: Paolo Bonzini <hidden> Date: 2016-06-15 22:47:02
On 07/09/2009 06:43 PM, Junio C Hamano wrote:
Jakub Narebski[off-list ref] writes:
quoted
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
From: Jeff King <hidden> Date: 2016-06-15 22:47:03
On Fri, Jul 10, 2009 at 01:08:27AM +0200, Paolo Bonzini wrote:
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/\"' -"
Is there a reason not to simply use:
whatis = "show -s --pretty='format:%h (%s, %ad)' --date=short"
these days?
-Peff
P.S. Actually, I use --no-pager in my version, so I use 'tformat' to
explicitly end it with a newline, which is nicer for actually showing
the output on the terminal.
From: Jeff King <hidden> Date: 2016-06-15 22:47:03
On Mon, Jul 13, 2009 at 02:40:27AM -0400, Jeff King wrote:
On Fri, Jul 10, 2009 at 01:08:27AM +0200, Paolo Bonzini wrote:
quoted
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/\"' -"
Is there a reason not to simply use:
whatis = "show -s --pretty='format:%h (%s, %ad)' --date=short"
these days?
-Peff
P.S. Actually, I use --no-pager in my version, so I use 'tformat' to
explicitly end it with a newline, which is nicer for actually showing
the output on the terminal.
Er, actually, I see yours adds the newline explicitly in the sed
invocation, so it would definitely be 'tformat' to match what yours
does.
-Peff
From: Paolo Bonzini <hidden> Date: 2016-06-15 22:47:03
On 07/13/2009 08:40 AM, Jeff King wrote:
On Fri, Jul 10, 2009 at 01:08:27AM +0200, Paolo Bonzini wrote:
quoted
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/\"' -"
Is there a reason not to simply use:
whatis = "show -s --pretty='format:%h (%s, %ad)' --date=short"
these days?
With s/format/tformat, which I just learnt about, no, there is no reason.
Thanks!
Paolo