Skip to content

Commit ce81119

Browse files
committed
80 Fix git remote for bitbucket
1 parent 690ac2f commit ce81119

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/gx/handlers/commit.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ function M.handle(mode, line, handler_options)
3030
if not git_url then
3131
return
3232
end
33-
return git_url .. "/commit/" .. commit_hash
33+
34+
-- Check if the URL is from BitBucket, then use "/commits/" instead of "/commit/"
35+
if git_url:match("bitbucket%.") then
36+
return git_url .. "/commits/" .. commit_hash
37+
else
38+
return git_url .. "/commit/" .. commit_hash
39+
end
3440
end
3541

3642
return M

0 commit comments

Comments
 (0)