Thread (1 message) 1 message, 1 author, 2018-02-02

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

From: Junio C Hamano <hidden>
Date: 2018-02-02 20:17:02

Thomas Gummerer [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help