Skip to content
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

Made it so git config was only modified for the local repo. #72

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Tools/YamlCreate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2174,11 +2174,11 @@ if ($PromptSubmit -eq '0') {
}

# Change the users git configuration to suppress some git messages
$_previousConfig = git config --global --get core.safecrlf
$_previousConfig = git config --get core.safecrlf
if ($_previousConfig) {
git config --global --replace core.safecrlf false
git config --replace core.safecrlf false
} else {
git config --global --add core.safecrlf false
git config --add core.safecrlf false
}

# Fetch the upstream branch, create a commit onto the detached head, and push it to a new branch
Expand Down Expand Up @@ -2212,9 +2212,9 @@ if ($PromptSubmit -eq '0') {

# Restore the user's previous git settings to ensure we don't disrupt their normal flow
if ($_previousConfig) {
git config --global --replace core.safecrlf $_previousConfig
git config --replace core.safecrlf $_previousConfig
} else {
git config --global --unset core.safecrlf
git config --unset core.safecrlf
}
} else {
Write-Host
Expand Down