Commit 552d94c
committed
fix: detect squash-merged branches for SSH workspace deletion
SSH workspaces required force deletion after squash-merging PRs because
the check used 'git log --branches --not --remotes' which always shows
commits for squash-merged branches (original commits differ from squash
commit SHA).
Added content-based comparison when unpushed commits are detected:
- Fetch latest default branch from origin
- Get files changed on branch since merge-base
- Compare each file's content between HEAD and origin/$DEFAULT
- If all files match, treat as merged (squash-merge case)
This allows clean deletion of squash-merged branches without forcing,
while still protecting branches with genuinely unmerged work.1 parent 12cf0f4 commit 552d94c
1 file changed
+37
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | | - | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1101 | 1136 | | |
1102 | 1137 | | |
1103 | 1138 | | |
1104 | 1139 | | |
1105 | 1140 | | |
1106 | | - | |
| 1141 | + | |
1107 | 1142 | | |
1108 | 1143 | | |
1109 | 1144 | | |
| |||
0 commit comments