mu_basecore
mu_basecore copied to clipboard
.gitattributes: Prevent line ending conversion.
Description
Unsets the text attribute on all files to prevent their line endings from being normalized.
See https://git-scm.com/docs/gitattributes for background.
This was previously accomplished solely by instructing users to set core.autocrlf to false. However, that does not translate to pipelines and setting in a pipeline requires the system level git configuration to be modified prior to checkout. Git configs cannot be checked into to a repo and automatically used for security reasons.
This is a simple way to check the change into the repo so it applies for all users including pipelines to prevent line ending conversion.
This allows plugins like LineEndingCheck to produce similar results in pipelines on Linux and Windows agents.
- [ ] Impacts functionality?
- Functionality - Does the change ultimately impact how firmware functions?
- Examples: Add a new library, publish a new PPI, update an algorithm, ...
- [ ] Impacts security?
- Security - Does the change have a direct security impact on an application, flow, or firmware?
- Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ...
- [ ] Breaking change?
- Breaking change - Will anyone consuming this change experience a break in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
- Tests - Does the change include any explicit test code?
- Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- Documentation - Does the change contain explicit documentation additions outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ...
How This Was Tested
- Clone mu_basecore repo with the change locally and verify a new file added with several commits of changes appears properly in git unified diffs like those from git format-patch, git diff, etc.
- Verify changes on existing files appear as expected in git history.
- Verify pipelines with the change properly preserve line endings so line ending checks (LineEndingCheck plugin) are consistent across agents.
Tested in the following mu_basecore Windows agent pipeline runs:
Tested in the following mu_basecore Linux agent pipeline runs:
Integration Instructions
N/A
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
release/202405@641fba5). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## release/202405 #997 +/- ##
=================================================
Coverage ? 1.23%
=================================================
Files ? 1421
Lines ? 358385
Branches ? 4339
=================================================
Hits ? 4412
Misses ? 353914
Partials ? 59
| Flag | Coverage Δ | |
|---|---|---|
| MdeModulePkg | 0.20% <ø> (?) |
|
| MdePkg | 5.41% <ø> (?) |
|
| NetworkPkg | 0.55% <ø> (?) |
|
| UefiCpuPkg | 4.80% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.