aboutsummaryrefslogtreecommitdiff
path: root/src/git-permalink.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/git-permalink.sh')
-rwxr-xr-xsrc/git-permalink.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/git-permalink.sh b/src/git-permalink.sh
index 4a6b2ee..b148b20 100755
--- a/src/git-permalink.sh
+++ b/src/git-permalink.sh
@@ -166,6 +166,11 @@ codeberg() {
printf '%s/src/commit/%s/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "$(lineno_with_l)"
}
+bitbucket() {
+ normalize_origin
+ printf '%s/src/%s/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "${MYLINENO:+#lines-$(echo "$MYLINENO" | tr '-' ':')}"
+}
+
pagure() {
printf '%s/blob/%s/f/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "${MYLINENO:+#_$MYLINENO}"
}
@@ -204,6 +209,9 @@ guess_permalink() {
*codeberg.org*)
codeberg
;;
+ *bitbucket.org*)
+ bitbucket
+ ;;
*pagure.io*)
pagure
;;