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

Sync eng/common directory with azure-sdk-tools for PR 7986 #35033

Merged
merged 1 commit into from
Apr 2, 2024
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: 6 additions & 4 deletions eng/common/scripts/Helpers/git-helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ class ConflictedFile {
# powershell ignores the newlines with and without --textconv, which results in a json file without original spacing.
# by forcefully reading into the array line by line, the whitespace is preserved. we're relying on gits autoconverstion of clrf to lf
# to ensure that the line endings are consistent.
Write-Host "git show $($this.LeftSource):$($this.Path)"
$tempContent = git show ("$($this.LeftSource):$($this.Path)")
$toShow = "$($this.LeftSource):$($this.Path)" -replace "\\", "/"
Write-Host "git show $toShow"
$tempContent = git show $toShow
return $tempContent -split "`r?`n"
}
else {
Expand All @@ -76,8 +77,9 @@ class ConflictedFile {

[array] Right(){
if ($this.IsConflicted) {
Write-Host "git show $($this.RightSource):$($this.Path)"
$tempContent = git show ("$($this.RightSource):$($this.Path)")
$toShow = "$($this.RightSource):$($this.Path)" -replace "\\", "/"
Write-Host "git show $toShow"
$tempContent = git show $toShow
return $tempContent -split "`r?`n"
}
else {
Expand Down