mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
Support for marking pending commits used and unused.
* magit.el (magit-rewrite-set-used, magit-rewrite-set-unused): New. (magit-mode-map): Bind them.
This commit is contained in:
parent
bfd8f4baa0
commit
d7f0a8dc5a
1 changed files with 16 additions and 0 deletions
16
magit.el
16
magit.el
|
@ -780,6 +780,8 @@ Many Magit faces inherit from this one by default."
|
|||
(define-key map (kbd "r t") 'magit-rewrite-stop)
|
||||
(define-key map (kbd "r a") 'magit-rewrite-abort)
|
||||
(define-key map (kbd "r f") 'magit-rewrite-finish)
|
||||
(define-key map (kbd "r *") 'magit-rewrite-set-unused)
|
||||
(define-key map (kbd "r .") 'magit-rewrite-set-used)
|
||||
(define-key map (kbd "P") 'magit-push)
|
||||
(define-key map (kbd "f") 'magit-remote-update)
|
||||
(define-key map (kbd "F") 'magit-pull)
|
||||
|
@ -1330,6 +1332,20 @@ Please see the manual for a complete description of Magit.
|
|||
(setf (cdr p) (plist-put (cdr p) prop value))
|
||||
(magit-write-rewrite-info info))))
|
||||
|
||||
(defun magit-rewrite-set-used ()
|
||||
(interactive)
|
||||
(magit-section-case (item info)
|
||||
((pending commit)
|
||||
(magit-rewrite-set-commit-property info 'used t)
|
||||
(magit-update-status (magit-find-status-buffer)))))
|
||||
|
||||
(defun magit-rewrite-set-unused ()
|
||||
(interactive)
|
||||
(magit-section-case (item info)
|
||||
((pending commit)
|
||||
(magit-rewrite-set-commit-property info 'used nil)
|
||||
(magit-update-status (magit-find-status-buffer)))))
|
||||
|
||||
(defun magit-insert-pending-changes ()
|
||||
(let* ((info (magit-read-rewrite-info))
|
||||
(orig (cadr (assq 'orig info))))
|
||||
|
|
Loading…
Reference in a new issue