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

Re: [StGit PATCH] Parse commit object header correctly

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 9, 2012, 17:51 UTC
Message-ID
<20120209175158.GA7384@burratino>
In-Reply-To
<CAHkRjk6dr=5wxm+iSC2_CSB-q3k2WG_Um+X7dwsy-H8tL508EA@mail.gmail.com>
Hi Catalin,
Catalin Marinas wrote:
> Thanks for looking into this. Is this the same as an email header? If
> yes, we could just use the python's email.Header.decode_header()
> function (I haven't tried yet).
They look like this:
	encoding ISO8859-1
> BTW, does Git allow custom headers to be inserted by tools like StGit?

No. There is one list of supported headers, and this list is the standards body that maintains it[*]. So if you end up needing an extension to the commit object format, that can be done, but it needs to be accepted here (and ideally checked by "git fsck", though it's lagging a bit in that respect lately).

By the way, headers have a standard order to avoid spurious changes in commit names from reordering. Additions so far have always happened at the end, which is what makes checks by "git fsck" possible --- it can't rule out an unrecognized header line being a standard field from a future version of git, but it would be allowed to complain about unrecognized fields before 'encoding', for example.

Thanks, Jonathan

[*] http://thread.gmane.org/gmane.comp.version-control.git/138848/focus=138892
Previous: Catalin MarinasNext: Nguyen Thai Ngoc Duy
Message 13 of 15 in “STGIT: Deathpatch in linus tree”
  1. Andy Green (林安廸)Feb 7, 2012
  2. Junio C HamanoFeb 7, 2012
  3. Parse commit object header correctlyJunio C Hamano, Feb 8, 2012
  4. Michael HaggertyFeb 8, 2012
  5. Frans KlaverFeb 8, 2012
  6. Michael HaggertyFeb 8, 2012
  7. Frans KlaverFeb 8, 2012
  8. Junio C HamanoFeb 9, 2012
  9. Catalin MarinasFeb 15, 2012
  10. Junio C HamanoFeb 15, 2012
  11. Andy Green (林安廸)Feb 15, 2012
  12. Catalin MarinasFeb 9, 2012
  13. Jonathan NiederFeb 9, 2012
  14. Nguyen Thai Ngoc DuyFeb 10, 2012
  15. Junio C HamanoFeb 9, 2012

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.