Update git-link config custom functions for new hostname

This commit is contained in:
2019-02-01 16:07:47 +00:00
parent 7de2aecd5f
commit 625fe82382

View File

@@ -13,9 +13,9 @@
:config
(setq git-link-open-in-browser t)
;; Add custom handlers relevant only for machine with hostname "UAC00024".
(when (string= (system-name) "UAC00024")
(defun git-link-uac00024-bitbucket (hostname dirname filename branch commit start end)
;; Add custom handlers relevant only for machine with hostname "UAC00013".
(when (string-prefix-p "UAC00013" (system-name))
(defun git-link-uac00013-bitbucket (hostname dirname filename branch commit start end)
(format "https://%s/projects/%srepos/%s/browse/%s"
"bitbucket.il2management.local"
(upcase (file-name-directory dirname))
@@ -28,7 +28,7 @@
(if end (format "%s-%s" start end)
(format "%s" start)))))))
(defun git-link-commit-uac00024-bitbucket (hostname dirname commit)
(defun git-link-commit-uac00013-bitbucket (hostname dirname commit)
(format "https://%s/projects/%srepos/%s/commits/%s"
"bitbucket.il2management.local"
(upcase (file-name-directory dirname))
@@ -36,9 +36,9 @@
commit))
(add-to-list 'git-link-remote-alist
'("git" git-link-uac00024-bitbucket) t)
'("git" git-link-uac00013-bitbucket) t)
(add-to-list 'git-link-commit-remote-alist
'("git" git-link-commit-uac00024-bitbucket) t)))
'("git" git-link-commit-uac00013-bitbucket) t)))
(provide 'siren-git-link)
;;; siren-git-link.el ends here