update of packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; magit-bisect.el --- Bisect support for Magit -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2008-2022 The Magit Project Contributors
|
||||
;; Copyright (C) 2008-2023 The Magit Project Contributors
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
@@ -113,6 +113,8 @@ other actions from the bisect transient command (\
|
||||
bad))
|
||||
(when (magit-anything-modified-p)
|
||||
(user-error "Cannot bisect with uncommitted changes"))
|
||||
(magit-repository-local-set 'bisect--first-parent
|
||||
(transient-arg-value "--first-parent" args))
|
||||
(magit-git-bisect "start" (list args bad good) t))
|
||||
|
||||
(defun magit-bisect-start-read-args ()
|
||||
@@ -134,7 +136,9 @@ other actions from the bisect transient command (\
|
||||
(interactive)
|
||||
(magit-confirm 'reset-bisect)
|
||||
(magit-run-git "bisect" "reset")
|
||||
(ignore-errors (delete-file (magit-git-dir "BISECT_CMD_OUTPUT"))))
|
||||
(magit-repository-local-delete 'bisect--first-parent)
|
||||
(ignore-errors
|
||||
(delete-file (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-good ()
|
||||
@@ -197,7 +201,7 @@ bisect run'."
|
||||
;; next `git bisect run' call requires the bisect to be started.
|
||||
(magit-with-toplevel
|
||||
(magit-process-git
|
||||
(list :file (magit-git-dir "BISECT_CMD_OUTPUT"))
|
||||
(list :file (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir)))
|
||||
(magit-process-git-arguments
|
||||
(list "bisect" "start" bad good args)))
|
||||
(magit-refresh)))
|
||||
@@ -225,7 +229,8 @@ bisect run'."
|
||||
(output (buffer-substring-no-properties
|
||||
(oref section content)
|
||||
(oref section end))))
|
||||
(with-temp-file (magit-git-dir "BISECT_CMD_OUTPUT")
|
||||
(with-temp-file
|
||||
(expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir))
|
||||
(insert output)))))
|
||||
(magit-refresh))
|
||||
(message "Bisecting...done")))))
|
||||
@@ -233,16 +238,17 @@ bisect run'."
|
||||
;;; Sections
|
||||
|
||||
(defun magit-bisect-in-progress-p ()
|
||||
(file-exists-p (magit-git-dir "BISECT_LOG")))
|
||||
(file-exists-p (expand-file-name "BISECT_LOG" (magit-gitdir))))
|
||||
|
||||
(defun magit-bisect-terms ()
|
||||
(magit-file-lines (magit-git-dir "BISECT_TERMS")))
|
||||
(magit-file-lines (expand-file-name "BISECT_TERMS" (magit-gitdir))))
|
||||
|
||||
(defun magit-insert-bisect-output ()
|
||||
"While bisecting, insert section with output from `git bisect'."
|
||||
(when (magit-bisect-in-progress-p)
|
||||
(let* ((lines
|
||||
(or (magit-file-lines (magit-git-dir "BISECT_CMD_OUTPUT"))
|
||||
(or (magit-file-lines
|
||||
(expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir)))
|
||||
(list "Bisecting: (no saved bisect output)"
|
||||
"It appears you have invoked `git bisect' from a shell."
|
||||
"There is nothing wrong with that, we just cannot display"
|
||||
@@ -268,7 +274,9 @@ bisect run'."
|
||||
(magit-git-wash (apply-partially #'magit-log-wash-log 'bisect-vis)
|
||||
"bisect" "visualize" "git" "log"
|
||||
"--format=%h%x00%D%x00%s" "--decorate=full"
|
||||
(and magit-bisect-show-graph "--graph")))))
|
||||
(and magit-bisect-show-graph "--graph")
|
||||
(and (magit-repository-local-get 'bisect--first-parent)
|
||||
"--first-parent")))))
|
||||
|
||||
(defun magit-insert-bisect-log ()
|
||||
"While bisecting, insert section logging bisect progress."
|
||||
@@ -281,20 +289,23 @@ bisect run'."
|
||||
(defun magit-wash-bisect-log (_args)
|
||||
(let (beg)
|
||||
(while (progn (setq beg (point-marker))
|
||||
(re-search-forward "^\\(git bisect [^\n]+\n\\)" nil t))
|
||||
(magit-bind-match-strings (heading) nil
|
||||
(magit-delete-match)
|
||||
(save-restriction
|
||||
(narrow-to-region beg (point))
|
||||
(goto-char (point-min))
|
||||
(magit-insert-section (bisect-item heading t)
|
||||
(insert (propertize heading 'font-lock-face
|
||||
'magit-section-secondary-heading))
|
||||
(magit-insert-heading)
|
||||
(magit-wash-sequence
|
||||
(apply-partially #'magit-log-wash-rev 'bisect-log
|
||||
(magit-abbrev-length)))
|
||||
(insert ?\n)))))
|
||||
(re-search-forward
|
||||
"^\\(\\(?:git bisect\\|# status:\\) [^\n]+\n\\)" nil t))
|
||||
(if (string-prefix-p "# status:" (match-string 1))
|
||||
(magit-delete-match)
|
||||
(magit-bind-match-strings (heading) nil
|
||||
(magit-delete-match)
|
||||
(save-restriction
|
||||
(narrow-to-region beg (point))
|
||||
(goto-char (point-min))
|
||||
(magit-insert-section (bisect-item heading t)
|
||||
(insert (propertize heading 'font-lock-face
|
||||
'magit-section-secondary-heading))
|
||||
(magit-insert-heading)
|
||||
(magit-wash-sequence
|
||||
(apply-partially #'magit-log-wash-rev 'bisect-log
|
||||
(magit-abbrev-length)))
|
||||
(insert ?\n))))))
|
||||
(when (re-search-forward
|
||||
"# first bad commit: \\[\\([a-z0-9]\\{40,\\}\\)\\] [^\n]+\n" nil t)
|
||||
(magit-bind-match-strings (hash) nil
|
||||
|
||||
Reference in New Issue
Block a user