summary refs log tree commit diff
path: root/emacs/custom/fcuny-git.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-01-14 10:55:38 -0800
committerFranck Cuny <franck@fcuny.net>2022-01-14 10:55:38 -0800
commit764177b77321d42e0dd64285f5bb2372f215dd60 (patch)
tree02fcbd0c095d81ef84fe515174b59e1d15b36efc /emacs/custom/fcuny-git.el
parentzsh: gcloud completion is somewhere else (diff)
downloademacs.d-764177b77321d42e0dd64285f5bb2372f215dd60.tar.gz
emacs: simplify git/magit configuration
I don't have to deal with magit anymore, so I can drop all the stuff
that removed the VC stuff.
Diffstat (limited to 'emacs/custom/fcuny-git.el')
-rw-r--r--emacs/custom/fcuny-git.el67
1 files changed, 1 insertions, 66 deletions
diff --git a/emacs/custom/fcuny-git.el b/emacs/custom/fcuny-git.el
index 5425bb8..eac237c 100644
--- a/emacs/custom/fcuny-git.el
+++ b/emacs/custom/fcuny-git.el
@@ -16,68 +16,8 @@
   :bind (("C-x g" . magit-status))
   :custom
   (vc-follow-symlinks t)
-  :config
-  (defun fcuny/magit-settings-for-work ()
-    "Settings to apply for work. The main monorepo at work is too large for most of the default settings with magit."
-    ;; if we're on darwin, we're on a work laptop, so let's make sure we
-    ;; use the proper `git' binary.
-    (setq magit-git-executable "/opt/twitter_mde/bin/git")
-
-    ;; no need to show the last 10 commits, 5 is enough.
-    (setq magit-log-section-commit-count 5)
-
-    ;; when working with source, some of the hooks are extremely
-    ;; expensive and don't add much values (i.e tags). Let's reduce the
-    ;; list to things that are actually useful. This still takes ~10
-    ;; seconds when running `magit-status'.
-    (setq git-commit-setup-hook
-          '(git-commit-save-message
-            git-commit-turn-on-auto-fill
-            git-commit-turn-on-flyspell
-            git-commit-propertize-diff
-            with-editor-usage-message))
-    (setq magit-refs-sections-hook
-        '(magit-insert-error-header
-          magit-insert-branch-description
-          magit-insert-local-branches))
-    (setq magit-status-sections-hook
-          '(magit-insert-status-headers
-            magit-insert-merge-log
-            magit-insert-rebase-sequence
-            magit-insert-am-sequence
-            magit-insert-sequencer-sequence
-            magit-insert-untracked-files
-            magit-insert-unstaged-changes
-            magit-insert-staged-changes
-            magit-insert-stashes))
-    (setq magit-status-headers-hook
-        '(magit-insert-error-header
-          magit-insert-diff-filter-header
-          magit-insert-head-branch-header)))
-
-  (defun fcuny/magit-settings ()
-    ;; Add a "latest commits" section
-    (magit-add-section-hook 'magit-status-sections-hook
-                            'magit-insert-recent-commits
-                            nil t)
-    (magit-add-section-hook 'magit-status-sections-hook
-                            'magit-insert-unpushed-to-upstream
-                            'magit-insert-unpushed-to-upstream-or-recent
-                            'replace))
-
-  (when (fcuny/check-work-machine-p)
-    (fcuny/magit-settings-for-work)
-    (fcuny/magit-settings))
-
   :custom
-  (magit-completing-read-function 'ivy-completing-read)
-  (magit-section-initial-visibility-alist
-   '((stashes . show)
-     (unpushed . how)
-     (unpulled . show)
-     (recent . show)
-     (untracked . show)
-     (unstaged . show))))
+  (magit-completing-read-function 'ivy-completing-read))
 
 (use-package magit-repos
   :ensure nil
@@ -148,11 +88,6 @@
 (dir-locals-set-directory-class
  "/Users/fcuny/workspace/source" 'huge-git-repository)
 
-;; https://magit.vc/manual/magit/Performance.html
-;; disable Git from the VC mode, since we use magit. This should help
-;; with performances.
-(setq vc-handled-backends (delq 'Git vc-handled-backends))
-
 (defun fcuny/clone-repo (url)
   "Clone a repository in the workspace"
   (interactive "sURL:")