Commit cff35f4
committed
fix(parse_git_status): remove false-positive detached HEAD check on upstream name
The broad `"detached" in raw_branch` sub-check matched any upstream
tracking ref containing the word "detached" (e.g. `origin/detached-work`),
causing `parse_git_status` to return `detached=True` and empty
`current_branch`/`upstream` for repos that are not in detached HEAD mode.
Remove the sub-check; `raw_branch.startswith("HEAD (detached at ")` already
covers the real detached-HEAD case and the subsequent
`normalized_branch.startswith("HEAD")` covers `HEAD (no branch)` variants.
Fixes #13731 parent e113618 commit cff35f4
2 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 128 | + | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments