| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ce68322 commit 76f0160
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,6 +102,73 @@ jobs: | |||
| 102 | 102 | run: | | |
| 103 | 103 | pytest --color=yes -p no:sugar --instafail -vv ${{ matrix.additional-pytest-args }} | |
| 104 | 104 | ||
| 105 | + diag-token: | ||
| 106 | + runs-on: windows-latest | ||
| 107 | + | ||
| 108 | + env: *cygwin-env | ||
| 109 | + | ||
| 110 | + defaults: *cygwin-defaults | ||
| 111 | + | ||
| 112 | + steps: | ||
| 113 | + - *force-lf | ||
| 114 | + - *checkout | ||
| 115 | + - *install-cygwin | ||
| 116 | + | ||
| 117 | + - name: PowerShell-side token state and file-creation tests | ||
| 118 | + shell: pwsh | ||
| 119 | + run: | | ||
| 120 | + $repo = "D:\a\GitPython\GitPython" | ||
| 121 | + Write-Host "==================== whoami /all (PowerShell) ====================" | ||
| 122 | + whoami /all | ||
| 123 | + Write-Host "" | ||
| 124 | + Write-Host "==================== Test A: PowerShell New-Item directory ====================" | ||
| 125 | + $td = "$repo\test-pwsh-mkdir" | ||
| 126 | + New-Item -ItemType Directory -Path $td -Force | Out-Null | ||
| 127 | + $acl = Get-Acl -LiteralPath $td | ||
| 128 | + Write-Host "Owner of $td : $($acl.Owner)" | ||
| 129 | + Remove-Item $td -Force | ||
| 130 | + Write-Host "" | ||
| 131 | + Write-Host "==================== Test D: PowerShell -> Git Bash -> PowerShell New-Item ====================" | ||
| 132 | + $td4 = "$repo\test-pwsh-bash-pwsh-mkdir" | ||
| 133 | + $scriptPath = "$repo\inner-mkdir.ps1" | ||
| 134 | + "New-Item -ItemType Directory -Path '$td4' -Force | Out-Null" | | ||
| 135 | + Set-Content -Path $scriptPath -Encoding utf8 | ||
| 136 | + $env:MSYS2_ARG_CONV_EXCL = '*' | ||
| 137 | + try { | ||
| 138 | + & "C:\Program Files\Git\bin\bash.exe" -c "powershell.exe -NoProfile -ExecutionPolicy Bypass -File '$scriptPath'" 2>&1 | Out-Null | ||
| 139 | + } finally { | ||
| 140 | + Remove-Item Env:MSYS2_ARG_CONV_EXCL -ErrorAction SilentlyContinue | ||
| 141 | + } | ||
| 142 | + if (Test-Path -LiteralPath $td4) { | ||
| 143 | + $acl = Get-Acl -LiteralPath $td4 | ||
| 144 | + Write-Host "Owner of $td4 (PowerShell -> bash -> PowerShell New-Item) : $($acl.Owner)" | ||
| 145 | + Remove-Item $td4 -Force | ||
| 146 | + } else { | ||
| 147 | + Write-Host "Owner of $td4 (PowerShell -> bash -> PowerShell New-Item) : (directory not created)" | ||
| 148 | + } | ||
| 149 | + Remove-Item $scriptPath -Force -ErrorAction SilentlyContinue | ||
| 150 | + | ||
| 151 | + - name: Cygwin-side token state and file-creation tests | ||
| 152 | + run: | | ||
| 153 | + set +e | ||
| 154 | + echo "==================== id (Cygwin) ====================" | ||
| 155 | + id | ||
| 156 | + echo | ||
| 157 | + echo "==================== Test B: Cygwin mkdir ====================" | ||
| 158 | + td="$(pwd)/test-cygwin-mkdir" | ||
| 159 | + mkdir "$td" | ||
| 160 | + echo "Owner: $(stat -c '%U(%u)' "$td")" | ||
| 161 | + rmdir "$td" | ||
| 162 | + echo | ||
| 163 | + echo "==================== Test C: Cygwin-spawned Git for Windows git init ====================" | ||
| 164 | + td3="$(pwd)/test-cygwin-spawns-wingit" | ||
| 165 | + mkdir "$td3" | ||
| 166 | + ( cd "$td3" && /cygdrive/c/Program\ Files/Git/bin/git.exe init -q ) | ||
| 167 | + echo "Owner of $td3 (Cygwin-mkdir) : $(stat -c '%U(%u)' "$td3")" | ||
| 168 | + echo "Owner of $td3/.git (Cygwin->Win git init): $(stat -c '%U(%u)' "$td3/.git")" | ||
| 169 | + rm -rf "$td3" | ||
| 170 | + true | ||
| 171 | + | ||
| 105 | 172 | reproduce-safe-dir: | |
| 106 | 173 | strategy: | |
| 107 | 174 | matrix: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments