Skip to content

create-sdk-artifact: read sparse definitions from --head, too - #778

Merged
dscho merged 1 commit into
mainfrom
create-sdk-artifact-sparse-from-head
Nov 26, 2026
Merged

dscho merged 1 commit into
mainfrom
create-sdk-artifact-sparse-from-head

Conversation

@dscho

@dscho dscho commented Nov 25, 2026

Copy link
Copy Markdown
Member

I ran into this while measuring how much including Rust in the minimal SDK (git-for-windows/git-sdk-arm64#67) would grow the artifacts. please.sh create-sdk-artifact --head=<rev> checked out the files of <rev>, but it read the .sparse/* definitions from the SDK repository's HEAD. Which means the file selection came from HEAD, not from the revision I was trying to measure. With this fix, both build-installers and minimal-sdk grow by roughly 74MB (zstd level 10, as in CI).

CI does not pass --head, so its behavior is unchanged.

The `--head=<rev>` option is supposed to create the artifact from a
commit other than the SDK repository's HEAD. It already does that for
the files themselves, but the sparse-checkout definitions were still
read from HEAD. The result mixed the two: the files came from <rev>,
yet the set of files was decided by HEAD's definitions.

This came up while measuring how much adding Rust to the minimal SDK
(git-for-windows/git-sdk-arm64#67) grows the
`build-installers` artifact. With `--head` pointing at that PR's commit
and HEAD still on `main`, the generated sparse definition was missing
the Rust entries.

CI calls `create-sdk-artifact` without `--head`, so there HEAD and
<rev> are the same commit and nothing changes.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho merged commit 5810a0f into main Nov 26, 2026
18 checks passed
@dscho
dscho deleted the create-sdk-artifact-sparse-from-head branch November 26, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant