Skip to content

fix: use selected remote when opening commit in browser#5348

Open
Xavrir wants to merge 3 commits intojesseduffield:masterfrom
Xavrir:fix/open-commit-in-browser-uses-selected-remote
Open

fix: use selected remote when opening commit in browser#5348
Xavrir wants to merge 3 commits intojesseduffield:masterfrom
Xavrir:fix/open-commit-in-browser-uses-selected-remote

Conversation

@Xavrir
Copy link

@Xavrir Xavrir commented Mar 8, 2026

When browsing commits under a specific remote (Remotes > second remote > branch > commit), pressing o to open in browser or copying the commit URL always used the origin remote's URL. This meant it opened the wrong page if the commit came from a different remote.

The HostHelper.getHostingServiceMgr() had "origin" hardcoded. Now there's a GetCommitURLForRemote variant that takes a remote name, and BasicCommitsController extracts the remote name from the SubCommitsContext ref when it's a RemoteBranch. Falls back to origin for local commits and reflog.

Fixes #5260

@Xavrir Xavrir force-pushed the fix/open-commit-in-browser-uses-selected-remote branch from 84fcb81 to 524bbff Compare March 8, 2026 16:55
@Xavrir Xavrir force-pushed the fix/open-commit-in-browser-uses-selected-remote branch from 4b85114 to 003af24 Compare March 9, 2026 12:48
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.

With multiple remotes, 'open commit in browser' always open in first remote

1 participant