Repository navigation
create-sdk-artifact: read sparse definitions from --head, too - #778
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sHEAD. Which means the file selection came fromHEAD, not from the revision I was trying to measure. With this fix, bothbuild-installersandminimal-sdkgrow by roughly 74MB (zstd level 10, as in CI).CI does not pass
--head, so its behavior is unchanged.