Skip to content

fix(config): handle branches with multiple slashes in their names#485

Merged
ejoffe merged 1 commit intoejoffe:masterfrom
davinkevin:fix/multi-slash-branch-names
Mar 12, 2026
Merged

fix(config): handle branches with multiple slashes in their names#485
ejoffe merged 1 commit intoejoffe:masterfrom
davinkevin:fix/multi-slash-branch-names

Conversation

@davinkevin
Copy link
Contributor

Fixes #415

The regex used to parse git status output for remote branch detection was too greedy on the remote name part, incorrectly consuming slashes that belong to the branch name.

For example, with a branch like feature/foo/bar tracking origin/feature/foo/bar, the regex would match origin/feature as remote and foo/bar as branch instead of origin as remote and feature/foo/bar as branch.

Changes:

  • Removed / from the remote name capture group in the regex, since remote names don't contain slashes
  • Preserved GitHubBranch if already set (e.g. from config), only falling back to the parsed value

@ejoffe ejoffe merged commit fcdde7d into ejoffe:master Mar 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(): branch name with multiple / creates an invalid configuration

2 participants