diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2018-10-15 12:02:00 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2019-02-14 20:17:36 +0100 |
| commit | 9ae0f6d797d25917c0c0afc3bbc80b1c8e053d7a (patch) | |
| tree | 5f08c0071623e736a37b581f96ec2122d6682af7 /lisp/magit-bisect.el | |
| parent | fbf58abcb670d8227a4598ad853ed4573ed92798 (diff) | |
Define magit-bisect as a transient command
Diffstat (limited to 'lisp/magit-bisect.el')
| -rw-r--r-- | lisp/magit-bisect.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el index a4345c7..4db2489 100644 --- a/lisp/magit-bisect.el +++ b/lisp/magit-bisect.el @@ -54,18 +54,21 @@ ;;; Commands -;;;###autoload (autoload 'magit-bisect-popup "magit-bisect" nil t) -(magit-define-popup magit-bisect-popup - "Popup console for bisect commands." +;;;###autoload (autoload 'magit-bisect "magit-bisect" nil t) +(define-transient-command magit-bisect () + "Narrow in on the commit that introduced a bug." :man-page "git-bisect" - :actions '((?B "Start" magit-bisect-start) - (?s "Start script" magit-bisect-run)) - :sequence-actions '((?b "Bad" magit-bisect-bad) - (?g "Good" magit-bisect-good) - (?k "Skip" magit-bisect-skip) - (?r "Reset" magit-bisect-reset) - (?s "Run script" magit-bisect-run)) - :sequence-predicate 'magit-bisect-in-progress-p) + ["Actions" + :if-not magit-bisect-in-progress-p + ("B" "Start" magit-bisect-start) + ("s" "Start script" magit-bisect-run)] + ["Actions" + :if magit-bisect-in-progress-p + ("B" "Bad" magit-bisect-bad) + ("g" "Good" magit-bisect-good) + ("k" "Skip" magit-bisect-skip) + ("r" "Reset" magit-bisect-reset) + ("s" "Run script" magit-bisect-run)]) ;;;###autoload (defun magit-bisect-start (bad good) @@ -74,8 +77,8 @@ Bisecting a bug means to find the commit that introduced it. This command starts such a bisect session by asking for a know good and a bad commit. To move the session forward use the -other actions from the bisect popup (\ -\\<magit-status-mode-map>\\[magit-bisect-popup])." +other actions from the bisect transient command (\ +\\<magit-status-mode-map>\\[magit-bisect])." (interactive (if (magit-bisect-in-progress-p) (user-error "Already bisecting") (magit-bisect-start-read-args))) |
