On 09/09/14 20:15, Junio C Hamano wrote:
Is this different from "%n%-d"?


Yes. "%n%-d" will place the newline before the expansion, not after.

log --decorate --pretty=format:"%n%-d%h\\ %t\\ [%cn]\\ %s"
---

(HEAD, upstream/master, master)85f0837 c29da1d [Junio C Hamano] Start the post-2.1 cycle
 f655651 4027a43 [Junio C Hamano] Merge branch 'rs/strbuf-getcwd'
 51eeaea 1f4970c [Junio C Hamano] Merge branch 'ta/pretty-parse-config'
 4740891 8961621 [Junio C Hamano] Merge branch 'bc/archive-pax-header-mode'
---

log --decorate --pretty=format:"%_d%%h\\ %t\\ [%cn]\\ %s"
---
 (HEAD, upstream/master, master)
85f0837 c29da1d [Junio C Hamano] Start the post-2.1 cycle
f655651 4027a43 [Junio C Hamano] Merge branch 'rs/strbuf-getcwd'
51eeaea 1f4970c [Junio C Hamano] Merge branch 'ta/pretty-parse-config'
4740891 8961621 [Junio C Hamano] Merge branch 'bc/archive-pax-header-mode'
---

The latter is the output I've been trying to accomplish, and as far as I can tell, this patch is the only way to achieve it.

Well, you can do "%d%n" but that will put a blank line before every commit that doesn't have a ref.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to