summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-08-24 18:24:27 -0700
committerFranck Cuny <franck@fcuny.net>2021-08-24 18:24:27 -0700
commitee57ec6935c2ab71751daca886d74a5ca823fbcb (patch)
tree03ce353786bb4f7bbd5cfd14ed635945683312f5 /emacs
parentemacs: move function for go-mode-compile (diff)
downloademacs.d-ee57ec6935c2ab71751daca886d74a5ca823fbcb.tar.gz
emacs: get rid of mapping for sourcegraph
Since the hostname from the git remote is appended to
'sourcegraph.twitter.biz', we can get rid of the mapping and just build
the URL using `format`. This simplifies even more the solution.
Diffstat (limited to '')
-rw-r--r--emacs/custom/fcuny-git.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/emacs/custom/fcuny-git.el b/emacs/custom/fcuny-git.el
index 97a9cfa..4c6409a 100644
--- a/emacs/custom/fcuny-git.el
+++ b/emacs/custom/fcuny-git.el
@@ -89,12 +89,8 @@
   :bind (("C-c g l" . git-link)
          ("C-c g a" . git-link-commit))
   :config
-  (defvar fcuny/map-git-remote-to-sg
-    '(("git.twitter.biz" "sourcegraph.twitter.biz/git.twitter.biz")
-      ("gitpuppet.twitter.biz" "sourcegraph.twitter.biz/gitpuppet.twitter.biz")))
-
   (defun fcuny/get-sg-remote-from-hostname (hostname)
-    (nth 1 (assoc hostname fcuny/map-git-remote-to-sg)))
+    (format "sourcegraph.twitter.biz/%s" hostname))
 
   (defun fcuny/git-link-work-sourcegraph (hostname dirname filename _branch commit start end)
     (let ((sg-base-url (fcuny/get-sg-remote-from-hostname hostname)))