Re: [RFC/PATCH] reset --hard: make use of the pretty machinery

2018-02-02 Thread Junio C Hamano
Thomas Gummerer writes: > In addition to the easier to follow code, this makes the output more > consistent with other commands that print the title of the commit, such > as 'git commit --oneline' or 'git checkout', which both use > 'pp_commit_easy()' with the

Re: [RFC/PATCH] reset --hard: make use of the pretty machinery

2018-02-01 Thread Jeff King
On Thu, Feb 01, 2018 at 08:57:21PM +, Thomas Gummerer wrote: > It is a slight change of the output if the second line of the commit > message is not a blank line, i.e. if the commit message is > > foo > bar > > previously we would print "HEAD is now at 00 foo", while after >

[RFC/PATCH] reset --hard: make use of the pretty machinery

2018-02-01 Thread Thomas Gummerer
reset --hard currently uses its own logic for printing the first line of the commit message in its output. Instead of just using the first line, use the pretty machinery to create the output. In addition to the easier to follow code, this makes the output more consistent with other commands that