501-git: remove toggle settings, unneeded functions

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-06-26 15:54:46 +02:00
parent cb5dbafc58
commit c84f648cca

View File

@@ -13,7 +13,7 @@
:bind (("C-x g" . magit-status)
("C-c g" . magit-status)
:map magit-status-mode-map
("TAB" . magit-section-toggle)
;;("TAB" . magit-section-toggle)
("<C-tab>" . magit-section-cycle)
:map magit-branch-section-map
("RET" . magit-checkout))
@@ -24,6 +24,7 @@
(magit-push-always-verify nil)
(magit-repository-directories '("~/src/"))
(bind-key "v" 'visit-pull-request-url magit-mode-map)
:config
(add-hook 'after-save-hook 'magit-after-save-refresh-status)
(use-package git-timemachine
@@ -33,29 +34,14 @@
:init
(setq git-link-open-in-browser t))
(use-package pcmpl-git)
(defun visit-pull-request-url ()
"Visit the current branch's PR on Github."
(interactive)
(browse-url
(format "https://github.com/%s/pull/new/%s"
(replace-regexp-in-string
"\\`.+github\\.com:\\(.+\\)\\.git\\'" "\\1"
(magit-get "remote"
(magit-get-remote)
"url"))
(cdr (magit-get-remote-branch)))))
(defvar my/magit-default-options
`(
(pulling "--rebase")
))
)
;; Do Not Show Recent Commits in status window
;; https://github.com/magit/magit/issues/3230#issuecomment-339900039
(magit-add-section-hook 'magit-status-sections-hook
'magit-insert-unpushed-to-upstream
'magit-insert-unpushed-to-upstream-or-recent
'replace)
;; Do Not Show Recent Commits in status window
;; https://github.com/magit/magit/issues/3230#issuecomment-339900039
;; (magit-add-section-hook 'magit-status-sections-hook
;; 'magit-insert-unpushed-to-upstream
;; 'magit-insert-unpushed-to-upstream-or-recent
;; 'replace)
;; load forge to handle github, gitlab, etc
;;(require 'forge)
@@ -71,6 +57,22 @@
(setq magithub-clone-default-directory "~/github"))
;;(advice-add 'magit-key-mode :filter-args #'magit-key-mode--add-default-options)
;; (defun visit-pull-request-url ()
;; "Visit the current branch's PR on Github."
;; (interactive)
;; (browse-url
;; (format "https://github.com/%s/pull/new/%s"
;; (replace-regexp-in-string
;; "\\`.+github\\.com:\\(.+\\)\\.git\\'" "\\1"
;; (magit-get "remote"
;; (magit-get-remote)
;; "url"))
;; (cdr (magit-get-remote-branch)))))
(defvar my/magit-default-options
`(
(pulling "--rebase")
))
(provide '501-git)
;; End: