emacs: magit status tweaking
authorRalph Boehme <slow@samba.org>
Thu, 7 Apr 2022 07:29:40 +0000 (09:29 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 7 Apr 2022 07:29:40 +0000 (09:29 +0200)
emacs/.emacs.d/configuration.org

index ddb9971ac33882ea07ab387ac055aae4f58cc473..d518b484a3470ca94bd316675ab5a221afa06b7a 100644 (file)
@@ -232,21 +232,34 @@ code without having to count them yourself.
 
 ** magit
 
-   #+begin_src elisp
-     (use-package git-commit
-       :ensure t)
-     (use-package magit
-       :ensure t)
-     (defun my-magit-status()
-       "magit-status in one window"
-       (interactive)
-       (magit-status)
-       (delete-other-windows))
+#+begin_src elisp
+  (use-package git-commit
+    :ensure t)
 
-     (global-set-key [f1] 'my-magit-status)
-     (define-key esc-map "#" 'magit-diff-visit-file-worktree)
-     (setq ediff-split-window-function 'split-window-horizontally)
-    #+end_src
+; https://jakemccrary.com/blog/2020/11/14/speeding-up-magit/
+; https://magit.vc/manual/magit/Per_002dRepository-Configuration.html
+  (use-package magit
+    :ensure t
+    :config
+    (remove-hook 'magit-status-sections-hook 'magit-insert-rebase-sequence)
+    (remove-hook 'magit-status-sections-hook 'magit-insert-tags-header)
+;    (remove-hook 'magit-status-sections-hook 'magit-insert-status-headers)
+    (remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-pushremote)
+    (remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-pushremote)
+    (remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-upstream)
+    (remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-upstream-or-recent)
+  )
+
+  (defun my-magit-status()
+    "magit-status in one window"
+    (interactive)
+    (magit-status)
+    (delete-other-windows))
+
+  (global-set-key [f1] 'my-magit-status)
+  (define-key esc-map "#" 'magit-diff-visit-file-worktree)
+  (setq ediff-split-window-function 'split-window-horizontally)
+#+end_src
 
 ** flycheck
 Flycheck for compile and error check while editing