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

[PATCH 0/3] compatObjectFormat: fix a BUG(), wrong id and unknown headers

From
Adrian Ratiu <adrian.ratiu@collabora.com>
Date
Nov 12, 2026, 19:57 UTC
Message-ID
<20261112195740.2834341-1-adrian.ratiu@collabora.com>
Hello all,

I've been continuing my three-way Git, Gitoxide and Jujutsu sha1-sha256 interop testing and uncovered three more bugs, this time in Git's compatObjectFormat.

I'm reasonably confident in the first two patches.

The last patch needs careful review, because there are two conflicting behaviors: Git copies unknown commit headers when it creates commits, but rejects them when converting existing ones.

I made both copy them, which removes a check added on purpose in 08a45903cb (object-file-convert: convert commits that embed signed tags, 2023-10-01) and I'm not 100% sure it's the right direction.

More details in the commit messages.

Many thanks, Adrian

Adrian Ratiu (3):
  setup: reject compatObjectFormat == objectFormat
  rev-parse: die when --output-object-format cannot map an object
  object-file-convert: copy unknown commit headers unchanged
 builtin/rev-parse.c           |  8 +++++---
 object-file-convert.c         | 21 +++++++++++----------
 setup.c                       |  7 +++++++
 t/t1016-compatObjectFormat.sh | 18 ++++++++++++++++++
 t/t1302-repo-version.sh       | 14 ++++++++++++++
 t/t1500-rev-parse.sh          | 18 ++++++++++++++++++
 6 files changed, 73 insertions(+), 13 deletions(-)
-- 
2.56.1
Next: Adrian Ratiu
Message 1 of 10 in “compatObjectFormat: fix a BUG(), wrong id and unknown headers”
  1. 0/3 compatObjectFormat: fix a BUG(), wrong id and unknown headersAdrian Ratiu, Nov 12, 2026
  2. 1/3 setup: reject compatObjectFormat == objectFormatAdrian Ratiu, Nov 12, 2026
  3. Patrick SteinhardtNov 16, 2026
  4. Adrian RatiuNov 17, 2026
  5. 2/3 rev-parse: die when --output-object-format cannot map an objectAdrian Ratiu, Nov 12, 2026
  6. Patrick SteinhardtNov 16, 2026
  7. Adrian RatiuNov 17, 2026
  8. 3/3 object-file-convert: copy unknown commit headers unchangedAdrian Ratiu, Nov 12, 2026
  9. Patrick SteinhardtNov 16, 2026
  10. Adrian RatiuNov 17, 2026

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.