git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Re: cosmetic improvements for "git show tag"

From
Jeff King <peff@peff.net>
Date
Jul 18, 2009, 01:47 UTC
Message-ID
<20090718014743.GA16381@coredump.intra.peff.net>
In-Reply-To
<20090718011006.GB12968@vidovic>
On Sat, Jul 18, 2009 at 03:10:06AM +0200, Nicolas Sebrecht wrote:
Show 18 quoted lines
> Nice. What about adding an extra newline between tags?
> 
>   $ git tag v1.6.1 v1.6.2
> 
> 	<snip>
> 
>   +  link:RelNotes-1.6.1.txt[1.6.1].
>   +
>    * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
>    
>    * release notes for
>   tag v1.6.2
>   Tagger: Junio C Hamano <gitster@pobox.com>
>   Date:   Tue Mar 3 23:37:25 2009 -0800
> 
>   <snip>
> 
> IOW, between " * release notes for" and "tag v1.6.2" here.

Hmph. I thought that should just work, because of the newline after the commit. But it seems that you only get that if the next thing is a commit. Hrm.. and it is even worse. The code to print that newline comes from printing the second commit, which says "oh, we've already printed a commit" and adds the newline.

So when you show two tags you get:
  tag foo
  message
  commit foo^{}
  message
  tag bar
  commit bar^{}

That is, the newline is actually stuck in the wrong place. So we actually need to turn that newline off, which I'm not sure is possible. I'll look into it more.

-Peff
Previous: Nicolas SebrechtNext: Jeff King
Message 7 of 9 in “cosmetic improvements for "git show tag"”
  1. 0/2 cosmetic improvements for "git show tag"Jeff King, Jul 17, 2009
  2. 1/2 show: suppress extra newline when showing annotated tagJeff King, Jul 17, 2009
  3. 1/2 Re: show: suppress extra newline when showing annotated tagNicolas Sebrecht, Jul 18, 2009
  4. Jeff KingJul 18, 2009
  5. 2/2 show: add space between tag body and tagged objectJeff King, Jul 17, 2009
  6. 0/2 Re: cosmetic improvements for "git show tag"Nicolas Sebrecht, Jul 18, 2009
  7. Jeff KingJul 18, 2009
  8. Jeff KingJul 18, 2009
  9. Junio C HamanoJul 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.