Created
December 10, 2015 18:33
-
-
Save mattdeboard/953c2017914596b61d29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun git-link-cs-stash (hostname dirname filename branch commit start end) | |
(cl-destructuring-bind (project-name repo-root) (split-string dirname "/") | |
(format "http://stash.cs.sys/projects/%s/repos/%s/browse/%s#%s" | |
project-name | |
repo-root | |
filename | |
(if end | |
(format "%s-L%s" start end) | |
(format "%s" start))))) | |
(eval-after-load 'git-link | |
'(add-to-list 'git-link-remote-alist | |
'("cs-stash" git-link-cs-stash))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment