1 files changed, 5 insertions(+), 2 deletions(-)
M forge-link
M forge-link => forge-link +5 -2
@@ 63,8 63,11 @@ fi
for remote; do
base=$(git config "remote.${remote}.url")
url=""
- if [ "${base}" != "${base##https://git.sr.ht/}" ] ; then
- url="${base}/tree/${sha1}${relpath}"
+ if [ "${base}" != "${base##https://git.sr.ht/}" ] || \
+ [ "${base}" != "${base##git@git.sr.ht:}" ] ; then
+ repo="${base##https://git.sr.ht/}"
+ repo="${repo##git@git.sr.ht:}"
+ url="https://git.sr.ht/${repo}/tree/${sha1}${relpath}"
if [ "${line}" != 0 ] ; then
url="${url}#L${line}"
fi