update packages

This commit is contained in:
2025-11-25 19:52:03 +01:00
parent 14ba373378
commit dbbae92267
280 changed files with 13451 additions and 11207 deletions

View File

@@ -147,7 +147,7 @@ The functions which respect this option are
- If nil, do not list any untracked files.
- If t, list untracked files, but if a directory does not contain any
untracked files, then only list that directory, not the contained
tracked files, then only list that directory, not the contained
untracked files.
- If all, then list each individual untracked files. This is can be
very slow and is discouraged.
@@ -346,8 +346,12 @@ also contains other useful hints.")
;;;###autoload
(defun magit-status-here ()
"Like `magit-status' but with non-nil `magit-status-goto-file-position'."
"Like `magit-status' but with non-nil `magit-status-goto-file-position'.
Before doing so, save all file-visiting buffers belonging to the current
repository without prompting."
(interactive)
(let ((magit-inhibit-refresh t))
(magit-save-repository-buffers t))
(let ((magit-status-goto-file-position t))
(call-interactively #'magit-status)))
@@ -433,9 +437,6 @@ Type \\[magit-commit] to create a commit.
:interactive nil
:group 'magit-status
(magit-hack-dir-local-variables)
(when magit-status-initial-section
(add-hook 'magit--initial-section-hook
#'magit-status-goto-initial-section nil t))
(setq magit--imenu-group-types '(not branch commit)))
(put 'magit-status-mode 'magit-diff-default-arguments
@@ -445,42 +446,47 @@ Type \\[magit-commit] to create a commit.
;;;###autoload
(defun magit-status-setup-buffer (&optional directory)
(unless directory
(setq directory default-directory))
(when (file-remote-p directory)
(magit-git-version-assert))
(let* ((default-directory directory)
(d (magit-diff--get-value 'magit-status-mode
magit-status-use-buffer-arguments))
(l (magit-log--get-value 'magit-status-mode
magit-status-use-buffer-arguments))
(file (and magit-status-goto-file-position
(magit-file-relative-name)))
(line (and file (save-restriction (widen) (line-number-at-pos))))
(col (and file (save-restriction (widen) (current-column))))
(buf (magit-setup-buffer #'magit-status-mode nil
(magit-buffer-diff-args (nth 0 d))
(magit-buffer-diff-files (nth 1 d))
(magit-buffer-log-args (nth 0 l))
(magit-buffer-log-files (nth 1 l)))))
(when file
(with-current-buffer buf
(let ((staged (magit-get-section '((staged) (status)))))
(if (and staged
(cadr (magit-diff--locate-hunk file line staged)))
(magit-diff--goto-position file line col staged)
(let ((unstaged (magit-get-section '((unstaged) (status)))))
(unless (and unstaged
(magit-diff--goto-position file line col unstaged))
(when staged
(magit-diff--goto-position file line col staged))))))))
buf))
(let ((default-directory (or directory default-directory)))
(when (file-remote-p default-directory)
(magit-git-version-assert))
(pcase-let
((`(,dargs ,dfiles) (magit-diff--get-value 'magit-status-mode 'status))
(`(,largs ,lfiles) (magit-log--get-value 'magit-status-mode 'status)))
(magit-setup-buffer #'magit-status-mode nil
:initial-section #'magit-status-goto-initial-section
:select-section (and$ (magit-status--get-file-position)
(lambda () (apply #'magit-status--goto-file-position $)))
(magit-buffer-diff-args dargs)
(magit-buffer-diff-files dfiles)
(magit-buffer-log-args largs)
(magit-buffer-log-files lfiles)))))
(defun magit-status-refresh-buffer ()
(magit-git-exit-code "update-index" "--refresh")
(magit-insert-section (status)
(magit-run-section-hook 'magit-status-sections-hook)))
(defun magit-status--get-file-position ()
(and-let* ((_ magit-status-goto-file-position)
(file (magit-file-relative-name)))
(save-excursion
(widen)
(list file (line-number-at-pos) (current-column)))))
(defun magit-status--goto-file-position (file line column)
(pcase-let ((`(,upos ,uloc)
(magit-diff--locate-file-position file line column 'unstaged))
(`(,spos ,sloc)
(magit-diff--locate-file-position file line column 'staged)))
(cond ((eq uloc 'line) (goto-char upos))
((eq sloc 'line) (goto-char spos))
((eq uloc 'hunk) (goto-char upos))
((eq sloc 'hunk) (goto-char spos))
(upos (goto-char upos))
(spos (goto-char spos)))
(when (or upos spos)
(magit-section-reveal (magit-current-section)))))
(defun magit-status-goto-initial-section ()
"Jump to the section specified by `magit-status-initial-section'."
(when-let ((section
@@ -547,7 +553,7 @@ the status buffer causes this section to disappear again."
(insert (propertize (format "%-10s" "GitError! ")
'font-lock-face 'magit-section-heading))
(insert (propertize magit-this-error 'font-lock-face 'error))
(when-let ((magit-show-process-buffer-hint)
(when-let ((_ magit-show-process-buffer-hint)
(key (car (where-is-internal 'magit-process-buffer))))
(insert (format " [Type `%s' for details]" (key-description key))))
(insert ?\n))
@@ -613,35 +619,34 @@ arguments are for internal use only."
(_ (setq rebase (magit-get-boolean "pull.rebase"))))
(insert (format "%-10s" (or keyword (if rebase "Rebase: " "Merge: "))))
(insert
(if upstream
(concat (and magit-status-show-hashes-in-headers
(concat (propertize (magit-rev-format "%h" upstream)
'font-lock-face 'magit-hash)
" "))
upstream " "
(magit-log--wash-summary
(or (magit-rev-format "%s" upstream)
"(no commit message)")))
(cond
((magit--unnamed-upstream-p remote merge)
(concat (propertize merge 'font-lock-face 'magit-branch-remote)
" from "
(propertize remote 'font-lock-face 'bold)))
((magit--valid-upstream-p remote merge)
(if (equal remote ".")
(concat
(propertize merge 'font-lock-face 'magit-branch-local) " "
(propertize "does not exist"
'font-lock-face 'magit-branch-warning))
(format
"%s %s %s"
(propertize merge 'font-lock-face 'magit-branch-remote)
(propertize "does not exist on"
'font-lock-face 'magit-branch-warning)
(propertize remote 'font-lock-face 'magit-branch-remote))))
(t
(propertize "invalid upstream configuration"
'font-lock-face 'magit-branch-warning)))))
(cond
(upstream
(concat (and magit-status-show-hashes-in-headers
(concat (propertize (magit-rev-format "%h" upstream)
'font-lock-face 'magit-hash)
" "))
upstream " "
(magit-log--wash-summary
(or (magit-rev-format "%s" upstream)
"(no commit message)"))))
((magit--unnamed-upstream-p remote merge)
(concat (propertize merge 'font-lock-face 'magit-branch-remote)
" from "
(propertize remote 'font-lock-face 'bold)))
((magit--valid-upstream-p remote merge)
(if (equal remote ".")
(concat
(propertize merge 'font-lock-face 'magit-branch-local) " "
(propertize "does not exist"
'font-lock-face 'magit-branch-warning))
(format
"%s %s %s"
(propertize merge 'font-lock-face 'magit-branch-remote)
(propertize "does not exist on"
'font-lock-face 'magit-branch-warning)
(propertize remote 'font-lock-face 'magit-branch-remote))))
((propertize "invalid upstream configuration"
'font-lock-face 'magit-branch-warning))))
(insert ?\n))))))
(defun magit-insert-push-branch-header ()
@@ -651,22 +656,24 @@ arguments are for internal use only."
(magit-insert-section (branch target)
(insert (format "%-10s" "Push: "))
(insert
(if (magit-rev-verify target)
(concat (and magit-status-show-hashes-in-headers
(concat (propertize (magit-rev-format "%h" target)
'font-lock-face 'magit-hash)
" "))
target " "
(magit-log--wash-summary (or (magit-rev-format "%s" target)
"(no commit message)")))
(let ((remote (magit-get-push-remote branch)))
(if (magit-remote-p remote)
(concat target " "
(propertize "does not exist"
'font-lock-face 'magit-branch-warning))
(concat remote " "
(propertize "remote does not exist"
'font-lock-face 'magit-branch-warning))))))
(cond-let
((magit-rev-verify target)
(concat (and magit-status-show-hashes-in-headers
(concat (propertize (magit-rev-format "%h" target)
'font-lock-face 'magit-hash)
" "))
target " "
(magit-log--wash-summary
(or (magit-rev-format "%s" target)
"(no commit message)"))))
[[remote (magit-get-push-remote branch)]]
((magit-remote-p remote)
(concat target " "
(propertize "does not exist"
'font-lock-face 'magit-branch-warning)))
((concat remote " "
(propertize "remote does not exist"
'font-lock-face 'magit-branch-warning)))))
(insert ?\n))))
(defun magit-insert-tags-header ()
@@ -811,4 +818,15 @@ Honor the buffer's file filter, which can be set using \"D - -\"."
;;; _
(provide 'magit-status)
;; Local Variables:
;; read-symbol-shorthands: (
;; ("and$" . "cond-let--and$")
;; ("and>" . "cond-let--and>")
;; ("and-let" . "cond-let--and-let")
;; ("if-let" . "cond-let--if-let")
;; ("when-let" . "cond-let--when-let")
;; ("while-let" . "cond-let--while-let")
;; ("match-string" . "match-string")
;; ("match-str" . "match-string-no-properties"))
;; End:
;;; magit-status.el ends here