On Mon, Dec 10, 2007 at 09:02:26PM -0800, Junio C Hamano wrote: > [PATCH] commit: do not add extra LF at the end of the summary. > > The scripted version relied on the nice "auto-strip the terminating LF" > behaviour shell gives to "var=$(cmd)" construct, but we have to roll > that ourselves. This looks reasonable and generates the correct output as far as I can tell, but... > - log_tree_commit(&rev, commit); > - printf("\n"); > + if (!log_tree_commit(&rev, commit)) { > + struct strbuf buf = STRBUF_INIT; > + pretty_print_commit(rev.commit_format, commit, &buf, > + 0, NULL, NULL, 0, 0); > + printf("%s\n", buf.buf); > + strbuf_release(&buf); > + } We are duplicating the "!shown && ..." conditional branch from log_tree_commit, which calls show_log. Why are we not calling show_log instead of pretty_print_commit (I understand that show_log should end up calling pretty_print_commit, but it is not immediately obvious that all of the extra code in show_log is going to be ignored). -Peff - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html