[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