File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ function Git-NumberedCheckout {
88 return
99 }
1010
11- $toCheckout = $fileInfos | % {$_.fullPath }
12- git checkout HEAD $toCheckout
11+ $toCheckout = $fileInfos | % {$_.fullPath.Trim ( ' " ' ) }
12+ git checkout HEAD @ ( $toCheckout )
1313}
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ function Git-NumberedDiff {
1414
1515 # git add -N, --intent-to-add
1616 # so that new files are shown in the diff
17- $newFiles = $fileInfos | ? {$_.state -eq ' A' } | % {$_.fullPath }
17+ $newFiles = $fileInfos | ? {$_.state -eq ' A' } | % {$_.fullPath.Trim ( ' " ' ) }
1818 if ($newFiles ) {
1919 Write-Host " git add --intent-to-add $newFiles "
20- git add - Nv $newFiles
20+ git add - Nv @ ( $newFiles )
2121 }
2222
2323 # Filter deleted files from diff (git doesn't like it)
24- $files = $fileInfos | ? {$_.state -ne ' D' } | % {$_.fullPath }
25- git diff $files
24+ $files = $fileInfos | ? {$_.state -ne ' D' } | % {$_.fullPath.Trim ( ' " ' ) }
25+ git diff @ ( $files )
2626}
2727
2828
@@ -40,6 +40,6 @@ function Git-NumberedDiffCached {
4040 return
4141 }
4242
43- $files = $fileInfos | % {$_.fullPath }
44- git diff -- cached $files
43+ $files = $fileInfos | % {$_.fullPath.Trim ( ' " ' ) }
44+ git diff -- cached @ ( $files )
4545}
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ function Git-NumberedReset {
88 return
99 }
1010
11- $toReset = $fileInfos | % {$_.fullPath }
12- git reset HEAD $toReset
11+ $toReset = $fileInfos | % {$_.fullPath.Trim ( ' " ' ) }
12+ git reset HEAD @ ( $toReset )
1313}
You can’t perform that action at this time.
0 commit comments