update packages

This commit is contained in:
2025-02-26 20:16:44 +01:00
parent 59db017445
commit 45d49daef0
291 changed files with 16240 additions and 522600 deletions

View File

@@ -1,9 +1,9 @@
;;; magit-worktree.el --- Worktree support -*- lexical-binding:t -*-
;; Copyright (C) 2008-2023 The Magit Project Contributors
;; Copyright (C) 2008-2025 The Magit Project Contributors
;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
;; Author: Jonas Bernoulli <emacs.magit@jonas.bernoulli.dev>
;; Maintainer: Jonas Bernoulli <emacs.magit@jonas.bernoulli.dev>
;; SPDX-License-Identifier: GPL-3.0-or-later
@@ -61,20 +61,20 @@ Used by `magit-worktree-checkout' and `magit-worktree-branch'."
(list (funcall magit-worktree-read-directory-name-function
(format "Checkout %s in new worktree: " branch))
branch)))
(magit-run-git "worktree" "add" (magit--expand-worktree path) branch)
(magit-diff-visit-directory path))
(when (zerop (magit-run-git "worktree" "add"
(magit--expand-worktree path) branch))
(magit-diff-visit-directory path)))
;;;###autoload
(defun magit-worktree-branch (path branch start-point &optional force)
(defun magit-worktree-branch (path branch start-point)
"Create a new BRANCH and check it out in a new worktree at PATH."
(interactive
`(,(funcall magit-worktree-read-directory-name-function
"Create worktree: ")
,@(magit-branch-read-args "Create and checkout branch")
,current-prefix-arg))
(magit-run-git "worktree" "add" (if force "-B" "-b")
branch (magit--expand-worktree path) start-point)
(magit-diff-visit-directory path))
,@(magit-branch-read-args "Create and checkout branch")))
(when (zerop (magit-run-git "worktree" "add" "-b" branch
(magit--expand-worktree path) start-point))
(magit-diff-visit-directory path)))
;;;###autoload
(defun magit-worktree-move (worktree path)
@@ -113,7 +113,7 @@ The primary worktree cannot be deleted."
(user-error "Deleting %s would delete the shared .git directory" worktree)
(let ((primary (file-name-as-directory (caar (magit-list-worktrees)))))
(magit-confirm-files (if magit-delete-by-moving-to-trash 'trash 'delete)
(list "worktree"))
(list worktree))
(when (file-exists-p worktree)
(let ((delete-by-moving-to-trash magit-delete-by-moving-to-trash))
(delete-directory worktree t magit-delete-by-moving-to-trash)))
@@ -160,7 +160,7 @@ If there is only one worktree, then insert nothing."
(let ((worktrees (magit-list-worktrees)))
(when (length> worktrees 1)
(magit-insert-section (worktrees)
(magit-insert-heading "Worktrees:")
(magit-insert-heading t "Worktrees")
(let* ((cols
(mapcar
(lambda (config)
@@ -178,7 +178,7 @@ If there is only one worktree, then insert nothing."
(bare "(bare)"))
config)))
worktrees))
(align (1+ (apply #'max (--map (string-width (car it)) cols)))))
(align (1+ (apply #'max (mapcar (##string-width (car %)) cols)))))
(pcase-dolist (`(,head . ,config) cols)
(magit--insert-worktree
config