From: Junio C Hamano Date: Fri, 02 Feb 2018 20:16:54 GMT Subject: Re: [RFC/PATCH] reset --hard: make use of the pretty machinery Message-ID: In-Reply-To: <20180201205721.30087-1-t.gummerer@gmail.com> 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 CMIT_FMT_ONELINE modifier. Yes, this is absolutely the right thing to do. > + > + pp_commit_easy(CMIT_FMT_ONELINE, commit, &buf); > + if (buf.len > 0) > + printf(" %s", buf.buf); > + putchar('\n'); > + strbuf_release(&buf); > } > > static void update_index_from_diff(struct diff_queue_struct *q, Thanks, will queue.