Skip to content

fix: show only remote branches in deploy dropdown + bump to 0.4.0#4

Merged
micksp merged 4 commits into
mainfrom
devin/1780729764-show-remote-branches-only
Jun 6, 2026
Merged

fix: show only remote branches in deploy dropdown + bump to 0.4.0#4
micksp merged 4 commits into
mainfrom
devin/1780729764-show-remote-branches-only

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Branch dropdown fix: get_branches() used git branch -a (all), listing both local and remote branches. After parse_git_output stripped the origin/ prefix, this produced duplicates (local master + remote origin/master → two master entries) and a stray origin/HEADHEAD entry.

Since PHP Deployer's --branch=X causes the remote server to git checkout X from the remote repo, local-only branches are irrelevant and confusing.

Changes:

  • git branch -agit branch -r in get_branches() — only remote branches shown
  • Filter out HEAD tracking refs, deduplicate after origin/ strip
  • UI label changed to Branch (remote) for clarity
  • 3 new unit tests covering HEAD filtering, dedup, and typical remote output

Version bump: 0.3.0 → 0.4.0 via npm run bump (package.json, Cargo.toml, tauri.conf.json)

Link to Devin session: https://app.devin.ai/sessions/d004a63fbbcc414388628b59cebe9aac
Requested by: @micksp

- Change git branch -a to git branch -r to list remote branches only
- Filter out HEAD tracking refs (e.g. origin/HEAD)
- Deduplicate branches after stripping origin/ prefix
- Label dropdown 'Branch (remote)' for clarity

PHP Deployer checks out branches on the remote server, so local-only
branches cannot be deployed. Showing them was confusing and produced
duplicates (e.g. local 'master' + remote 'origin/master' both
appearing as 'master').

Co-Authored-By: Michael Sperber <michaelsperber01@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Michael Sperber <michaelsperber01@gmail.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix: show only remote branches in deploy dropdown fix: show only remote branches in deploy dropdown + bump to 0.4.0 Jun 6, 2026
devin-ai-integration Bot and others added 2 commits June 6, 2026 07:23
parse_remote_branches() now splits on the first '/' to strip the remote
name. Entries without '/' (e.g. bare 'origin' when git shortens
origin/HEAD) are automatically excluded by split_once().

This replaces the previous approach of using parse_git_output() +
trim_start_matches("origin/") which failed when %(refname:short)
shortened origin/HEAD to just 'origin'.

Co-Authored-By: Michael Sperber <michaelsperber01@gmail.com>
Co-Authored-By: Michael Sperber <michaelsperber01@gmail.com>
@micksp micksp merged commit dc019fd into main Jun 6, 2026
1 check passed
@micksp micksp deleted the devin/1780729764-show-remote-branches-only branch June 7, 2026 17:37
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.

1 participant