Commit bbfeb41
fix(ship): branch off HEAD without stashing
ship.py stashed the working tree, created the branch off `main`, then popped
the stash back. When the current branch's docs.json had diverged from main (e.g.
running on a feature branch mid-restructure), the pop conflicted, crashed the
step, and left conflict markers committed into the docs — while stranding the
user's real work in a dangling stash.
Branch off the CURRENT HEAD instead and drop the stash entirely: the promoted
changes already in the working tree carry over with no conflict, and unrelated
uncommitted work is never touched. On main (CI, the intended context) HEAD == main,
so behavior is unchanged; on a divergent branch it now succeeds safely instead of
corrupting state.
Verified by reproducing the divergent scenario: branch created off HEAD, docs
committed, no stash, exit 0.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e66f59e commit bbfeb41
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | | - | |
249 | 254 | | |
250 | | - | |
251 | 255 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 256 | + | |
| 257 | + | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| |||
0 commit comments