From: Junio C Hamano <gitster@pobox.com>
To: Adrian Ratiu <adrian.ratiu@collabora.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"brian m . carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH v2 3/3] object-file-convert: copy unknown commit headers unchanged
Date: Fri, 20 Nov 2026 16:30:27 -0800 [thread overview]
Message-ID: <xmqqld6nm3fg.fsf@gitster.g> (raw)
In-Reply-To: <26080a7a386bdd0ae14725d2e731d1be81774d49.1794932695.git.adrian.ratiu@collabora.com> (Adrian Ratiu's message of "Thu, 19 Nov 2026 16:18:22 +0200")
Adrian Ratiu <adrian.ratiu@collabora.com> writes:
> diff --git a/t/t1016-compatObjectFormat.sh b/t/t1016-compatObjectFormat.sh
> index 9cafcee509..fdb882c686 100755
> --- a/t/t1016-compatObjectFormat.sh
> +++ b/t/t1016-compatObjectFormat.sh
> @@ -188,6 +188,38 @@ do
> eval signedtag4_${hash}_oid=$(git hash-object -t tag -w ../${hash}_signedtag4)
> '
>
> + test_expect_success "create a $hash commit with an unknown header" '
> + git cat-file commit $(commit2_oid $hash) >../${hash}_commit2 &&
> + awk "{ print } /^committer / { print \"x-unknown one\"; print \" two\" }" \
> + <../${hash}_commit2 >../${hash}_unknownheader &&
> + oid=$(git hash-object -t commit -w ../${hash}_unknownheader) &&
> + eval unknownheader_${hash}_oid=$oid &&
> + git branch unknownheader $oid
> + '
> +
> + test_expect_success "amend a $hash commit with an unknown header" '
> + git checkout unknownheader &&
> + git commit --amend -m "Amend a commit with an unknown header" &&
> + git cat-file commit HEAD >actual &&
> + test_grep "^x-unknown one$" actual &&
> + oid=$(git rev-parse HEAD) &&
> + eval unknownheader2_${hash}_oid=$oid
> + '
> +
> + test_expect_success "reject a $hash commit with an empty mergetag line" '
> + git cat-file tag committag >../${hash}_committag &&
> + {
> + sed -n "/^committer /q;p" ../${hash}_commit2 &&
> + grep "^committer " ../${hash}_commit2 &&
This "grep" used for validation will be flagged by test-chainlint.
Use test_grep just like the previous test perhaps?
prev parent reply other threads:[~2026-11-21 0:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 19:57 [PATCH 0/3] compatObjectFormat: fix a BUG(), wrong id and unknown headers Adrian Ratiu
2026-11-12 19:57 ` [PATCH 1/3] setup: reject compatObjectFormat == objectFormat Adrian Ratiu
2026-11-16 7:36 ` Patrick Steinhardt
2026-11-17 10:42 ` Adrian Ratiu
2026-11-12 19:57 ` [PATCH 2/3] rev-parse: die when --output-object-format cannot map an object Adrian Ratiu
2026-11-16 7:37 ` Patrick Steinhardt
2026-11-17 11:55 ` Adrian Ratiu
2026-11-12 19:57 ` [PATCH 3/3] object-file-convert: copy unknown commit headers unchanged Adrian Ratiu
2026-11-16 7:37 ` Patrick Steinhardt
2026-11-17 15:27 ` Adrian Ratiu
2026-11-19 14:18 ` [PATCH v2 0/3] compatObjectFormat: fix a BUG(), wrong ID and unknown headers Adrian Ratiu
2026-11-19 14:18 ` [PATCH v2 1/3] setup: reject compatObjectFormat == objectFormat Adrian Ratiu
2026-11-20 22:21 ` Junio C Hamano
2026-11-19 14:18 ` [PATCH v2 2/3] rev-parse: die when --output-object-format cannot map an object Adrian Ratiu
2026-11-20 22:29 ` Junio C Hamano
2026-11-19 14:18 ` [PATCH v2 3/3] object-file-convert: copy unknown commit headers unchanged Adrian Ratiu
2026-11-20 22:41 ` Junio C Hamano
2026-11-21 0:30 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqld6nm3fg.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adrian.ratiu@collabora.com \
--cc=ebiederm@xmission.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox