-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mask out system core.autocrlf settings before resetting git repos #8523
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
It wasn't clear to me how I could reliably reproduce my test on any machine, but I did make sure it failed without my changes and a system |
ok, the test now actually sets up a gitconfig, thanks @ehuss! |
I think rustfmt may be failing? |
This fixes an issue the gecko developers noticed when vendoring on windows. [0] If a user has `core.autocrlf=true` set (a reasonable default on windows), vendoring from a git source would cause all the newlines to be rewritten to include carriage returns, creating churn and platform-specific results. To fix this, we simply set the global cargo checkout's "local" core.autocrlf value before performing a `reset`. This masks out the system configuration without interfering with the user's own system/project settings. [0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1647582
yep, wanted another trailing comma |
@bors: r+ This'll fail CI because of nightly issues, but we'll bors-retry this once that's fixed. |
📌 Commit 4a1e710 has been approved by |
Mask out system core.autocrlf settings before resetting git repos This fixes an issue the gecko developers noticed when vendoring on windows. \[0\] If a user has `core.autocrlf=true` set (a reasonable default on windows), vendoring from a git source would cause all the newlines to be rewritten to include carriage returns, creating churn and platform-specific results. To fix this, we simply set the global cargo checkout's "local" core.autocrlf value before performing a `reset`. This masks out the system configuration without interfering with the user's own system/project settings. \[0\]: https://bugzilla.mozilla.org/show_bug.cgi?id=1647582
💔 Test failed - checks-actions |
@bors r=alexcrichton |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 4a1e710 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 21 commits in 43cf77395cad5b79887b20b7cf19d418bbd703a9..aa6872140ab0fa10f641ab0b981d5330d419e927 2020-07-13 17:35:42 +0000 to 2020-07-23 13:46:27 +0000 - Update features set in CI. (rust-lang/cargo#8530) - Stabilize -Z crate-versions (rust-lang/cargo#8509) - Fix typo in docs (rust-lang/cargo#8529) - Remove unused CompileMode::all_modes (rust-lang/cargo#8526) - Mask out system core.autocrlf settings before resetting git repos (rust-lang/cargo#8523) - Flag git zlib errors as spurious errors (rust-lang/cargo#8520) - Fix the help display for the target-triple option (rust-lang/cargo#8515) - Check workspace member existence as dir. (rust-lang/cargo#8511) - Bump to 0.48.0, update changelog (rust-lang/cargo#8508) - Apply workspace.exclude to workspace.default-members. (rust-lang/cargo#8485) - Fix nightly tests for intra-doc links. (rust-lang/cargo#8528) - doc: Replace "regenerate" with "revoke" for API tokens (rust-lang/cargo#8510) - Add back Manifest::targets_mut (rust-lang/cargo#8494) - Build host dependencies with opt-level 0 by default (rust-lang/cargo#8500) - Fix freshness checks for build scripts on renamed dirs (rust-lang/cargo#8497) - Add a `-Zbuild-std-features` flag (rust-lang/cargo#8490) - clippy cleanups (rust-lang/cargo#8495) - Fix self-publish script. (rust-lang/cargo#8492) - Ensure `unstable.build-std` works like `-Zbuild-std` (rust-lang/cargo#8491) - Make `cargo metadata` output deterministic (rust-lang/cargo#8489) - Switch to github actions (rust-lang/cargo#8467)
This fixes an issue the gecko developers noticed when vendoring
on windows. [0] If a user has
core.autocrlf=true
set(a reasonable default on windows), vendoring from a git source
would cause all the newlines to be rewritten to include carriage
returns, creating churn and platform-specific results.
To fix this, we simply set the global cargo checkout's "local"
core.autocrlf value before performing a
reset
. This masks outthe system configuration without interfering with the user's
own system/project settings.
[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1647582