From 9105c3e557e2279abae640460ca1acad332e8236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:22:08 +0200 Subject: [PATCH 1/9] Added minor mode for the different magit buffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 9 deletions(-) diff --git a/magit.el b/magit.el index 70aab971..01edcc2d 100644 --- a/magit.el +++ b/magit.el @@ -1420,6 +1420,34 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "q") 'quit-window) map)) +(defvar magit-commit-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-status-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-stash-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-log-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-reflog-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-diff-mode-map + (let ((map (make-sparse-keymap))) + map)) + +(defvar magit-wazzup-mode-map + (let ((map (make-sparse-keymap))) + map)) + (easy-menu-define magit-mode-menu magit-mode-map "Magit menu" '("Magit" @@ -2105,6 +2133,13 @@ must return a string which will represent the log line.") "--pretty=medium" "--cc" "-p" commit))) +(define-minor-mode magit-commit-mode + "Minor mode to view git commit" + :group magit + :init-value () + :lighter () + :keymap magit-commit-mode-map) + (defun magit-show-commit (commit &optional scroll) (when (magit-section-p commit) (setq commit (magit-section-info commit))) @@ -2127,7 +2162,8 @@ must return a string which will represent the log line.") (set-buffer buf) (goto-char (point-min)) (magit-mode-init dir 'commit - #'magit-refresh-commit-buffer commit)))))) + #'magit-refresh-commit-buffer commit) + (magit-commit-mode t)))))) (defvar magit-marked-commit nil) @@ -2269,6 +2305,13 @@ must return a string which will represent the log line.") (let ((default-directory dir)) (magit-run* (list "git" "init")))))) +(define-minor-mode magit-status-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-status-mode-map) + ;;;###autoload (defun magit-status (dir) (interactive (list (or (and (not current-prefix-arg) @@ -2291,7 +2334,8 @@ must return a string which will represent the log line.") (file-name-nondirectory (directory-file-name topdir)) "*")))))) (switch-to-buffer buf) - (magit-mode-init topdir 'status #'magit-refresh-status))))) + (magit-mode-init topdir 'status #'magit-refresh-status) + (magit-status-mode t))))) ;;; Staging and Unstaging @@ -3065,6 +3109,13 @@ Prefix arg means justify as well." (defvar magit-currently-shown-stash nil) +(define-minor-mode magit-stash-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-stash-mode-map) + (defun magit-show-stash (stash &optional scroll) (when (magit-section-p stash) (setq stash (magit-section-info stash))) @@ -3089,7 +3140,8 @@ Prefix arg means justify as well." (let* ((range (cons (concat stash "^2^") stash)) (args (magit-rev-range-to-git range))) (magit-mode-init dir 'diff #'magit-refresh-diff-buffer - range args))))))) + range args) + (magit-stash-mode t))))))) ;;; Topic branches (using topgit) @@ -3225,6 +3277,13 @@ Prefix arg means justify as well." ,@args "--")))) +(define-minor-mode magit-log-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-log-mode-map) + (defun magit-log (&optional arg) (interactive "P") (let* ((range (if arg @@ -3234,7 +3293,8 @@ Prefix arg means justify as well." (args (list (magit-rev-range-to-git range)))) (switch-to-buffer "*magit-log*") (magit-mode-init topdir 'log #'magit-refresh-log-buffer range - "--pretty=oneline" args))) + "--pretty=oneline" args) + (magit-log-mode t))) (defun magit-log-grep (str) "Search for regexp specified by STR in the commit log." @@ -3244,7 +3304,8 @@ Prefix arg means justify as well." (magit-mode-init topdir 'log #'magit-refresh-log-buffer "HEAD" "--pretty=oneline" (list "-E" - (format "--grep=%s" (shell-quote-argument str)))))) + (format "--grep=%s" (shell-quote-argument str)))) + (magit-log-mode t))) (defun magit-log-long (&optional arg) (interactive "P") @@ -3255,7 +3316,8 @@ Prefix arg means justify as well." (args (list (magit-rev-range-to-git range)))) (switch-to-buffer "*magit-log*") (magit-mode-init topdir 'log #'magit-refresh-log-buffer range - "--stat" args))) + "--stat" args) + (magit-log-mode t))) ;;; Reflog @@ -3269,6 +3331,13 @@ Prefix arg means justify as well." "--pretty=format:* %H %s" args))) +(define-minor-mode magit-reflog-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-reflog-mode-map) + (defun magit-reflog (head) (interactive (list (magit-read-rev "Reflog of" "HEAD"))) (if head @@ -3276,7 +3345,8 @@ Prefix arg means justify as well." (args (magit-rev-to-git head))) (switch-to-buffer "*magit-reflog*") (magit-mode-init topdir 'reflog - #'magit-refresh-reflog-buffer head args)))) + #'magit-refresh-reflog-buffer head args) + (magit-reflog-mode t)))) (defun magit-reflog-head () (interactive) @@ -3291,6 +3361,13 @@ Prefix arg means justify as well." 'magit-wash-diffs "diff" (magit-diff-U-arg) args))) +(define-minor-mode magit-diff-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-diff-mode-map) + (defun magit-diff (range) (interactive (list (magit-read-rev-range "Diff"))) (if range @@ -3300,7 +3377,8 @@ Prefix arg means justify as well." (display-buffer buf) (save-excursion (set-buffer buf) - (magit-mode-init dir 'diff #'magit-refresh-diff-buffer range args))))) + (magit-mode-init dir 'diff #'magit-refresh-diff-buffer range args) + (magit-diff-mode t))))) (defun magit-diff-working-tree (rev) (interactive (list (magit-read-rev "Diff with (default HEAD)"))) @@ -3369,6 +3447,13 @@ Prefix arg means justify as well." "--")))) (magit-set-section-info ref section)))))))))) +(define-minor-mode magit-wazzup-mode + "Minor mode for looking at git status" + :group magit + :init-value () + :lighter () + :keymap magit-wazzup-mode-map) + (defun magit-wazzup (&optional all) (interactive "P") (let ((topdir (magit-get-top-dir default-directory)) @@ -3376,7 +3461,8 @@ Prefix arg means justify as well." (switch-to-buffer "*magit-wazzup*") (magit-mode-init topdir 'wazzup #'magit-refresh-wazzup-buffer - current-branch all))) + current-branch all) + (magit-wazzup-mode t))) ;;; Miscellaneous From d2b814ad9e7d79a7f7d4549ff00d799713f220c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:23:00 +0200 Subject: [PATCH 2/9] Moving hunk size modifier in modes where there are hunks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index 01edcc2d..daa63d35 100644 --- a/magit.el +++ b/magit.el @@ -1369,9 +1369,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "?") 'magit-describe-item) (define-key map (kbd ".") 'magit-mark-item) (define-key map (kbd "=") 'magit-diff-with-mark) - (define-key map (kbd "-") 'magit-diff-smaller-hunks) - (define-key map (kbd "+") 'magit-diff-larger-hunks) - (define-key map (kbd "0") 'magit-diff-default-hunks) (define-key map (kbd "l") 'magit-log) (define-key map (kbd "L") 'magit-log-long) (define-key map (kbd "h") 'magit-reflog-head) @@ -1426,10 +1423,16 @@ FUNC should leave point at the end of the modified region" (defvar magit-status-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd "-") 'magit-diff-smaller-hunks) + (define-key map (kbd "+") 'magit-diff-larger-hunks) + (define-key map (kbd "0") 'magit-diff-default-hunks) map)) (defvar magit-stash-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd "-") 'magit-diff-smaller-hunks) + (define-key map (kbd "+") 'magit-diff-larger-hunks) + (define-key map (kbd "0") 'magit-diff-default-hunks) map)) (defvar magit-log-mode-map @@ -1442,6 +1445,9 @@ FUNC should leave point at the end of the modified region" (defvar magit-diff-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd "-") 'magit-diff-smaller-hunks) + (define-key map (kbd "+") 'magit-diff-larger-hunks) + (define-key map (kbd "0") 'magit-diff-default-hunks) map)) (defvar magit-wazzup-mode-map From 682809d82d2a03293921abfd343b57f3a296b523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:23:46 +0200 Subject: [PATCH 3/9] Moving staging function to status buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/magit.el b/magit.el index daa63d35..bce880f2 100644 --- a/magit.el +++ b/magit.el @@ -1360,12 +1360,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "") 'magit-goto-parent-section) (define-key map (kbd "g") 'magit-refresh) (define-key map (kbd "G") 'magit-refresh-all) - (define-key map (kbd "s") 'magit-stage-item) - (define-key map (kbd "S") 'magit-stage-all) - (define-key map (kbd "u") 'magit-unstage-item) - (define-key map (kbd "U") 'magit-unstage-all) - (define-key map (kbd "i") 'magit-ignore-item) - (define-key map (kbd "I") 'magit-ignore-item-locally) (define-key map (kbd "?") 'magit-describe-item) (define-key map (kbd ".") 'magit-mark-item) (define-key map (kbd "=") 'magit-diff-with-mark) @@ -1426,6 +1420,12 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "-") 'magit-diff-smaller-hunks) (define-key map (kbd "+") 'magit-diff-larger-hunks) (define-key map (kbd "0") 'magit-diff-default-hunks) + (define-key map (kbd "s") 'magit-stage-item) + (define-key map (kbd "S") 'magit-stage-all) + (define-key map (kbd "u") 'magit-unstage-item) + (define-key map (kbd "U") 'magit-unstage-all) + (define-key map (kbd "i") 'magit-ignore-item) + (define-key map (kbd "I") 'magit-ignore-item-locally) map)) (defvar magit-stash-mode-map From bca27d36bbc954f677c5588f4f8da6ec247553ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:24:39 +0200 Subject: [PATCH 4/9] Moving diff view function where there are commits. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/magit.el b/magit.el index bce880f2..a7261f7d 100644 --- a/magit.el +++ b/magit.el @@ -1361,14 +1361,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "g") 'magit-refresh) (define-key map (kbd "G") 'magit-refresh-all) (define-key map (kbd "?") 'magit-describe-item) - (define-key map (kbd ".") 'magit-mark-item) - (define-key map (kbd "=") 'magit-diff-with-mark) (define-key map (kbd "l") 'magit-log) (define-key map (kbd "L") 'magit-log-long) (define-key map (kbd "h") 'magit-reflog-head) (define-key map (kbd "H") 'magit-reflog) - (define-key map (kbd "d") 'magit-diff-working-tree) - (define-key map (kbd "D") 'magit-diff) (define-key map (kbd "a") 'magit-apply-item) (define-key map (kbd "A") 'magit-cherry-pick-item) (define-key map (kbd "v") 'magit-revert-item) @@ -1426,6 +1422,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "U") 'magit-unstage-all) (define-key map (kbd "i") 'magit-ignore-item) (define-key map (kbd "I") 'magit-ignore-item-locally) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "d") 'magit-diff-working-tree) + (define-key map (kbd "D") 'magit-diff) map)) (defvar magit-stash-mode-map @@ -1437,10 +1437,18 @@ FUNC should leave point at the end of the modified region" (defvar magit-log-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "d") 'magit-diff-working-tree) + (define-key map (kbd "D") 'magit-diff) map)) (defvar magit-reflog-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "d") 'magit-diff-working-tree) + (define-key map (kbd "D") 'magit-diff) map)) (defvar magit-diff-mode-map @@ -1452,6 +1460,10 @@ FUNC should leave point at the end of the modified region" (defvar magit-wazzup-mode-map (let ((map (make-sparse-keymap))) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "d") 'magit-diff-working-tree) + (define-key map (kbd "D") 'magit-diff) map)) (easy-menu-define magit-mode-menu magit-mode-map From 632878283393f22adc6aa645116c311375c58c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:25:50 +0200 Subject: [PATCH 5/9] Moving apply, cherry-pick and revert function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They all apply to hunk, commit and diff that are in status, stash, log, reflog, diff and wazzup buffers. Signed-off-by: Rémi Vanicat --- magit.el | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index a7261f7d..fa6e8108 100644 --- a/magit.el +++ b/magit.el @@ -1365,9 +1365,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "L") 'magit-log-long) (define-key map (kbd "h") 'magit-reflog-head) (define-key map (kbd "H") 'magit-reflog) - (define-key map (kbd "a") 'magit-apply-item) - (define-key map (kbd "A") 'magit-cherry-pick-item) - (define-key map (kbd "v") 'magit-revert-item) (define-key map (kbd "x") 'magit-reset-head) (define-key map (kbd "X") 'magit-reset-working-tree) (define-key map (kbd "k") 'magit-discard-item) @@ -1426,6 +1423,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "=") 'magit-diff-with-mark) (define-key map (kbd "d") 'magit-diff-working-tree) (define-key map (kbd "D") 'magit-diff) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (defvar magit-stash-mode-map @@ -1433,6 +1433,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "-") 'magit-diff-smaller-hunks) (define-key map (kbd "+") 'magit-diff-larger-hunks) (define-key map (kbd "0") 'magit-diff-default-hunks) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (defvar magit-log-mode-map @@ -1441,6 +1444,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "=") 'magit-diff-with-mark) (define-key map (kbd "d") 'magit-diff-working-tree) (define-key map (kbd "D") 'magit-diff) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (defvar magit-reflog-mode-map @@ -1449,6 +1455,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "=") 'magit-diff-with-mark) (define-key map (kbd "d") 'magit-diff-working-tree) (define-key map (kbd "D") 'magit-diff) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (defvar magit-diff-mode-map @@ -1456,6 +1465,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "-") 'magit-diff-smaller-hunks) (define-key map (kbd "+") 'magit-diff-larger-hunks) (define-key map (kbd "0") 'magit-diff-default-hunks) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (defvar magit-wazzup-mode-map @@ -1464,6 +1476,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "=") 'magit-diff-with-mark) (define-key map (kbd "d") 'magit-diff-working-tree) (define-key map (kbd "D") 'magit-diff) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "v") 'magit-revert-item) map)) (easy-menu-define magit-mode-menu magit-mode-map From 3eec4705bca14dad4fdb60e24de497d560008ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:26:33 +0200 Subject: [PATCH 6/9] Moving merging and branching function where there are commit and branch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/magit.el b/magit.el index fa6e8108..169669fc 100644 --- a/magit.el +++ b/magit.el @@ -1373,10 +1373,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) (define-key map (kbd "DEL") 'magit-show-item-or-scroll-down) (define-key map (kbd "C-w") 'magit-copy-item-as-kill) - (define-key map (kbd "b") 'magit-checkout) - (define-key map (kbd "B") 'magit-create-branch) - (define-key map (kbd "m") 'magit-manual-merge) - (define-key map (kbd "M") 'magit-automatic-merge) (define-key map (kbd "e") 'magit-interactive-resolve-item) (define-key map (kbd "N r") 'magit-svn-rebase) (define-key map (kbd "N c") 'magit-svn-dcommit) @@ -1426,6 +1422,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "a") 'magit-apply-item) (define-key map (kbd "A") 'magit-cherry-pick-item) (define-key map (kbd "v") 'magit-revert-item) + (define-key map (kbd "b") 'magit-checkout) + (define-key map (kbd "B") 'magit-create-branch) + (define-key map (kbd "m") 'magit-manual-merge) + (define-key map (kbd "M") 'magit-automatic-merge) map)) (defvar magit-stash-mode-map @@ -1447,6 +1447,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "a") 'magit-apply-item) (define-key map (kbd "A") 'magit-cherry-pick-item) (define-key map (kbd "v") 'magit-revert-item) + (define-key map (kbd "b") 'magit-checkout) + (define-key map (kbd "B") 'magit-create-branch) + (define-key map (kbd "m") 'magit-manual-merge) + (define-key map (kbd "M") 'magit-automatic-merge) map)) (defvar magit-reflog-mode-map @@ -1479,6 +1483,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "a") 'magit-apply-item) (define-key map (kbd "A") 'magit-cherry-pick-item) (define-key map (kbd "v") 'magit-revert-item) + (define-key map (kbd "b") 'magit-checkout) + (define-key map (kbd "B") 'magit-create-branch) + (define-key map (kbd "m") 'magit-manual-merge) + (define-key map (kbd "M") 'magit-automatic-merge) map)) (easy-menu-define magit-mode-menu magit-mode-map From d5dd0578ba6b92d4317a127412d8d8a63541c107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:27:18 +0200 Subject: [PATCH 7/9] Moving function working specifically on status hunk, diff and files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/magit.el b/magit.el index 169669fc..68feb386 100644 --- a/magit.el +++ b/magit.el @@ -1367,13 +1367,11 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "H") 'magit-reflog) (define-key map (kbd "x") 'magit-reset-head) (define-key map (kbd "X") 'magit-reset-working-tree) - (define-key map (kbd "k") 'magit-discard-item) (define-key map (kbd "!") 'magit-shell-command) (define-key map (kbd "RET") 'magit-visit-item) (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) (define-key map (kbd "DEL") 'magit-show-item-or-scroll-down) (define-key map (kbd "C-w") 'magit-copy-item-as-kill) - (define-key map (kbd "e") 'magit-interactive-resolve-item) (define-key map (kbd "N r") 'magit-svn-rebase) (define-key map (kbd "N c") 'magit-svn-dcommit) (define-key map (kbd "N f") 'magit-svn-find-rev) @@ -1388,7 +1386,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "f") 'magit-remote-update) (define-key map (kbd "F") 'magit-pull) (define-key map (kbd "c") 'magit-log-edit) - (define-key map (kbd "C") 'magit-add-log) (define-key map (kbd "t") 'magit-tag) (define-key map (kbd "T") 'magit-annotated-tag) (define-key map (kbd "z") 'magit-stash) @@ -1426,6 +1423,9 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "B") 'magit-create-branch) (define-key map (kbd "m") 'magit-manual-merge) (define-key map (kbd "M") 'magit-automatic-merge) + (define-key map (kbd "k") 'magit-discard-item) + (define-key map (kbd "e") 'magit-interactive-resolve-item) + (define-key map (kbd "C") 'magit-add-log) map)) (defvar magit-stash-mode-map From 6312006a548731c2ac89446025a51ab27d427d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:28:38 +0200 Subject: [PATCH 8/9] Moving function related to current status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit magit-reset-head is also put wherever there are commits Signed-off-by: Rémi Vanicat --- magit.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/magit.el b/magit.el index 68feb386..df5d44c4 100644 --- a/magit.el +++ b/magit.el @@ -1365,8 +1365,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "L") 'magit-log-long) (define-key map (kbd "h") 'magit-reflog-head) (define-key map (kbd "H") 'magit-reflog) - (define-key map (kbd "x") 'magit-reset-head) - (define-key map (kbd "X") 'magit-reset-working-tree) (define-key map (kbd "!") 'magit-shell-command) (define-key map (kbd "RET") 'magit-visit-item) (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) @@ -1386,10 +1384,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "f") 'magit-remote-update) (define-key map (kbd "F") 'magit-pull) (define-key map (kbd "c") 'magit-log-edit) - (define-key map (kbd "t") 'magit-tag) - (define-key map (kbd "T") 'magit-annotated-tag) - (define-key map (kbd "z") 'magit-stash) - (define-key map (kbd "Z") 'magit-stash-snapshot) (define-key map (kbd "w") 'magit-wazzup) (define-key map (kbd "$") 'magit-display-process) (define-key map (kbd "E") 'magit-interactive-rebase) @@ -1426,6 +1420,12 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "k") 'magit-discard-item) (define-key map (kbd "e") 'magit-interactive-resolve-item) (define-key map (kbd "C") 'magit-add-log) + (define-key map (kbd "x") 'magit-reset-head) + (define-key map (kbd "X") 'magit-reset-working-tree) + (define-key map (kbd "t") 'magit-tag) + (define-key map (kbd "T") 'magit-annotated-tag) + (define-key map (kbd "z") 'magit-stash) + (define-key map (kbd "Z") 'magit-stash-snapshot) map)) (defvar magit-stash-mode-map @@ -1451,6 +1451,7 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "B") 'magit-create-branch) (define-key map (kbd "m") 'magit-manual-merge) (define-key map (kbd "M") 'magit-automatic-merge) + (define-key map (kbd "x") 'magit-reset-head) map)) (defvar magit-reflog-mode-map @@ -1462,6 +1463,7 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "a") 'magit-apply-item) (define-key map (kbd "A") 'magit-cherry-pick-item) (define-key map (kbd "v") 'magit-revert-item) + (define-key map (kbd "x") 'magit-reset-head) map)) (defvar magit-diff-mode-map @@ -1487,6 +1489,7 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "B") 'magit-create-branch) (define-key map (kbd "m") 'magit-manual-merge) (define-key map (kbd "M") 'magit-automatic-merge) + (define-key map (kbd "x") 'magit-reset-head) map)) (easy-menu-define magit-mode-menu magit-mode-map From d976e65dbf34c21c34f1772fcf2fa32af537bdab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Fri, 9 Apr 2010 13:29:50 +0200 Subject: [PATCH 9/9] Regrouping command that create new view of current git repositories. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Vanicat --- magit.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magit.el b/magit.el index df5d44c4..396ce2aa 100644 --- a/magit.el +++ b/magit.el @@ -1361,10 +1361,6 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "g") 'magit-refresh) (define-key map (kbd "G") 'magit-refresh-all) (define-key map (kbd "?") 'magit-describe-item) - (define-key map (kbd "l") 'magit-log) - (define-key map (kbd "L") 'magit-log-long) - (define-key map (kbd "h") 'magit-reflog-head) - (define-key map (kbd "H") 'magit-reflog) (define-key map (kbd "!") 'magit-shell-command) (define-key map (kbd "RET") 'magit-visit-item) (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) @@ -1384,6 +1380,10 @@ FUNC should leave point at the end of the modified region" (define-key map (kbd "f") 'magit-remote-update) (define-key map (kbd "F") 'magit-pull) (define-key map (kbd "c") 'magit-log-edit) + (define-key map (kbd "l") 'magit-log) + (define-key map (kbd "L") 'magit-log-long) + (define-key map (kbd "h") 'magit-reflog-head) + (define-key map (kbd "H") 'magit-reflog) (define-key map (kbd "w") 'magit-wazzup) (define-key map (kbd "$") 'magit-display-process) (define-key map (kbd "E") 'magit-interactive-rebase)