summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-01-26 23:05:37 -0500
committerKyle Meyer <kyle@kyleam.com>2017-01-26 23:05:37 -0500
commit4791ff89fafaa785394cad771bc84749d5dfb064 (patch)
treedadb6b2bd99202a823ed5c43a6cea3ac3e78c6fb /init.el
parente2551619ece269cf0e425f6f619d39856c8aa255 (diff)
downloademacs.d-4791ff89fafaa785394cad771bc84749d5dfb064.tar.gz
magit: Add remote counts section to status buffer
Diffstat (limited to 'init.el')
-rw-r--r--init.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/init.el b/init.el
index a2e31ab..6a0eabd 100644
--- a/init.el
+++ b/init.el
@@ -908,13 +908,6 @@
(setq magit-show-refs-arguments '("--sort=-committerdate"))
- (setq magit-status-sections-hook
- (let ((funcs (list #'magit-insert-unpulled-from-pushremote
- #'magit-insert-unpulled-from-upstream)))
- (append (cl-remove-if (lambda (x) (memq x funcs))
- magit-status-sections-hook)
- funcs)))
-
(remove-hook 'magit-refs-sections-hook #'magit-insert-tags)
(setq magit-display-buffer-function
@@ -1069,6 +1062,8 @@
(define-key magit-log-select-mode-map "."
#'km/magit-log-select-guess-fixup-commit)
+ (define-key magit-status-mode-map "jr" #'magit-jump-to-remote-counts)
+
(define-key magit-refs-mode-map (kbd "C-c C-t") #'km/magit-refs-toggle-tags)
(define-key magit-file-section-map [remap magit-visit-thing]
@@ -1095,6 +1090,16 @@
("j" . km/git-rebase-join-repeats)
("m" . km/git-rebase-move-commit)))
+ (setq magit-status-sections-hook
+ (append
+ (let ((funcs (list #'magit-insert-unpushed-to-upstream
+ #'magit-insert-unpushed-to-pushremote
+ #'magit-insert-unpulled-from-pushremote
+ #'magit-insert-unpulled-from-upstream)))
+ (cl-remove-if (lambda (x) (memq x funcs))
+ magit-status-sections-hook))
+ (list #'km/magit-insert-remote-counts)))
+
(magit-define-popup-action 'magit-commit-popup
?u "Auto commit" #'km/magit-update-or-auto-commit)