Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created December 10, 2015 18:33
Show Gist options
  • Save mattdeboard/953c2017914596b61d29 to your computer and use it in GitHub Desktop.
Save mattdeboard/953c2017914596b61d29 to your computer and use it in GitHub Desktop.
(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