update packages

This commit is contained in:
2025-07-13 14:06:54 +02:00
parent 373aa8226e
commit fc97ce061b
28 changed files with 508 additions and 215 deletions

View File

@@ -1999,32 +1999,32 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of
(defun magit-list-remote-branches (&optional remote)
(magit-list-refs (concat "refs/remotes/" remote)))
(defun magit-list-related-branches (relation &optional commit &rest args)
(defun magit-list-related-branches (relation &optional rev &rest args)
(seq-remove (##string-match-p "\\(\\`(HEAD\\|HEAD -> \\)" %)
(mapcar (##substring % 2)
(magit-git-lines "branch" args relation commit))))
(magit-git-lines "branch" args relation rev))))
(defun magit-list-containing-branches (&optional commit &rest args)
(magit-list-related-branches "--contains" commit args))
(defun magit-list-containing-branches (&optional rev &rest args)
(magit-list-related-branches "--contains" rev args))
(defun magit-list-publishing-branches (&optional commit)
(seq-filter (##magit-rev-ancestor-p (or commit "HEAD") %)
(defun magit-list-publishing-branches (&optional rev)
(seq-filter (##magit-rev-ancestor-p (or rev "HEAD") %)
magit-published-branches))
(defun magit-list-merged-branches (&optional commit &rest args)
(magit-list-related-branches "--merged" commit args))
(defun magit-list-merged-branches (&optional rev &rest args)
(magit-list-related-branches "--merged" rev args))
(defun magit-list-unmerged-branches (&optional commit &rest args)
(magit-list-related-branches "--no-merged" commit args))
(defun magit-list-unmerged-branches (&optional rev &rest args)
(magit-list-related-branches "--no-merged" rev args))
(defun magit-list-unmerged-to-upstream-branches ()
(seq-filter (##and-let* ((upstream (magit-get-upstream-branch %)))
(member % (magit-list-unmerged-branches upstream)))
(magit-list-local-branch-names)))
(defun magit-list-branches-pointing-at (commit)
(defun magit-list-branches-pointing-at (rev)
(let ((re (format "\\`%s refs/\\(heads\\|remotes\\)/\\(.*\\)\\'"
(magit-rev-verify commit))))
(magit-rev-verify rev))))
(seq-keep (##and (string-match re %)
(let ((name (match-string 2 %)))
(and (not (string-suffix-p "HEAD" name))
@@ -2285,16 +2285,16 @@ If `first-parent' is set, traverse only first parents."
(defun magit-rev-abbrev (rev)
(magit-rev-parse (magit-abbrev-arg "short") rev))
(defun magit-commit-children (commit &optional args)
(defun magit-commit-children (rev &optional args)
(seq-keep (lambda (line)
(pcase-let ((`(,child . ,parents) (split-string line " ")))
(and (member commit parents) child)))
(and (member rev parents) child)))
(magit-git-lines "log" "--format=%H %P"
(or args (list "--branches" "--tags" "--remotes"))
"--not" commit)))
"--not" rev)))
(defun magit-commit-parents (commit)
(and-let* ((str (magit-git-string "rev-list" "-1" "--parents" commit)))
(defun magit-commit-parents (rev)
(and-let* ((str (magit-git-string "rev-list" "-1" "--parents" rev)))
(cdr (split-string str))))
(defun magit-patch-id (rev)
@@ -2444,14 +2444,14 @@ and this option only controls what face is used.")
(defun magit-object-type (object)
(magit-git-string "cat-file" "-t" object))
(defmacro magit-with-blob (commit file &rest body)
(defmacro magit-with-blob (rev file &rest body)
(declare (indent 2)
(debug (form form body)))
`(magit--with-temp-process-buffer
(let ((buffer-file-name ,file))
(save-excursion
(magit-git-insert "cat-file" "-p"
(concat ,commit ":" buffer-file-name)))
(concat ,rev ":" buffer-file-name)))
(decode-coding-inserted-region
(point-min) (point-max) buffer-file-name t nil nil t)
,@body)))