aboutsummaryrefslogtreecommitdiff
path: root/src/git-permalink.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-19 09:36:24 -0300
committerEuAndreh <eu@euandre.org>2021-06-19 09:36:24 -0300
commit8be93bf6e7077d69eec43a80b773f9c2a6530524 (patch)
tree1a3e4914f893b80d6842a325b012d62a4e528796 /src/git-permalink.sh
parentAdd support for notabug.org (diff)
downloadgit-permalink-8be93bf6e7077d69eec43a80b773f9c2a6530524.tar.gz
git-permalink-8be93bf6e7077d69eec43a80b773f9c2a6530524.tar.xz
Add support for codeberg.org
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 f2da926..ce871ff 100755
--- a/src/git-permalink.sh
+++ b/src/git-permalink.sh
@@ -161,6 +161,11 @@ notabug() {
printf '%s/src/%s/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "$(lineno_with_l)"
}
+codeberg() {
+ normalize_origin
+ printf '%s/src/commit/%s/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "$(lineno_with_l)"
+}
+
gitlab() {
normalize_origin
printf '%s/-/blob/%s/%s%s\n' "$ORIGIN" "$COMMIT" "$FILE" "${MYLINENO:+#L$MYLINENO}"
@@ -192,6 +197,9 @@ guess_permalink() {
*notabug.org*)
notabug
;;
+ *codeberg.org*)
+ codeberg
+ ;;
*gitlab.com*)
gitlab
;;