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

Re: A shortcoming of the git repo format

From
Jon Seymour <jon.seymour@gmail.com>
Date
Apr 27, 2005, 22:51 UTC
Message-ID
<2cfc403205042715513d8123f3@mail.gmail.com>
In-Reply-To
<426FDE48.1050700@zytor.com>
On 4/28/05, H. Peter Anvin <hpa@zytor.com> wrote:
Show 12 quoted lines
> Dave Jones wrote:
> >
> > That actually broke one of my first git scripts when one of the
> > changelog texts started a line with 'tree '.  I hacked around it
> > by making my script only grep in the 'head -n4' lines, but this
> > seems somewhat fragile having to make assumptions that the field
> > I want to see is in the first 4 lines.
> >
> 
> You have the delimiter for that; there is an empty line between the
> header and the free-form body, similar as for RFC822.
> 

...and a relatively simple way to use that rule to extract just the header lines:

      sed -n "1,/^\$/p"                     # with the separator line
or, either one of these to remove the separator line as well:
      sed -n "1,/^\$/s/^\(..*\)/\1/p"  
      sed -n "1,/^\$/p" | tr -s \\012
jon
-- 
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/
Previous: H. Peter AnvinNext: Linus Torvalds
Message 7 of 29 in “A shortcoming of the git repo format”
  1. H. Peter AnvinApr 27, 2005
  2. C. Scott AnanianApr 27, 2005
  3. Linus TorvaldsApr 27, 2005
  4. H. Peter AnvinApr 27, 2005
  5. Dave JonesApr 27, 2005
  6. H. Peter AnvinApr 27, 2005
  7. Jon SeymourApr 27, 2005
  8. Linus TorvaldsApr 27, 2005
  9. Petr BaudisApr 27, 2005
  10. Linus TorvaldsApr 27, 2005
  11. The git repo formatBrian O'Mahoney, Apr 27, 2005
  12. H. Peter AnvinApr 27, 2005
  13. Tom LordApr 27, 2005
  14. H. Peter AnvinApr 27, 2005
  15. Linus TorvaldsApr 28, 2005
  16. Paul JacksonApr 28, 2005
  17. Tom LordApr 28, 2005
  18. Ryan AndersonApr 28, 2005
  19. Morgan SchweersApr 28, 2005
  20. Barry SilvermanApr 28, 2005
  21. Linus TorvaldsApr 27, 2005
  22. David A. WheelerApr 28, 2005
  23. David LangApr 28, 2005
  24. Daniel BarkalowApr 27, 2005
  25. H. Peter AnvinApr 27, 2005
  26. Daniel BarkalowApr 28, 2005
  27. H. Peter AnvinApr 28, 2005
  28. David WoodhouseApr 28, 2005
  29. Gerhard SchrenkApr 27, 2005

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.