Commit f987534e authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-gitignore-popup: New popup

Bind "I" to this popup instead of to `magit-gitignore-locally'.
That command is now available at "I l".  `magit-gitignore' (the
global variant) is now available on "I g", but continues to be
available on "i" by default.

The purpose of this change is to make it possible to use "i"
for `magit-imerge-popup' from the `magit-imerge' package without
making `magit-gitignore' unavailable.

Discussed in https://github.com/magit/magit-imerge/issues/2.
parent f580a45d
......@@ -241,6 +241,14 @@ with two prefix arguments remove ignored files only.
;;; Gitignore
;;;###autoload (autoload 'magit-ignore-popup "extras" nil t)
(magit-define-popup magit-gitignore-popup
"Popup console for gitignore commands."
:man-page "gitignore"
:actions '((?l "ignore locally" magit-gitignore)
(?g "ignore globally" magit-gitignore-globally))
:max-action-columns 1)
;;;###autoload
(defun magit-gitignore (file-or-pattern &optional local)
"Instruct Git to ignore FILE-OR-PATTERN.
......
......@@ -360,8 +360,7 @@ starts complicating other things, then it will be removed."
(define-key map (kbd "p") 'magit-push-popup)
(define-key map (kbd ",") 'magit-delete-thing)
(define-key map (kbd ";") 'magit-file-untrack)
(define-key map (kbd "C-c C-i") 'magit-gitignore)
(define-key map (kbd "C-c i") 'magit-gitignore-locally))
(define-key map (kbd "C-c C-i") 'magit-gitignore-popup))
(t
(define-key map [C-return] 'magit-visit-thing)
(define-key map (kbd "C-m") 'magit-visit-thing)
......@@ -380,7 +379,7 @@ starts complicating other things, then it will be removed."
(define-key map (kbd "k") 'magit-delete-thing)
(define-key map (kbd "K") 'magit-file-untrack)
(define-key map (kbd "i") 'magit-gitignore)
(define-key map (kbd "I") 'magit-gitignore-locally)))
(define-key map (kbd "I") 'magit-gitignore-popup)))
(define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up)
(define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down)
(define-key map "+" 'magit-diff-more-context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment