update of packages

This commit is contained in:
2023-11-04 19:26:41 +01:00
parent e162a12b58
commit 3b54a3236d
726 changed files with 297673 additions and 34585 deletions

View File

@@ -1,6 +1,6 @@
;;; magit-refs.el --- Listing references -*- 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>
@@ -64,9 +64,9 @@ To change the value in an existing buffer use the command
:package-version '(magit . "2.1.0")
:group 'magit-refs
:safe (lambda (val) (memq val '(all branch nil)))
:type '(choice (const all :tag "For branches and tags")
(const branch :tag "For branches only")
(const nil :tag "Never")))
:type '(choice (const :tag "For branches and tags" all)
(const :tag "For branches only" branch)
(const :tag "Never" nil)))
(put 'magit-refs-show-commit-count 'safe-local-variable 'symbolp)
(put 'magit-refs-show-commit-count 'permanent-local t)
@@ -271,13 +271,11 @@ the outcome.
;;; Mode
(defvar magit-refs-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
(define-key map (kbd "C-y") #'magit-refs-set-show-commit-count)
(define-key map (kbd "L") #'magit-margin-settings)
map)
"Keymap for `magit-refs-mode'.")
(defvar-keymap magit-refs-mode-map
:doc "Keymap for `magit-refs-mode'."
:parent magit-mode-map
"C-y" #'magit-refs-set-show-commit-count
"L" #'magit-margin-settings)
(define-derived-mode magit-refs-mode magit-mode "Magit Refs"
"Mode which lists and compares references.
@@ -356,11 +354,12 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
((eq major-mode 'magit-refs-mode)
(setq args magit-buffer-arguments))
((and (memq use-buffer-args '(always selected))
(when-let* ((buffer (magit-get-mode-buffer ;debbugs#31840
(and-let* ((buffer (magit-get-mode-buffer
'magit-refs-mode nil
(eq use-buffer-args 'selected))))
(setq args (buffer-local-value 'magit-buffer-arguments buffer))
t)))
(progn ; work around debbugs#31840
(setq args (buffer-local-value 'magit-buffer-arguments buffer))
t))))
(t
(setq args (alist-get 'magit-show-refs transient-values))))
args))
@@ -473,27 +472,28 @@ Branch %s already exists.
;;; Sections
(defvar magit-remote-section-map
(let ((map (make-sparse-keymap)))
(magit-menu-set map [magit-delete-thing] #'magit-remote-remove "Remove %m")
(magit-menu-set map [magit-file-rename] #'magit-remote-rename "Rename %s")
map)
"Keymap for `remote' sections.")
(defvar-keymap magit-remote-section-map
:doc "Keymap for `remote' sections."
"<remap> <magit-file-rename>" #'magit-remote-rename
"<remap> <magit-delete-thing>" #'magit-remote-remove
"<2>" (magit-menu-item "Rename %s" #'magit-remote-rename)
"<1>" (magit-menu-item "Remove %m" #'magit-remote-remove))
(defvar magit-branch-section-map
(let ((map (make-sparse-keymap)))
(magit-menu-set map [magit-visit-thing] #'magit-visit-ref "Visit commit")
(magit-menu-set map [magit-delete-thing] #'magit-branch-delete "Delete %m")
(magit-menu-set map [magit-file-rename] #'magit-branch-rename "Rename %s")
map)
"Keymap for `branch' sections.")
(defvar-keymap magit-branch-section-map
:doc "Keymap for `branch' sections."
"<remap> <magit-file-rename>" #'magit-branch-rename
"<remap> <magit-delete-thing>" #'magit-branch-delete
"<remap> <magit-visit-thing>" #'magit-visit-ref
"<3>" (magit-menu-item "Rename %s" #'magit-branch-rename)
"<2>" (magit-menu-item "Delete %m" #'magit-branch-delete)
"<1>" (magit-menu-item "Visit commit" #'magit-visit-ref))
(defvar magit-tag-section-map
(let ((map (make-sparse-keymap)))
(magit-menu-set map [magit-visit-thing] #'magit-visit-ref "Visit %s")
(magit-menu-set map [magit-delete-thing] #'magit-tag-delete "Delete %m")
map)
"Keymap for `tag' sections.")
(defvar-keymap magit-tag-section-map
:doc "Keymap for `tag' sections."
"<remap> <magit-delete-thing>" #'magit-tag-delete
"<remap> <magit-visit-thing>" #'magit-visit-ref
"<2>" (magit-menu-item "Delete %m" #'magit-tag-delete)
"<1>" (magit-menu-item "Visit %s" #'magit-visit-ref))
(defun magit--painted-branch-as-menu-section (section)
(and-let* ((branch (and (magit-section-match 'commit)
@@ -571,9 +571,16 @@ line is inserted at all."
(concat "refs/remotes/" remote)
magit-buffer-arguments))
(pcase-let ((`(,head-branch ,branch ,ref ,msg)
(-replace "" nil (split-string line "\0"))))
(cl-substitute nil ""
(split-string line "\0")
:test #'equal)))
(if head-branch
(progn (cl-assert (equal branch (concat remote "/HEAD")))
;; Note: Use `ref' instead of `branch' for the check
;; below because 'refname:short' shortens the remote
;; HEAD to '<remote>' instead of '<remote>/HEAD' as of
;; Git v2.40.0.
(progn (cl-assert
(equal ref (concat "refs/remotes/" remote "/HEAD")))
(setq head head-branch))
(when (magit-refs--insert-refname-p branch)
(magit-insert-section (branch branch t)
@@ -616,17 +623,17 @@ line is inserted at all."
(magit-make-margin-overlay nil t)))
(defun magit-refs--format-local-branches ()
(let ((lines (-keep #'magit-refs--format-local-branch
(magit-git-lines
"for-each-ref"
(concat "--format=\
(let ((lines (seq-keep #'magit-refs--format-local-branch
(magit-git-lines
"for-each-ref"
(concat "--format=\
%(HEAD)%00%(refname:short)%00%(refname)%00\
%(upstream:short)%00%(upstream)%00%(upstream:track)%00"
(if magit-refs-show-push-remote "\
(if magit-refs-show-push-remote "\
%(push:remotename)%00%(push)%00%(push:track)%00%(subject)"
"%00%00%00%(subject)"))
"refs/heads"
magit-buffer-arguments))))
"refs/heads"
magit-buffer-arguments))))
(unless (magit-get-current-branch)
(push (magit-refs--format-local-branch
(concat "*\0\0\0\0\0\0\0\0" (magit-rev-format "%s")))
@@ -653,7 +660,7 @@ line is inserted at all."
(defun magit-refs--format-local-branch (line)
(pcase-let ((`(,head ,branch ,ref ,upstream ,u:ref ,u:track
,push ,p:ref ,p:track ,msg)
(-replace "" nil (split-string line "\0"))))
(cl-substitute nil "" (split-string line "\0") :test #'equal)))
(when (or (not branch)
(magit-refs--insert-refname-p branch))
(let* ((headp (equal head "*"))
@@ -743,12 +750,12 @@ line is inserted at all."
branch (if head-face (list face head-face) face))))
(defun magit-refs--insert-refname-p (refname)
(--if-let (-first (pcase-lambda (`(,key . ,_))
(if (functionp key)
(funcall key refname)
(string-match-p key refname)))
magit-refs-filter-alist)
(cdr it)
(if-let ((entry (seq-find (pcase-lambda (`(,key . ,_))
(if (functionp key)
(funcall key refname)
(string-match-p key refname)))
magit-refs-filter-alist)))
(cdr entry)
t))
(defun magit-refs--insert-cherry-commits (ref)