Skip to content

Commit 00b522a

Browse files
committed
Fixes and LF => CRLF
1 parent f8807ee commit 00b522a

24 files changed

+56
-52
lines changed

MutagenSdk/Proto/filesystem/behavior/probe_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/selection/selection.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/service/synchronization/synchronization.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/compression/algorithm.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/configuration.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/change.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/conflict.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/entry.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/ignore/ignore_vcs_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/ignore/syntax.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/permissions_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/problem.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/symbolic_link_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/hashing/algorithm.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/rsync/receive.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/scan_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/session.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/stage_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/state.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/version.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/watch_mode.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/url/url.proto

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Update-Proto.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ param (
66

77
$ErrorActionPreference = "Stop"
88

9+
$repo = "mutagen-io/mutagen"
910
$protoPrefix = "pkg"
1011
$entryFile = "service\synchronization\synchronization.proto"
1112

@@ -42,7 +43,7 @@ else {
4243
& git.exe clone `
4344
--depth 1 `
4445
--branch $mutagenTag `
45-
"https://github.com/mutagen-io/mutagen.git" `
46+
"https://github.com/$repo.git" `
4647
$cloneDir
4748
}
4849

@@ -52,7 +53,7 @@ $licenseContent = Get-Content (Join-Path $cloneDir "LICENSE")
5253
$mitStartIndex = $licenseContent.IndexOf("MIT License")
5354
$licenseHeader = ($licenseContent[$mitStartIndex..($licenseContent.Length - 1)] | ForEach-Object { (" * " + $_).TrimEnd() }) -join "`n"
5455

55-
$entryFilePath = Join-Path $cloneDir $protoPrefix $entryFile
56+
$entryFilePath = Join-Path $cloneDir (Join-Path $protoPrefix $entryFile)
5657
if (-not (Test-Path $entryFilePath)) {
5758
throw "Failed to find $entryFilePath in mutagen repo"
5859
}
@@ -77,7 +78,7 @@ function Add-ImportedFiles([string] $path) {
7778

7879
# Mutagen generates from within the pkg directory, so we need to add
7980
# the prefix.
80-
$filePath = Join-Path $cloneDir $protoPrefix $importPath
81+
$filePath = Join-Path $cloneDir (Join-Path $protoPrefix $importPath)
8182
if (-not $filesToCopy.ContainsKey($filePath)) {
8283
Write-Host "Adding $filePath $importPath"
8384
$filesToCopy[$filePath] = $importPath
@@ -108,8 +109,8 @@ try {
108109

109110
# Determine the license header.
110111
$fileHeader = "/*`n" +
111-
" * This file was taken from `n" +
112-
" * https://github.com/mutagen-io/mutagen/tree/$mutagenTag/$protoPrefix/$protoPath`n" +
112+
" * This file was taken from`n" +
113+
" * https://github.com/$repo/tree/$mutagenTag/$protoPrefix/$protoPath`n" +
113114
" *`n" +
114115
$licenseHeader +
115116
"`n */`n`n"
@@ -128,7 +129,10 @@ try {
128129
$content = Get-Content $dstPath -Raw
129130
$content = $fileHeader + $content
130131
$content = $content -replace '(?m)^(package .*?;)', "`$1`noption csharp_namespace = `"$csharpNamespace`";"
131-
Set-Content -Path $dstPath -Value $content
132+
133+
# Replace all LF with CRLF to avoid spurious diffs in git.
134+
$content = $content -replace "(?<!`r)`n", "`r`n"
135+
Set-Content -Path $dstPath -Value $content -Encoding UTF8
132136
}
133137
}
134138
finally {

0 commit comments

Comments
 (0)