Last active
March 24, 2021 05:52
Revisions
-
sideshowcoder renamed this gist
Jul 2, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sideshowcoder created this gist
Jul 2, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ ;; using https://github.com/jwiegley/use-package and https://github.com/sshaw/git-link ;; in the git config of the repository setup the following ;; [git-link] ;; remote = mysourcegraph.sourcegraph ;; [remote "mysourcegraph.sourcegraph"] ;; url = https://my.sourcegraph.host/my.git.host/myrespository (use-package git-link :ensure t :config (defun git-link-sourcegraph (hostname dirname filename _branch commit start end) (let ((line-or-range (if end (format "%s-%s" start end) start))) (format "https://%s/%s@%s/-/blob/%s#L%s" hostname dirname commit filename line-or-range))) (defun git-link-commit-sourcegraph (hostname dirname commit) (format "https://%s/%s@%s" hostname dirname commit)) (add-to-list 'git-link-remote-alist '("sourcegraph" git-link-sourcegraph)) (add-to-list 'git-link-commit-remote-alist '("sourcegraph" git-link-commit-sourcegraph)) (setq git-link-open-in-browser 't))