pshell 7.4 somehow caused git show to stop working. this update resolves the problem (#5478)

Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-04-01 21:40:13 -04:00 committed by GitHub
parent c4f36de705
commit 1ba6be47e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {
@ -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 {