Skip to content

Commit

Permalink
Merge pull request #432 from kezhenxu94/remote-order
Browse files Browse the repository at this point in the history
Respect the order of `default_remote`
  • Loading branch information
pwntester authored Oct 16, 2023
2 parents 2fe8953 + 3484f97 commit 5b02dcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/octo/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ end
function M.get_remote()
local conf = config.get_config()
local remotes = M.parse_git_remote()
for name, remote in pairs(remotes) do
if vim.tbl_contains(conf.default_remote, name) then
return remote
for _, name in ipairs(conf.default_remote) do
if remotes[name] then
return remotes[name]
end
end
-- return github.com as default host
Expand Down

0 comments on commit 5b02dcc

Please sign in to comment.