Repository navigation
Commit ffb7a76
fix(git): compare head names in git_create_branch's existence check
`branch_name in repo.heads` uses GitPython's IterableList.__contains__,
which falls back to getattr, so a new branch named like a list attribute
("append", "count", "index") read as existing and was rejected. Compare
the heads' names instead, and cover "append" in the protocol tests.
Found by Copilot review on #5026.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>1 parent a25a409 commit ffb7a76
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
620 | 631 | | |
621 | 632 | | |
622 | 633 | | |
| |||
0 commit comments