"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mikhail Pchelin <misha@freebsd.org>
Subject:
xfail test case for systemd github repo
To:
gameoftrees@openbsd.org
Date:
Sun, 16 Aug 2026 09:41:06 +0300

Download raw body.

Thread
  • Mikhail Pchelin:

    xfail test case for systemd github repo

I got this at dayjob: tog/got don't work on freshly cloned systemd
repo, git works fine.

git clone https://github.com/systemd/systemd
<...>
$ cd systemd
$ tog
tog: bad object data
$ got log
got-read-pack: bad object data
got: bad object data

'git fsck' gives plenty of warnings, e.g.:
> warning in tag 5bc185871cd320bf96d979cab4d999bb1e155411: missingTaggerEntry: invalid format - expected 'tagger' line

Some of these tags fail to parse, here's a one-liner:

$ for i in `git fsck 2>&1 | grep 'warning in tag' | awk '{print $4}' | tr -d ':'`; do echo $i ; got cat $i ; done
<...>
udev 059
e1ea4e5f1c429fbe62e76fc5b42bee32c2dcd770
got-read-pack: bad object data
got: bad object data
f298b6a712bbe700fe1dbac5b81cdc7dd22be26d
got-read-pack: bad object data
got: bad object data
4ea98ca6db3b84f5bc16eac8574e5c209ec823ce
got-read-pack: bad object data
got: bad object data

$ git cat-file -p e1ea4e5f1c429fbe62e76fc5b42bee32c2dcd770 | cat -e
object 281c368b8f00fbe70ea45c3c5f8d152ae7f1e077$
type commit$
tag 060$

For comparison, here's a tag that gets the same warning but that got can
still parse:

$ got cat 5ee02a523aeb72890d5d04497f2f0e79f2942611
object 817c223af360b7ca518c9fe3065c641f6a17fbd3
type commit
tag 038
tagger  0 +0000
messagelen 10

udev 038

I haven't investigated further yet, but an xfail test case is inlined below.

diff /home/misha/work/got
path + /home/misha/work/got
commit - ae25db3f82d89c28505e5fc1f58b8ba693282f5b
blob - ae6a0b611d58d550c13a91db680bfa2ce6c36e1e
file + regress/cmdline/tag.sh
--- regress/cmdline/tag.sh
+++ regress/cmdline/tag.sh
@@ -627,6 +627,30 @@ test_tag_commit_keywords() {
 	test_done "$testroot" "$ret"
 }
 
+# bad objects can be found in the systemd repository
+# for example: e1ea4e5f1c429fbe62e76fc5b42bee32c2dcd770
+test_tag_missing_tagger() {
+	local testroot=`test_init tag_missing_tagger`
+	local commit_id=`git_show_head $testroot/repo`
+
+	printf 'object %s\ntype commit\ntag 1.0.0\n' "$commit_id" \
+		> $testroot/tag.content
+	tag_id=`git -C $testroot/repo hash-object -t tag -w --literally \
+		--stdin < $testroot/tag.content`
+	git -C $testroot/repo update-ref refs/tags/1.0.0 $tag_id
+
+	got cat -r $testroot/repo $tag_id > $testroot/stdout \
+		2> $testroot/stderr
+	ret=$?
+	if [ $ret -ne 0 ]; then
+		test_done "$testroot" "xfail"
+		return 0
+	fi
+
+	# TODO: check the correct output once got is fixed; it's not known yet.
+	test_done "$testroot" "$ret"
+}
+
 test_parseargs "$@"
 run_test test_tag_create
 run_test test_tag_list
@@ -635,3 +659,4 @@ run_test test_tag_list_oneline
 run_test test_tag_create_ssh_signed
 run_test test_tag_create_ssh_signed_missing_key
 run_test test_tag_commit_keywords
+run_test test_tag_missing_tagger