Function: magit-git-bisect

magit-git-bisect is a byte-compiled function defined in magit-bisect.el.

Signature

(magit-git-bisect SUBCOMMAND &optional ARGS NO-ASSERT)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-bisect.el
(defun magit-git-bisect (subcommand &optional args no-assert)
  (unless (or no-assert (magit-bisect-in-progress-p))
    (user-error "Not bisecting"))
  (message "Bisecting...")
  (magit-with-toplevel
    (magit-run-git-async "bisect" subcommand args))
  (set-process-sentinel
   magit-this-process
   (lambda (process event)
     (when (memq (process-status process) '(exit signal))
       (if (> (process-exit-status process) 0)
           (magit-process-sentinel process event)
         (process-put process 'inhibit-refresh t)
         (magit-process-sentinel process event)
         (when (buffer-live-p (process-buffer process))
           (with-current-buffer (process-buffer process)
             (when-let* ((section (magit-section-at))
                         (output (buffer-substring-no-properties
                                  (oref section content)
                                  (oref section end))))
               (with-temp-file
                   (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir))
                 (insert output)))))
         (magit-refresh))
       (message "Bisecting...done")))))