From: Harry Jeffery Date: Tue, 09 Sep 2014 19:30:20 GMT Subject: Re: [PATCH] pretty-format: add append line-feed format specifier Message-ID: <540F554C.5010301@exec64.co.uk> In-Reply-To: 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.