1
;;; magithub-proxy.el --- Fake repository context -*- lexical-binding: t; -*-
3
;; Copyright (C) 2017 Sean Allred
5
;; Author: Sean Allred <code@seanallred.com>
8
;; This program is free software; you can redistribute it and/or modify
9
;; it under the terms of the GNU General Public License as published by
10
;; the Free Software Foundation, either version 3 of the License, or
11
;; (at your option) any later version.
13
;; This program is distributed in the hope that it will be useful,
14
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
;; GNU General Public License for more details.
18
;; You should have received a copy of the GNU General Public License
19
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
23
;; Use a different repository context
29
(defun magithub-proxy-set (remote)
30
"Use REMOTE as the issue-tracker in this repository."
31
(interactive (list (magit-read-remote "Issue-tracking remote")))
32
(magit-set (unless (string= remote "origin") remote) "magithub" "proxy"))
34
(defun magithub-proxy-set-default (remote)
35
"Use REMOTE as the default issue-tracker for all repositories.
36
If no issue-tracker is defined on a per-repo basis, this tracker is used.
38
This modifies global git-config."
39
(interactive "sDefault remote name of issue-tracker (applies to all repositories): ")
40
(and (magit-git-success "config" "--global" "magithub.proxy" remote)
43
(provide 'magithub-proxy)
44
;;; magithub-proxy.el ends here