| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 76f0160 commit f368f17
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,6 +61,26 @@ jobs: | |||
| 61 | 61 | . .venv/bin/activate | |
| 62 | 62 | pip install '.[test]' | |
| 63 | 63 | ||
| 64 | + - name: Show file ownership and safe.directory entries | ||
| 65 | + run: | | ||
| 66 | + echo "==================== File ownership ====================" | ||
| 67 | + for p in \ | ||
| 68 | + "$(pwd)" \ | ||
| 69 | + "$(pwd)/.git" \ | ||
| 70 | + "$(pwd)/git/ext/gitdb" \ | ||
| 71 | + "$(pwd)/git/ext/gitdb/.git" \ | ||
| 72 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 73 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 74 | + "${HOME:-}" \ | ||
| 75 | + "${HOME:-}/.gitconfig"; do | ||
| 76 | + if [ -n "$p" ]; then | ||
| 77 | + ls -ld -- "$p" 2>/dev/null || echo "(missing: $p)" | ||
| 78 | + fi | ||
| 79 | + done | ||
| 80 | + echo | ||
| 81 | + echo "==================== safe.directory entries ====================" | ||
| 82 | + git config --global --get-all safe.directory 2>&1 || echo "(none)" | ||
| 83 | + | ||
| 64 | 84 | - name: Show version and platform information | |
| 65 | 85 | run: | | |
| 66 | 86 | . .venv/bin/activate | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,6 +90,65 @@ jobs: | |||
| 90 | 90 | run: | | |
| 91 | 91 | pip install '.[test]' | |
| 92 | 92 | ||
| 93 | + - &ownership-display | ||
| 94 | + name: Show file ownership and safe.directory entries | ||
| 95 | + run: | | ||
| 96 | + echo "==================== File ownership (Cygwin view, ls -ld) ====================" | ||
| 97 | + for p in \ | ||
| 98 | + "$(pwd)" \ | ||
| 99 | + "$(pwd)/.git" \ | ||
| 100 | + "$(pwd)/git/ext/gitdb" \ | ||
| 101 | + "$(pwd)/git/ext/gitdb/.git" \ | ||
| 102 | + "$(pwd)/.git/modules/gitdb" \ | ||
| 103 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 104 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 105 | + "$(pwd)/.git/modules/gitdb/modules/smmap" \ | ||
| 106 | + "${HOME:-}" \ | ||
| 107 | + "${HOME:-}/.gitconfig"; do | ||
| 108 | + if [ -n "$p" ]; then | ||
| 109 | + ls -ld -- "$p" 2>/dev/null || echo "(missing: $p)" | ||
| 110 | + fi | ||
| 111 | + done | ||
| 112 | + echo | ||
| 113 | + echo "==================== File ownership (Win32 view, Get-Acl) ====================" | ||
| 114 | + # Cygwin's ls -ld and stat go through Cygwin's SID-to-uid mapping | ||
| 115 | + # (well-known SIDs by their RID, machine-local accounts by 0x30000+RID). | ||
| 116 | + # The mapping is deterministic, but going via Win32 Get-Acl gives the | ||
| 117 | + # NTAccount form of the NTFS Owner SID directly, with no Cygwin layer | ||
| 118 | + # in between -- useful for confirming that what Cygwin reports as | ||
| 119 | + # "Administrators" really is the BUILTIN\Administrators SID (S-1-5-32-544) | ||
| 120 | + # rather than some local-machine account that Cygwin happens to map to | ||
| 121 | + # the same uid. The workflow sets CYGWIN_NOWINPATH=1, so Windows paths | ||
| 122 | + # are not on Cygwin's $PATH; invoke powershell.exe by absolute path. | ||
| 123 | + ps_exe=/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe | ||
| 124 | + if [ -x "$ps_exe" ]; then | ||
| 125 | + for p in \ | ||
| 126 | + "$(pwd)" \ | ||
| 127 | + "$(pwd)/.git" \ | ||
| 128 | + "$(pwd)/git/ext/gitdb" \ | ||
| 129 | + "$(pwd)/git/ext/gitdb/.git" \ | ||
| 130 | + "$(pwd)/.git/modules/gitdb" \ | ||
| 131 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 132 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 133 | + "$(pwd)/.git/modules/gitdb/modules/smmap" \ | ||
| 134 | + "${HOME:-}/.gitconfig"; do | ||
| 135 | + if [ -n "$p" ] && [ -e "$p" ]; then | ||
| 136 | + wp=$(cygpath -w "$p") | ||
| 137 | + # Escape single-quotes for PowerShell single-quoted string literal: ' -> '' | ||
| 138 | + wp_escaped=${wp//\'/\'\'} | ||
| 139 | + owner=$("$ps_exe" -NoProfile -NonInteractive -Command \ | ||
| 140 | + "try { (Get-Acl -LiteralPath '${wp_escaped}').Owner } catch { 'ERROR: ' + \$_.Exception.Message }" \ | ||
| 141 | + 2>/dev/null | tr -d '\r') | ||
| 142 | + printf " %-44s %s\n" "$owner" "$wp" | ||
| 143 | + fi | ||
| 144 | + done | ||
| 145 | + else | ||
| 146 | + echo "($ps_exe not found -- skipping Win32 view)" | ||
| 147 | + fi | ||
| 148 | + echo | ||
| 149 | + echo "==================== safe.directory entries ====================" | ||
| 150 | + git config --global --get-all safe.directory 2>&1 || echo "(none)" | ||
| 151 | + | ||
| 93 | 152 | - name: Show version and platform information | |
| 94 | 153 | run: | | |
| 95 | 154 | uname -a | |
@@ -192,6 +251,7 @@ jobs: | |||
| 192 | 251 | - *setup-venv | |
| 193 | 252 | - *update-pypa | |
| 194 | 253 | - *install-deps | |
| 254 | + - *ownership-display | ||
| 195 | 255 | ||
| 196 | 256 | - name: Run submodule tests | |
| 197 | 257 | run: | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,6 +87,26 @@ jobs: | |||
| 87 | 87 | run: | | |
| 88 | 88 | pip install '.[test]' | |
| 89 | 89 | ||
| 90 | + - name: Show file ownership and safe.directory entries | ||
| 91 | + run: | | ||
| 92 | + echo "==================== File ownership ====================" | ||
| 93 | + for p in \ | ||
| 94 | + "$(pwd)" \ | ||
| 95 | + "$(pwd)/.git" \ | ||
| 96 | + "$(pwd)/git/ext/gitdb" \ | ||
| 97 | + "$(pwd)/git/ext/gitdb/.git" \ | ||
| 98 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap" \ | ||
| 99 | + "$(pwd)/git/ext/gitdb/gitdb/ext/smmap/.git" \ | ||
| 100 | + "${HOME:-}" \ | ||
| 101 | + "${HOME:-}/.gitconfig"; do | ||
| 102 | + if [ -n "$p" ]; then | ||
| 103 | + ls -ld -- "$p" 2>/dev/null || echo "(missing: $p)" | ||
| 104 | + fi | ||
| 105 | + done | ||
| 106 | + echo | ||
| 107 | + echo "==================== safe.directory entries ====================" | ||
| 108 | + git config --global --get-all safe.directory 2>&1 || echo "(none)" | ||
| 109 | + | ||
| 90 | 110 | - name: Show version and platform information | |
| 91 | 111 | run: | | |
| 92 | 112 | uname -a | |
| Back | FazBrowse Home | New Git URL |
0 commit comments