Commit bad6fa8
fix(git): guard against IndexError when chosen equals repo_root
chosen.relative_to(repo_root).parts is empty when the resolved src
directory is the repo root itself (e.g. src: .). Extracting parts into
a variable and checking it before indexing prevents an IndexError and
correctly skips the safe_rm step in that edge case.
https://claude.ai/code/session_014ZRQGvyTdWBqoRjtu7gsSC1 parent 51c517b commit bad6fa8
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
| |||
0 commit comments