Commit 1a931f8
fix: filter out invalid branch names in interactive selection
Fix issue where "origin" and other remote names appeared as selectable
branches in interactive checkout. The problem occurred because
`git branch -a` can output remote reference names that aren't actual
branches.
Improvements:
- Skip lines containing "->" (HEAD pointer references)
- Explicitly filter out "origin" and "upstream" as branch names
- Better deduplication of local vs remote branches
- Show all branches (not just those without worktrees) since checkout
handles existing worktrees by navigating to them
Fixes error: "branch 'origin' does not exist"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 60f3391 commit 1a931f8
1 file changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | | - | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
177 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
178 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
179 | 200 | | |
180 | 201 | | |
181 | 202 | | |
| |||
0 commit comments