From 8bf2cb8740dbd6a72da14ea5b1ce3ee2cbe79605 Mon Sep 17 00:00:00 2001 From: chenmingxuan Date: Fri, 30 Oct 2026 12:45:26 +0800 Subject: [PATCH] fix(packaging): preserve device-test source bytes in subtree archives --- scripts/build_device_test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/build_device_test.py b/scripts/build_device_test.py index e84248f..94d8702 100644 --- a/scripts/build_device_test.py +++ b/scripts/build_device_test.py @@ -31,7 +31,16 @@ def main(): root = Path(__file__).resolve().parents[1] commit = git(root, "rev-parse", "--verify", "--end-of-options", args.ref + "^{commit}") commit = commit.decode("ascii").strip() - source = git(root, "archive", "--format=tar", commit + ":plugins/artemis-device-test") + # A subtree archive does not retain its parent's attributes; disable checkout + # conversion explicitly so source-manifest hashes still bind the Git blobs. + source = git( + root, + "-c", + "core.autocrlf=false", + "archive", + "--format=tar", + commit + ":plugins/artemis-device-test", + ) files = {} with tarfile.open(fileobj=io.BytesIO(source)) as tree: for entry in tree: