| | |
| | | magit-process-popup-time 10
|
| | | ;; ask me if I want a tracking upstream
|
| | | magit-set-upstream-on-push 'askifnotset
|
| | | )))
|
| | | ))
|
| | | )
|
| | | #+END_SRC
|
| | |
|
| | | *** More general yes and no prompt
|
| | | The default setting can miss some.
|
| | | Don't redefine the regex in case this is too general.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | ;;(when-let ((regex "[\[\(]]?\\([Yy]\\(es\\)?\\)[/|]\\([Nn]o?\\)[\]\)]")
|
| | | (defun magit-process-general-yn-prompt-hook (proc str)
|
| | | "Handle [y/n] prompts"
|
| | | (when-let ((beg (string-match "[\[\(]]?\\([Yy]\\(es\\)?\\)[/|]\\([Nn]o?\\)[\]\)]" str)))
|
| | | (let ;; ((max-mini-window-height 30))
|
| | | (process-send-string
|
| | | proc
|
| | | (downcase
|
| | | (concat
|
| | | (match-string
|
| | | (if (save-match-data
|
| | | (magit-process-kill-on-abort proc
|
| | | (y-or-n-p (substring str 0 beg)))) 1 2)
|
| | | str)
|
| | | "\n"))))))
|
| | |
|
| | | (add-hook 'magit-process-prompt-functions
|
| | | #'magit-process-general-yn-prompt-hook)
|
| | | #+END_SRC
|
| | | *** Gerrit integration
|
| | | Gerrit takes ~origin:refs/for/master~ as a destination.
|
| | | Enable magit to work with its oddities.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package magit-gerrit
|
| | | :ensure t)
|
| | | #+END_SRC
|
| | |
|
| | | ** CEDET
|