From 119b0f68e8db8ffdf2f9024f72c9d36302184173 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:08:13 +0100 Subject: [PATCH] update magit Signed-off-by: Andreas Gerler --- bba.org | 3 + .../AUTHORS.md | 0 .../LICENSE | 0 .../dir | 0 .../git-commit.el | 3 +- .../git-rebase.el | 0 .../magit-apply.el | 0 .../magit-autoloads.el | 38 +- .../magit-autorevert.el | 2 +- .../magit-base.el | 88 +--- .../magit-bisect.el | 11 +- .../magit-blame.el | 21 +- .../magit-bookmark.el | 0 .../magit-branch.el | 24 +- .../magit-bundle.el | 0 .../magit-clone.el | 11 +- .../magit-commit.el | 13 +- .../magit-core.el | 0 .../magit-diff.el | 269 ++++++------ .../magit-ediff.el | 0 .../magit-extras.el | 59 ++- .../magit-fetch.el | 5 - .../magit-files.el | 0 .../magit-git.el | 92 ++-- .../magit-gitignore.el | 0 .../magit-log.el | 119 +++--- .../magit-margin.el | 0 .../magit-merge.el | 0 .../magit-mode.el | 45 +- .../magit-notes.el | 0 .../magit-patch.el | 0 .../magit-pkg.el | 14 +- .../magit-process.el | 9 +- .../magit-pull.el | 0 .../magit-push.el | 2 +- .../magit-reflog.el | 0 .../magit-refs.el | 0 .../magit-remote.el | 11 +- .../magit-repos.el | 6 +- .../magit-reset.el | 0 .../magit-sequence.el | 3 +- .../magit-sparse-checkout.el | 12 - .../magit-stash.el | 87 ++-- .../magit-status.el | 16 +- .../magit-submodule.el | 15 +- .../magit-subtree.el | 6 +- .../magit-tag.el | 2 +- .../magit-transient.el | 0 .../magit-wip.el | 8 +- .../magit-worktree.el | 0 .../magit.el | 16 +- .../magit.info | 400 ++++++++++-------- elpa/magit-readme.txt | 8 - .../dir | 0 .../magit-section-autoloads.el | 0 .../magit-section-pkg.el | 8 +- .../magit-section.el | 157 ++++--- .../magit-section.info | 2 +- 58 files changed, 775 insertions(+), 810 deletions(-) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/AUTHORS.md (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/LICENSE (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/dir (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/git-commit.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/git-rebase.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-apply.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-autoloads.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-autorevert.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-base.el (93%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-bisect.el (97%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-blame.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-bookmark.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-branch.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-bundle.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-clone.el (97%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-commit.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-core.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-diff.el (96%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-ediff.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-extras.el (95%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-fetch.el (96%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-files.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-git.el (97%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-gitignore.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-log.el (96%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-margin.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-merge.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-mode.el (97%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-notes.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-patch.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-pkg.el (68%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-process.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-pull.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-push.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-reflog.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-refs.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-remote.el (97%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-repos.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-reset.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-sequence.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-sparse-checkout.el (91%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-stash.el (90%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-status.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-submodule.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-subtree.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-tag.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-transient.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-wip.el (98%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit-worktree.el (100%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit.el (99%) rename elpa/{magit-20241102.2124 => magit-20241221.1030}/magit.info (98%) delete mode 100644 elpa/magit-readme.txt rename elpa/{magit-section-20241102.1300 => magit-section-20241217.845}/dir (100%) rename elpa/{magit-section-20241102.1300 => magit-section-20241217.845}/magit-section-autoloads.el (100%) rename elpa/{magit-section-20241102.1300 => magit-section-20241217.845}/magit-section-pkg.el (71%) rename elpa/{magit-section-20241102.1300 => magit-section-20241217.845}/magit-section.el (98%) rename elpa/{magit-section-20241102.1300 => magit-section-20241217.845}/magit-section.info (99%) diff --git a/bba.org b/bba.org index 52dc36c6..b5283144 100644 --- a/bba.org +++ b/bba.org @@ -912,8 +912,11 @@ I still like ido-find-file. [2023-01-17 Tue 09:33] #+begin_src emacs-lisp + (add-to-list 'load-path "~/.emacs.d/elpa/forge-20241218.2036") (with-eval-after-load 'magit (require 'forge)) + + (setq magit-show-long-lines-warning nil) #+end_src * mwheel diff --git a/elpa/magit-20241102.2124/AUTHORS.md b/elpa/magit-20241221.1030/AUTHORS.md similarity index 100% rename from elpa/magit-20241102.2124/AUTHORS.md rename to elpa/magit-20241221.1030/AUTHORS.md diff --git a/elpa/magit-20241102.2124/LICENSE b/elpa/magit-20241221.1030/LICENSE similarity index 100% rename from elpa/magit-20241102.2124/LICENSE rename to elpa/magit-20241221.1030/LICENSE diff --git a/elpa/magit-20241102.2124/dir b/elpa/magit-20241221.1030/dir similarity index 100% rename from elpa/magit-20241102.2124/dir rename to elpa/magit-20241221.1030/dir diff --git a/elpa/magit-20241102.2124/git-commit.el b/elpa/magit-20241221.1030/git-commit.el similarity index 99% rename from elpa/magit-20241102.2124/git-commit.el rename to elpa/magit-20241221.1030/git-commit.el index 1a0eef7c..4007c12a 100644 --- a/elpa/magit-20241102.2124/git-commit.el +++ b/elpa/magit-20241221.1030/git-commit.el @@ -649,8 +649,7 @@ the input isn't tacked to the comment." (defun git-commit-setup-changelog-support () "Treat ChangeLog entries as unindented paragraphs." - (when (fboundp 'log-indent-fill-entry) ; New in Emacs 27. - (setq-local fill-paragraph-function #'log-indent-fill-entry)) + (setq-local fill-paragraph-function #'log-edit-fill-entry) (setq-local fill-indent-according-to-mode t) (setq-local paragraph-start (concat paragraph-start "\\|\\*\\|("))) diff --git a/elpa/magit-20241102.2124/git-rebase.el b/elpa/magit-20241221.1030/git-rebase.el similarity index 100% rename from elpa/magit-20241102.2124/git-rebase.el rename to elpa/magit-20241221.1030/git-rebase.el diff --git a/elpa/magit-20241102.2124/magit-apply.el b/elpa/magit-20241221.1030/magit-apply.el similarity index 100% rename from elpa/magit-20241102.2124/magit-apply.el rename to elpa/magit-20241221.1030/magit-apply.el diff --git a/elpa/magit-20241102.2124/magit-autoloads.el b/elpa/magit-20241221.1030/magit-autoloads.el similarity index 98% rename from elpa/magit-20241102.2124/magit-autoloads.el rename to elpa/magit-20241221.1030/magit-autoloads.el index 0ebd435d..aa18a73e 100644 --- a/elpa/magit-20241102.2124/magit-autoloads.el +++ b/elpa/magit-20241221.1030/magit-autoloads.el @@ -618,6 +618,24 @@ Spread modified modules across recent commits. (autoload 'magit-diff-dwim "magit-diff" "\ Show changes for the thing at point. +For example, if point is on a commit, show the changes introduced by +that commit. Likewise if point is on the section titled \"Unstaged +changes\", then show those changes in a separate buffer. Generally +speaking, compare the thing at point with the most logical, trivial +and (in *any* situation) at least potentially useful other thing it +could be compared to. + +When the region selects commits, then compare the two commits at +either end. There are different ways two commits can be compared. +In the buffer showing the diff, you can control how the comparison, +is done, using \"D r\" and \"D f\". + +This function does not always show the changes that you might want +to view in any given situation. You can think of the changes being +shown as the smallest common denominator. There is no AI involved. +If this command never does what you want, then ignore it, and instead +use the commands that allow you to explicitly specify what you need. + (fn &optional ARGS FILES)" t) (autoload 'magit-diff-range "magit-diff" "\ Show differences between two commits. @@ -792,11 +810,7 @@ Drop into `magit-status' from file switching. To make this command available use something like: (keymap-set ido-common-completion-map - \"C-x g\" \\='ido-enter-magit-status) - -This command does not work in Emacs 26.1. -See https://github.com/magit/magit/issues/3634 -and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707." t) + \"C-x g\" \\='ido-enter-magit-status)" t) (autoload 'magit-project-status "magit-extras" "\ Run `magit-status' in the current project's root." t) (autoload 'magit-dired-jump "magit-extras" "\ @@ -1801,11 +1815,16 @@ while two prefix arguments are equivalent to `--all'. (autoload 'magit-stash-apply "magit-stash" "\ Apply a stash to the working tree. +When using a Git release before v2.38.0, simply run \"git stash +apply\" or with a prefix argument \"git stash apply --index\". + +When using Git v2.38.0 or later, behave more intelligently: + First try \"git stash apply --index\", which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the -stash's index there as well. +stash's index there. If the above failed, then try \"git stash apply\". This fails (with or without \"--index\") if there are any uncommitted @@ -1821,11 +1840,16 @@ the user whether to use \"--3way\" or \"--reject\". (autoload 'magit-stash-pop "magit-stash" "\ Apply a stash to the working tree, on success remove it from stash list. +When using a Git release before v2.38.0, simply run \"git stash +pop\" or with a prefix argument \"git stash pop --index\". + +When using Git v2.38.0 or later, behave more intelligently: + First try \"git stash pop --index\", which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the -stash's index there as well. +stash's index there. If the above failed, then try \"git stash apply\". This fails (with or without \"--index\") if there are any uncommitted diff --git a/elpa/magit-20241102.2124/magit-autorevert.el b/elpa/magit-20241221.1030/magit-autorevert.el similarity index 99% rename from elpa/magit-20241102.2124/magit-autorevert.el rename to elpa/magit-20241221.1030/magit-autorevert.el index 5a38d9f6..36f16782 100644 --- a/elpa/magit-20241102.2124/magit-autorevert.el +++ b/elpa/magit-20241221.1030/magit-autorevert.el @@ -22,7 +22,7 @@ ;;; Code: -(require 'magit-git) +(require 'magit-process) (require 'autorevert) diff --git a/elpa/magit-20241102.2124/magit-base.el b/elpa/magit-20241221.1030/magit-base.el similarity index 93% rename from elpa/magit-20241102.2124/magit-base.el rename to elpa/magit-20241221.1030/magit-base.el index b84f372c..e286dda6 100644 --- a/elpa/magit-20241102.2124/magit-base.el +++ b/elpa/magit-20241221.1030/magit-base.el @@ -32,8 +32,8 @@ ;;; Code: -(defconst magit--minimal-git "2.2.0") -(defconst magit--minimal-emacs "26.1") +(defconst magit--minimal-git "2.25.0") +(defconst magit--minimal-emacs "27.1") (require 'cl-lib) (require 'compat) @@ -871,10 +871,10 @@ See info node `(magit)Debugging Tools' for more information." #'shell-quote-argument `(,(concat invocation-directory invocation-name) "-Q" "--eval" "(setq debug-on-error t)" - ,@(cl-mapcan + ,@(mapcan (lambda (dir) (list "-L" dir)) (delete-dups - (cl-mapcan + (mapcan (lambda (lib) (if-let ((path (locate-library lib))) (list (file-name-directory path)) @@ -911,11 +911,11 @@ as STRING." (i 0)) `(let ((,s ,string)) (let ,(save-match-data - (cl-mapcan (lambda (sym) - (cl-incf i) - (and (not (eq (aref (symbol-name sym) 0) ?_)) - (list (list sym (list 'match-string i s))))) - varlist)) + (mapcan (lambda (sym) + (cl-incf i) + (and (not (eq (aref (symbol-name sym) 0) ?_)) + (list (list sym (list 'match-string i s))))) + varlist)) ,@body)))) (defun magit-delete-line () @@ -1031,49 +1031,6 @@ This function should be named `version>=' and be part of Emacs." ;;; Kludges for Emacs Bugs -(when (< emacs-major-version 27) - ;; Work around https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559. - ;; Fixed by cb55ccae8be946f1562d74718086a4c8c8308ee5 in Emacs 27.1. - (with-eval-after-load 'vc-git - (defun vc-git-conflicted-files (directory) - "Return the list of files with conflicts in DIRECTORY." - (let* ((status - (vc-git--run-command-string directory "diff-files" - "--name-status")) - (lines (when status (split-string status "\n" 'omit-nulls))) - files) - (dolist (line lines files) - (when (string-match "\\([ MADRCU?!]\\)[ \t]+\\(.+\\)" line) - (let ((state (match-string 1 line)) - (file (match-string 2 line))) - (when (equal state "U") - (push (expand-file-name file directory) files))))))))) - -(when (< emacs-major-version 27) - (defun vc-git--call@bug21559 (fn buffer command &rest args) - "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." - (let ((process-environment process-environment)) - (when revert-buffer-in-progress-p - (push "GIT_OPTIONAL_LOCKS=0" process-environment)) - (apply fn buffer command args))) - (advice-add 'vc-git--call :around 'vc-git--call@bug21559) - - (defun vc-git-command@bug21559 - (fn buffer okstatus file-or-list &rest flags) - "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." - (let ((process-environment process-environment)) - (when revert-buffer-in-progress-p - (push "GIT_OPTIONAL_LOCKS=0" process-environment)) - (apply fn buffer okstatus file-or-list flags))) - (advice-add 'vc-git-command :around 'vc-git-command@bug21559) - - (defun auto-revert-handler@bug21559 (fn) - "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." - (let ((revert-buffer-in-progress-p t)) - (funcall fn))) - (advice-add 'auto-revert-handler :around 'auto-revert-handler@bug21559) - ) - (defun magit-which-function () "Return current function name based on point. @@ -1193,33 +1150,6 @@ See ." (setq filename (expand-file-name (file-name-nondirectory filename) repo))) (file-chase-links filename)) -;;; Kludges for older Emacs versions - -(if (fboundp 'with-connection-local-variables) - (defalias 'magit--with-connection-local-variables - #'with-connection-local-variables) - (defmacro magit--with-connection-local-variables (&rest body) - "Abridged `with-connection-local-variables' for pre Emacs 27 compatibility. -Bind shell file name and switch for remote execution. -`with-connection-local-variables' isn't available until Emacs 27. -This kludge provides the minimal functionality required by -Magit." - `(if (file-remote-p default-directory) - (pcase-let ((`(,shell-file-name ,shell-command-switch) - (with-no-warnings ; about unknown tramp functions - (require 'tramp) - (let ((vec (tramp-dissect-file-name - default-directory))) - (list (tramp-get-method-parameter - vec 'tramp-remote-shell) - (string-join (tramp-get-method-parameter - vec 'tramp-remote-shell-args) - " ")))))) - ,@body) - ,@body))) - -(put 'magit--with-connection-local-variables 'lisp-indent-function 'defun) - ;;; Miscellaneous (defun magit-message (format-string &rest args) diff --git a/elpa/magit-20241102.2124/magit-bisect.el b/elpa/magit-20241221.1030/magit-bisect.el similarity index 97% rename from elpa/magit-20241102.2124/magit-bisect.el rename to elpa/magit-20241221.1030/magit-bisect.el index 55dec389..59c250b1 100644 --- a/elpa/magit-20241102.2124/magit-bisect.el +++ b/elpa/magit-20241221.1030/magit-bisect.el @@ -63,10 +63,8 @@ ("-n" "Don't checkout commits" "--no-checkout") ("-p" "Follow only first parent of a merge" "--first-parent" :if (lambda () (magit-git-version>= "2.29"))) - (6 magit-bisect:--term-old - :if (lambda () (magit-git-version>= "2.7"))) - (6 magit-bisect:--term-new - :if (lambda () (magit-git-version>= "2.7")))] + (magit-bisect:--term-old :level 6) + (magit-bisect:--term-new :level 6)] ["Actions" ("B" "Start" magit-bisect-start) ("s" "Start script" magit-bisect-run)]] @@ -74,8 +72,7 @@ :if magit-bisect-in-progress-p ("B" "Bad" magit-bisect-bad) ("g" "Good" magit-bisect-good) - (6 "m" "Mark" magit-bisect-mark - :if (lambda () (magit-git-version>= "2.7"))) + ("m" "Mark" magit-bisect-mark :level 6) ("k" "Skip" magit-bisect-skip) ("r" "Reset" magit-bisect-reset) ("s" "Run script" magit-bisect-run)]) @@ -208,7 +205,7 @@ bisect run'." (list :file (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir))) "bisect" "start" bad good args) (magit-refresh))) - (magit--with-connection-local-variables + (with-connection-local-variables (magit-git-bisect "run" (list shell-file-name shell-command-switch cmdline)))) diff --git a/elpa/magit-20241102.2124/magit-blame.el b/elpa/magit-20241221.1030/magit-blame.el similarity index 98% rename from elpa/magit-20241102.2124/magit-blame.el rename to elpa/magit-20241221.1030/magit-blame.el index f34bf20a..3c48ca64 100644 --- a/elpa/magit-20241102.2124/magit-blame.el +++ b/elpa/magit-20241221.1030/magit-blame.el @@ -170,12 +170,12 @@ and then turned on again when turning off the latter." ;;; Faces (defface magit-blame-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "grey80" :foreground "black") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "grey25" :foreground "white")) "Face used for highlighting when blaming. @@ -199,7 +199,7 @@ Also see option `magit-blame-styles'." :group 'magit-faces) (defface magit-blame-heading - `((t ,@(and (>= emacs-major-version 27) '(:extend t)) + '((t :extend t :inherit magit-blame-highlight :weight normal :slant normal)) @@ -718,13 +718,12 @@ modes is toggled, then this mode also gets toggled automatically. str))) (defun magit-blame--format-separator () - (propertize - (concat (propertize "\s" 'display '(space :height (2))) - (propertize "\n" 'line-height t)) - 'font-lock-face `(:background - ,(face-attribute 'magit-blame-heading - :background nil t) - ,@(and (>= emacs-major-version 27) '(:extend t))))) + (propertize (concat (propertize "\s" 'display '(space :height (2))) + (propertize "\n" 'line-height t)) + 'font-lock-face + `( :extend t + :background + ,(face-attribute 'magit-blame-heading :background nil t)))) (defun magit-blame--format-time-string (time tz) (let* ((time-format (or (magit-blame--style-get 'time-format) diff --git a/elpa/magit-20241102.2124/magit-bookmark.el b/elpa/magit-20241221.1030/magit-bookmark.el similarity index 100% rename from elpa/magit-20241102.2124/magit-bookmark.el rename to elpa/magit-20241221.1030/magit-bookmark.el diff --git a/elpa/magit-20241102.2124/magit-branch.el b/elpa/magit-20241221.1030/magit-branch.el similarity index 98% rename from elpa/magit-20241102.2124/magit-branch.el rename to elpa/magit-20241221.1030/magit-branch.el index ad1ebea8..41e011dc 100644 --- a/elpa/magit-20241102.2124/magit-branch.el +++ b/elpa/magit-20241221.1030/magit-branch.el @@ -208,14 +208,11 @@ has to be used to view and change branch related variables." (transient-define-prefix magit-branch (branch) "Add, configure or remove a branch." :man-page "git-branch" - [:if (lambda () - (and magit-branch-direct-configure - (oref (transient-prefix-object) scope))) + [:if (lambda () (and magit-branch-direct-configure (transient-scope))) :description (lambda () (concat (propertize "Configure " 'face 'transient-heading) - (propertize (oref (transient-prefix-object) scope) - 'face 'magit-branch-local))) + (propertize (transient-scope) 'face 'magit-branch-local))) ("d" magit-branch..description) ("u" magit-branch..merge/remote) ("r" magit-branch..rebase) @@ -228,8 +225,7 @@ has to be used to view and change branch related variables." :inapt-if-not magit-get-some-remote)] ["Arguments" (7 "-r" "Recurse submodules when checking out an existing branch" - "--recurse-submodules" - :if (lambda () (magit-git-version>= "2.13")))] + "--recurse-submodules")] [["Checkout" ("b" "branch/revision" magit-checkout) ("l" "local branch" magit-branch-checkout) @@ -859,8 +855,7 @@ and also rename the respective reflog file." [:description (lambda () (concat (propertize "Configure " 'face 'transient-heading) - (propertize (oref (transient-prefix-object) scope) - 'face 'magit-branch-local))) + (propertize (transient-scope) 'face 'magit-branch-local))) ("d" magit-branch..description) ("u" magit-branch..merge/remote) ("r" magit-branch..rebase) @@ -903,7 +898,7 @@ and also rename the respective reflog file." :class 'magit--git-branch:upstream) (cl-defmethod transient-init-value ((obj magit--git-branch:upstream)) - (when-let* ((branch (oref (transient-prefix-object) scope)) + (when-let* ((branch (transient-scope)) (remote (magit-get "branch" branch "remote")) (merge (magit-get "branch" branch "merge"))) (oset obj value (list remote merge)))) @@ -911,20 +906,19 @@ and also rename the respective reflog file." (cl-defmethod transient-infix-read ((obj magit--git-branch:upstream)) (if (oref obj value) (oset obj value nil) - (magit-read-upstream-branch (oref (transient-prefix-object) scope) - "Upstream"))) + (magit-read-upstream-branch (transient-scope) "Upstream"))) (cl-defmethod transient-infix-set ((obj magit--git-branch:upstream) refname) - (magit-set-upstream-branch (oref (transient-prefix-object) scope) refname) + (magit-set-upstream-branch (transient-scope) refname) (oset obj value - (and-let* ((branch (oref (transient-prefix-object) scope)) + (and-let* ((branch (transient-scope)) (r (magit-get "branch" branch "remote")) (m (magit-get "branch" branch "merge"))) (list r m))) (magit-refresh)) (cl-defmethod transient-format ((obj magit--git-branch:upstream)) - (let ((branch (oref (transient-prefix-object) scope))) + (let ((branch (transient-scope))) (format-spec (oref obj format) `((?k . ,(transient-format-key obj)) diff --git a/elpa/magit-20241102.2124/magit-bundle.el b/elpa/magit-20241221.1030/magit-bundle.el similarity index 100% rename from elpa/magit-20241102.2124/magit-bundle.el rename to elpa/magit-20241221.1030/magit-bundle.el diff --git a/elpa/magit-20241102.2124/magit-clone.el b/elpa/magit-20241221.1030/magit-clone.el similarity index 97% rename from elpa/magit-20241102.2124/magit-clone.el rename to elpa/magit-20241221.1030/magit-clone.el index ed44b085..e754a6ee 100644 --- a/elpa/magit-20241102.2124/magit-clone.el +++ b/elpa/magit-20241221.1030/magit-clone.el @@ -135,9 +135,7 @@ directory where the repository has been cloned." ["Setup arguments" ("-o" "Set name of remote" ("-o" "--origin=")) ("-b" "Set HEAD branch" ("-b" "--branch=")) - (magit-clone:--filter - :if (lambda () (magit-git-version>= "2.17.0")) - :level 7) + (magit-clone:--filter :level 7) ("-g" "Separate git directory" "--separate-git-dir=" transient-read-directory :level 7) ("-t" "Use template directory" "--template=" @@ -150,9 +148,7 @@ directory where the repository has been cloned." ("s" "shallow" magit-clone-shallow) ("d" "shallow since date" magit-clone-shallow-since :level 7) ("e" "shallow excluding" magit-clone-shallow-exclude :level 7) - (">" "sparse checkout" magit-clone-sparse - :if (lambda () (magit-git-version>= "2.25.0")) - :level 6) + (">" "sparse checkout" magit-clone-sparse :level 6) ("b" "bare" magit-clone-bare) ("m" "mirror" magit-clone-mirror)] (interactive (list (or magit-clone-always-transient current-prefix-arg))) @@ -278,9 +274,6 @@ Then show the status buffer for the new repository." (unless magit-clone-set-remote-head (magit-remote-unset-head remote)))) (when (and sparse checkout) - (when (magit-git-version< "2.25.0") - (user-error - "`git sparse-checkout' not available until Git v2.25")) (let ((default-directory directory)) (magit-call-git "sparse-checkout" "init" "--cone") (magit-call-git "checkout" (magit-get-current-branch)))) diff --git a/elpa/magit-20241102.2124/magit-commit.el b/elpa/magit-20241221.1030/magit-commit.el similarity index 98% rename from elpa/magit-20241102.2124/magit-commit.el rename to elpa/magit-20241221.1030/magit-commit.el index b6fb250a..7323ae19 100644 --- a/elpa/magit-20241102.2124/magit-commit.el +++ b/elpa/magit-20241221.1030/magit-commit.el @@ -456,9 +456,10 @@ With a prefix argument use a transient command to select infix arguments. This command requires git-absorb executable, which is available from https://github.com/tummychow/git-absorb. See `magit-commit-autofixup' for an alternative implementation." + :value '("-v") ["Arguments" - ("-f" "Skip safety checks" ("-f" "--force")) - ("-v" "Display more output" ("-v" "--verbose"))] + ("-f" "Skip safety checks" ("-f" "--force")) + ("-v" "Increase verbosity" ("-v" "--verbose"))] ["Actions" ("x" "Absorb" magit-commit-absorb)] (interactive (if current-prefix-arg @@ -481,7 +482,7 @@ See `magit-commit-autofixup' for an alternative implementation." (when commit (setq commit (magit-rebase-interactive-assert commit t))) (if (and commit (eq phase 'run)) - (progn (magit-run-git-async "absorb" "-v" args "-b" commit) t) + (progn (magit-run-git-async "absorb" args "-b" commit) t) (magit-log-select (lambda (commit) (with-no-warnings ; about non-interactive use @@ -499,9 +500,11 @@ transient command to select infix arguments. This command requires the git-autofixup script, which is available from https://github.com/torbiak/git-autofixup. See `magit-commit-absorb' for an alternative implementation." + :value '("-vv") ["Arguments" (magit-autofixup:--context) - (magit-autofixup:--strict)] + (magit-autofixup:--strict) + ("-v" "Increase verbosity" "-vv")] ["Actions" ("x" "Absorb" magit-commit-autofixup)] (interactive (if current-prefix-arg @@ -519,7 +522,7 @@ See `magit-commit-absorb' for an alternative implementation." (when commit (setq commit (magit-rebase-interactive-assert commit t))) (if (and commit (eq phase 'run)) - (progn (magit-run-git-async "autofixup" "-vv" args commit) t) + (progn (magit-run-git-async "autofixup" args commit) t) (magit-log-select (lambda (commit) (with-no-warnings ; about non-interactive use diff --git a/elpa/magit-20241102.2124/magit-core.el b/elpa/magit-20241221.1030/magit-core.el similarity index 100% rename from elpa/magit-20241102.2124/magit-core.el rename to elpa/magit-20241221.1030/magit-core.el diff --git a/elpa/magit-20241102.2124/magit-diff.el b/elpa/magit-20241221.1030/magit-diff.el similarity index 96% rename from elpa/magit-20241102.2124/magit-diff.el rename to elpa/magit-20241221.1030/magit-diff.el index 1f561e9f..598b6171 100644 --- a/elpa/magit-20241102.2124/magit-diff.el +++ b/elpa/magit-20241221.1030/magit-diff.el @@ -541,60 +541,58 @@ If you prefer the old behaviors, then set this to t." ;;; Faces (defface magit-diff-file-heading - `((t ,@(and (>= emacs-major-version 27) '(:extend t)) - :weight bold)) + '((t :extend t :weight bold)) "Face for diff file headings." :group 'magit-faces) (defface magit-diff-file-heading-highlight - `((t ,@(and (>= emacs-major-version 27) '(:extend t)) - :inherit magit-section-highlight)) + '((t :extend t :inherit magit-section-highlight)) "Face for current diff file headings." :group 'magit-faces) (defface magit-diff-file-heading-selection - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :inherit magit-diff-file-heading-highlight :foreground "salmon4") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :inherit magit-diff-file-heading-highlight :foreground "LightSalmon3")) "Face for selected diff file headings." :group 'magit-faces) (defface magit-diff-hunk-heading - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "grey90" :foreground "grey20") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "grey25" :foreground "grey95")) "Face for diff hunk headings." :group 'magit-faces) (defface magit-diff-hunk-heading-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "grey80" :foreground "grey20") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "grey35" :foreground "grey95")) "Face for current diff hunk headings." :group 'magit-faces) (defface magit-diff-hunk-heading-selection - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :inherit magit-diff-hunk-heading-highlight :foreground "salmon4") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :inherit magit-diff-hunk-heading-highlight :foreground "LightSalmon3")) "Face for selected diff hunk headings." @@ -602,8 +600,7 @@ If you prefer the old behaviors, then set this to t." (defface magit-diff-hunk-region `((t :inherit bold - ,@(and (>= emacs-major-version 27) - (list :extend (ignore-errors (face-attribute 'region :extend)))))) + :extend ,(ignore-errors (face-attribute 'region :extend)))) "Face used by `magit-diff-highlight-hunk-region-using-face'. This face is overlaid over text that uses other hunk faces, @@ -625,12 +622,12 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-lines-heading - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :inherit magit-diff-hunk-heading-highlight :background "LightSalmon3") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :inherit magit-diff-hunk-heading-highlight :foreground "grey80" :background "salmon4")) @@ -638,8 +635,7 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-lines-boundary - `((t ,@(and (>= emacs-major-version 27) '(:extend t)) ; !important - :inherit magit-diff-lines-heading)) + '((t :extend t :inherit magit-diff-lines-heading)) "Face for boundary of marked lines in diff hunk." :group 'magit-faces) @@ -649,24 +645,24 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-added - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#ddffdd" :foreground "#22aa22") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#335533" :foreground "#ddffdd")) "Face for lines in a diff that have been added." :group 'magit-faces) (defface magit-diff-removed - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#ffdddd" :foreground "#aa2222") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#553333" :foreground "#ffdddd")) "Face for lines in a diff that have been removed." @@ -678,12 +674,12 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-base - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#ffffcc" :foreground "#aaaa11") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#555522" :foreground "#ffffcc")) "Face for lines in a diff for the base side in a conflict." @@ -695,34 +691,34 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-context - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :foreground "grey50") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :foreground "grey70")) "Face for lines in a diff that are unchanged." :group 'magit-faces) (defface magit-diff-added-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#cceecc" :foreground "#22aa22") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#336633" :foreground "#cceecc")) "Face for lines in a diff that have been added." :group 'magit-faces) (defface magit-diff-removed-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#eecccc" :foreground "#aa2222") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#663333" :foreground "#eecccc")) "Face for lines in a diff that have been removed." @@ -734,12 +730,12 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-base-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "#eeeebb" :foreground "#aaaa11") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "#666622" :foreground "#eeeebb")) "Face for lines in a diff for the base side in a conflict." @@ -751,12 +747,12 @@ and `:slant'." :group 'magit-faces) (defface magit-diff-context-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "grey95" :foreground "grey50") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "grey20" :foreground "grey70")) "Face for lines in the current context in a diff." @@ -796,7 +792,7 @@ and `:slant'." (pcase-let ((`(,args ,files) (magit-diff--get-value 'magit-diff-mode magit-prefix-use-buffer-arguments))) - (when-let ((not (eq transient-current-command 'magit-dispatch)) + (when-let (((not (eq transient-current-command 'magit-dispatch))) (file (magit-file-relative-name))) (setq files (list file))) (oset obj value (if files `(("--" ,@files) ,args) args)))) @@ -864,31 +860,37 @@ and `:slant'." ;;; Commands ;;;; Prefix Commands +(eval-and-compile + (defvar magit-diff-infix-arguments + [:class transient-subgroups + ["Limit arguments" + (magit:--) + (magit-diff:--ignore-submodules) + ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change")) + ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space")) + ("-D" "Omit preimage for deletes" ("-D" "--irreversible-delete") + :level 5)] + ["Context arguments" + (magit-diff:-U) + ("-W" "Show surrounding functions" ("-W" "--function-context"))] + ["Tune arguments" + (magit-diff:--diff-algorithm) + (magit-diff:--diff-merges) + (magit-diff:-M) + (magit-diff:-C) + (magit-diff:-R :level 5) + (magit-diff:--color-moved :level 5) + (magit-diff:--color-moved-ws :level 5) + (magit-diff:--no-ext-diff) + (magit-diff:--stat) + (magit-diff:--show-signature)]])) + ;;;###autoload (autoload 'magit-diff "magit-diff" nil t) (transient-define-prefix magit-diff () "Show changes between different versions." :man-page "git-diff" :class 'magit-diff-prefix - ["Limit arguments" - (magit:--) - (magit-diff:--ignore-submodules) - ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change")) - ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space")) - (5 "-D" "Omit preimage for deletes" ("-D" "--irreversible-delete"))] - ["Context arguments" - (magit-diff:-U) - ("-W" "Show surrounding functions" ("-W" "--function-context"))] - ["Tune arguments" - (magit-diff:--diff-algorithm) - (magit-diff:--diff-merges) - (magit-diff:-M) - (magit-diff:-C) - (5 "-R" "Reverse sides" "-R") - (5 magit-diff:--color-moved) - (5 magit-diff:--color-moved-ws) - ("-x" "Disallow external diff drivers" "--no-ext-diff") - ("-s" "Show stats" "--stat") - ("=g" "Show signature" "--show-signature")] + [magit-diff-infix-arguments] ["Actions" [("d" "Dwim" magit-diff-dwim) ("r" "Diff range" magit-diff-range) @@ -904,29 +906,7 @@ and `:slant'." "Change the arguments used for the diff(s) in the current buffer." :man-page "git-diff" :class 'magit-diff-refresh-prefix - ["Limit arguments" - (magit:--) - (magit-diff:--ignore-submodules) - ("-b" "Ignore whitespace changes" ("-b" "--ignore-space-change")) - ("-w" "Ignore all whitespace" ("-w" "--ignore-all-space")) - (5 "-D" "Omit preimage for deletes" ("-D" "--irreversible-delete"))] - ["Context arguments" - (magit-diff:-U) - ("-W" "Show surrounding functions" ("-W" "--function-context"))] - ["Tune arguments" - (magit-diff:--diff-algorithm) - (magit-diff:--diff-merges) - (magit-diff:-M) - (magit-diff:-C) - (5 "-R" "Reverse sides" "-R" - :if-derived magit-diff-mode) - (5 magit-diff:--color-moved) - (5 magit-diff:--color-moved-ws) - ("-x" "Disallow external diff drivers" "--no-ext-diff") - ("-s" "Show stats" "--stat" - :if-derived magit-diff-mode) - ("=g" "Show signature" "--show-signature" - :if-derived magit-diff-mode)] + [magit-diff-infix-arguments] [["Refresh" ("g" "buffer" magit-diff-refresh) ("s" "buffer and set defaults" transient-set-and-exit) @@ -1064,11 +1044,59 @@ and `:slant'." (?a "[a]ll space" "ignore-all-space") (?n "[n]o" "no"))) +(transient-define-argument magit-diff:-R () + :description "Reverse sides" + :class 'transient-switch + :argument "-R" + :if 'magit-diff-argument-predicate) + +(transient-define-argument magit-diff:--no-ext-diff () + :description "Disallow external diff drivers" + :class 'transient-switch + :argument "--no-ext-diff" + :key "-x") + +(transient-define-argument magit-diff:--stat () + :description "Show stats" + :class 'transient-switch + :argument "--stat" + :key "-s" + :if 'magit-diff-argument-predicate) + +(transient-define-argument magit-diff:--show-signature () + :description "Show signature" + :class 'transient-switch + :argument "--show-signature" + :key "=g" + :if 'magit-diff-argument-predicate) + +(defun magit-diff-argument-predicate () + (or (eq transient--prefix 'magit-diff) + (derived-mode-p 'magit-diff-mode))) + ;;;; Setup Commands ;;;###autoload (defun magit-diff-dwim (&optional args files) - "Show changes for the thing at point." + "Show changes for the thing at point. + +For example, if point is on a commit, show the changes introduced by +that commit. Likewise if point is on the section titled \"Unstaged +changes\", then show those changes in a separate buffer. Generally +speaking, compare the thing at point with the most logical, trivial +and (in *any* situation) at least potentially useful other thing it +could be compared to. + +When the region selects commits, then compare the two commits at +either end. There are different ways two commits can be compared. +In the buffer showing the diff, you can control how the comparison, +is done, using \"D r\" and \"D f\". + +This function does not always show the changes that you might want +to view in any given situation. You can think of the changes being +shown as the smallest common denominator. There is no AI involved. +If this command never does what you want, then ignore it, and instead +use the commands that allow you to explicitly specify what you need." (interactive (magit-diff-arguments)) (let ((default-directory default-directory) (section (magit-current-section))) @@ -2143,11 +2171,9 @@ keymap is the parent of their keymaps." (flatten-tree args)) (magit-git-global-arguments (remove "--literal-pathspecs" magit-git-global-arguments))) - ;; As of Git 2.19.0, we need to generate diffs with - ;; --ita-visible-in-index so that `magit-stage' can work with - ;; intent-to-add files (see #4026). - (when (and (not (equal cmd "merge-tree")) - (magit-git-version>= "2.19.0")) + ;; We need to generate diffs with --ita-visible-in-index so that + ;; `magit-stage' can work with intent-to-add files (see #4026). + (unless (equal cmd "merge-tree") (push "--ita-visible-in-index" args)) (setq args (magit-diff--maybe-add-stat-arguments args)) (when (cl-member-if (lambda (arg) (string-prefix-p "--color-moved" arg)) args) @@ -2156,7 +2182,9 @@ keymap is the parent of their keymaps." (append magit-diff--reset-non-color-moved magit-git-global-arguments))) (magit--git-wash #'magit-diff-wash-diffs - (if (member "--no-index" args) 'wash-anyway keep-error) + (if (member "--no-index" args) + 'wash-anyway + (or keep-error magit--git-wash-keep-error)) cmd args))) (defun magit-diff--maybe-add-stat-arguments (args) @@ -3195,24 +3223,26 @@ are highlighted." (_ (magit-section-highlight section nil)))) (defun magit-diff-highlight-list (section &optional selection) - (let ((beg (oref section start)) - (cnt (oref section content)) - (end (oref section end))) - (when (or (eq this-command #'mouse-drag-region) - (not selection)) - (unless (and (region-active-p) - (<= (region-beginning) beg)) - (magit-section-make-overlay beg cnt 'magit-section-highlight)) - (if (oref section hidden) - (oset section washer #'ignore) - (dolist (child (oref section children)) - (when (or (eq this-command #'mouse-drag-region) - (not (and (region-active-p) - (<= (region-beginning) - (oref child start))))) - (magit-diff-highlight-recursive child selection))))) - (when magit-diff-highlight-hunk-body - (magit-section-make-overlay (1- end) end 'magit-section-highlight)))) + (if (oref section children) + (let ((beg (oref section start)) + (cnt (oref section content)) + (end (oref section end))) + (when (or (eq this-command #'mouse-drag-region) + (not selection)) + (unless (and (region-active-p) + (<= (region-beginning) beg)) + (magit-section-make-overlay beg cnt 'magit-section-highlight)) + (if (oref section hidden) + (oset section washer #'ignore) + (dolist (child (oref section children)) + (when (or (eq this-command #'mouse-drag-region) + (not (and (region-active-p) + (<= (region-beginning) + (oref child start))))) + (magit-diff-highlight-recursive child selection))))) + (when magit-diff-highlight-hunk-body + (magit-section-make-overlay (1- end) end 'magit-section-highlight))) + (magit-section-highlight section nil))) (defun magit-diff-highlight-file (section &optional selection) (magit-diff-highlight-heading section selection) @@ -3246,7 +3276,7 @@ are highlighted." (setq highlight nil)) (cond (highlight (unless (oref section hidden) - (add-to-list 'magit-section-highlighted-sections section) + (cl-pushnew section magit-section-highlighted-sections) (cond ((memq section magit-section-unhighlight-sections) (setq magit-section-unhighlight-sections (delq section magit-section-unhighlight-sections))) @@ -3255,7 +3285,7 @@ are highlighted." (t (cond ((and (oref section hidden) (memq section magit-section-unhighlight-sections)) - (add-to-list 'magit-section-highlighted-sections section) + (cl-pushnew section magit-section-highlighted-sections) (setq magit-section-unhighlight-sections (delq section magit-section-unhighlight-sections))) (t @@ -3436,8 +3466,7 @@ for added and removed lines as for context lines." 'magit-diff-context-highlight 'magit-diff-context))) (when magit-diff-unmarked-lines-keep-foreground - (setq face `(,@(and (>= emacs-major-version 27) '(:extend t)) - :background ,(face-attribute face :background)))) + (setq face `(:extend t :background ,(face-attribute face :background)))) (magit-diff--make-hunk-overlay (oref section content) (magit-diff-hunk-region-beginning) 'font-lock-face face diff --git a/elpa/magit-20241102.2124/magit-ediff.el b/elpa/magit-20241221.1030/magit-ediff.el similarity index 100% rename from elpa/magit-20241102.2124/magit-ediff.el rename to elpa/magit-20241221.1030/magit-ediff.el diff --git a/elpa/magit-20241102.2124/magit-extras.el b/elpa/magit-20241221.1030/magit-extras.el similarity index 95% rename from elpa/magit-20241102.2124/magit-extras.el rename to elpa/magit-20241221.1030/magit-extras.el index 5a931db0..b487289d 100644 --- a/elpa/magit-20241102.2124/magit-extras.el +++ b/elpa/magit-20241221.1030/magit-extras.el @@ -200,11 +200,7 @@ blame to center around the line point is on." To make this command available use something like: (keymap-set ido-common-completion-map - \"C-x g\" \\='ido-enter-magit-status) - -This command does not work in Emacs 26.1. -See https://github.com/magit/magit/issues/3634 -and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707." + \"C-x g\" \\='ido-enter-magit-status)" (interactive) (setq ido-exit 'fallback) (setq ido-fallback #'magit-status) @@ -277,10 +273,7 @@ for a repository." (interactive (list (or (magit-toplevel) (magit-read-repository t)) current-prefix-arg)) - ;; Note: The ERROR argument of `dired-get-marked-files' isn't - ;; available until Emacs 27. - (let ((files (or (dired-get-marked-files nil arg) - (user-error "No files specified")))) + (let ((files (dired-get-marked-files nil arg nil nil t))) (magit-status-setup-buffer repo) (magit-am-apply-patches files))) @@ -382,32 +375,28 @@ in HEAD as well as staged changes in the diff to check." (require 'diff-mode) ; `diff-add-log-current-defuns'. (require 'vc-git) ; `vc-git-diff'. (require 'add-log) ; `change-log-insert-entries'. - (cond - ((and (fboundp 'change-log-insert-entries) - (fboundp 'diff-add-log-current-defuns)) - (setq default-directory - (if (and (file-regular-p "gitdir") - (not (magit-git-true "rev-parse" "--is-inside-work-tree")) - (magit-git-true "rev-parse" "--is-inside-git-dir")) - (file-name-directory (magit-file-line "gitdir")) - (magit-toplevel))) - (let ((rev1 (if amending "HEAD^1" "HEAD")) - (rev2 nil)) - ;; Magit may have updated the files without notifying vc, but - ;; `diff-add-log-current-defuns' relies on vc being up-to-date. - (mapc #'vc-file-clearprops (magit-staged-files)) - (change-log-insert-entries - (with-temp-buffer - (vc-git-command (current-buffer) 1 nil - "diff-index" "--exit-code" "--patch" - (and (magit-anything-staged-p) "--cached") - rev1 "--") - ;; `diff-find-source-location' consults these vars. - (defvar diff-vc-revisions) - (setq-local diff-vc-revisions (list rev1 rev2)) - (setq-local diff-vc-backend 'Git) - (diff-add-log-current-defuns))))) - ((user-error "`magit-generate-changelog' requires Emacs 27 or greater")))) + (setq default-directory + (if (and (file-regular-p "gitdir") + (not (magit-git-true "rev-parse" "--is-inside-work-tree")) + (magit-git-true "rev-parse" "--is-inside-git-dir")) + (file-name-directory (magit-file-line "gitdir")) + (magit-toplevel))) + (let ((rev1 (if amending "HEAD^1" "HEAD")) + (rev2 nil)) + ;; Magit may have updated the files without notifying vc, but + ;; `diff-add-log-current-defuns' relies on vc being up-to-date. + (mapc #'vc-file-clearprops (magit-staged-files)) + (change-log-insert-entries + (with-temp-buffer + (vc-git-command (current-buffer) 1 nil + "diff-index" "--exit-code" "--patch" + (and (magit-anything-staged-p) "--cached") + rev1 "--") + ;; `diff-find-source-location' consults these vars. + (defvar diff-vc-revisions) + (setq-local diff-vc-revisions (list rev1 rev2)) + (setq-local diff-vc-backend 'Git) + (diff-add-log-current-defuns))))) ;;;###autoload (defun magit-add-change-log-entry (&optional whoami file-name other-window) diff --git a/elpa/magit-20241102.2124/magit-fetch.el b/elpa/magit-20241221.1030/magit-fetch.el similarity index 96% rename from elpa/magit-20241102.2124/magit-fetch.el rename to elpa/magit-20241221.1030/magit-fetch.el index 9ee04e95..1b64a6d9 100644 --- a/elpa/magit-20241102.2124/magit-fetch.el +++ b/elpa/magit-20241221.1030/magit-fetch.el @@ -178,11 +178,6 @@ with a prefix argument." (list nil (transient-args 'magit-fetch-modules)))) (if transient (transient-setup 'magit-fetch-modules) - (when-let (((magit-git-version< "2.8.0")) - (value (transient-arg-value "--jobs=" args))) - (message "Dropping --jobs; not supported by Git v%s" - (magit-git-version)) - (setq args (remove (format "--jobs=%s" value) args))) (magit-with-toplevel (magit-run-git-async "fetch" "--recurse-submodules" args)))) diff --git a/elpa/magit-20241102.2124/magit-files.el b/elpa/magit-20241221.1030/magit-files.el similarity index 100% rename from elpa/magit-20241102.2124/magit-files.el rename to elpa/magit-20241221.1030/magit-files.el diff --git a/elpa/magit-20241102.2124/magit-git.el b/elpa/magit-20241221.1030/magit-git.el similarity index 97% rename from elpa/magit-20241102.2124/magit-git.el rename to elpa/magit-20241221.1030/magit-git.el index 5ec9021e..b396f21a 100644 --- a/elpa/magit-20241102.2124/magit-git.el +++ b/elpa/magit-20241221.1030/magit-git.el @@ -485,9 +485,12 @@ insert the run command and stderr into the process buffer." (insert-file-contents log) (goto-char (point-max)) (setq errmsg - (if (functionp magit-git-debug) - (funcall magit-git-debug (buffer-string)) - (magit--locate-error-message)))) + (cond + ((eq return-error 'full) + (buffer-string)) + ((functionp magit-git-debug) + (funcall magit-git-debug (buffer-string))) + ((magit--locate-error-message))))) (when magit-git-debug (let ((magit-git-debug nil)) (with-current-buffer (magit-process-buffer t) @@ -543,7 +546,7 @@ message and add a section in the respective process buffer." (apply #'magit-git-insert args) (split-string (buffer-string) "\0" t))) -(defvar magit--git-wash-keep-error nil) ; experimental +(defvar magit--git-wash-keep-error t) (defun magit-git-wash (washer &rest args) "Execute Git with ARGS, inserting washed output at point. @@ -558,12 +561,11 @@ call function WASHER with ARGS as its sole argument." (declare (indent 2)) (setq args (flatten-tree args)) (let ((beg (point)) - (exit (magit--git-insert keep-error args))) + (exit (magit--git-insert (and keep-error 'full) args))) (when (stringp exit) (goto-char beg) (insert (propertize exit 'face 'error)) - (unless (bolp) - (insert "\n"))) + (insert (if (bolp) "\n" "\n\n"))) (if (= (point) beg) (magit-cancel-section) (unless (bolp) @@ -1258,10 +1260,15 @@ Sorted from longest to shortest CYGWIN name." "Return t if there are any staged changes. If optional FILES is non-nil, then only changes to those files are considered." + ;; The "--submodule=short" is needed to work around a bug in Git v2.46.0 + ;; and v2.46.1. See #5212 and #5221. There are actually two related + ;; bugs, both of which are fixed in v2.46.2, with the following commits, + ;; but there is no workaround for the second bug. + ;; 11591850dd diff: report dirty submodules as changes in builtin_diff() + ;; 87cf96094a diff: report copies and renames as changes in run_diff_cmd() (magit-git-failure "diff" "--quiet" "--cached" (if ignore-submodules "--ignore-submodules" - ;; Work around a bug in Git v2.46.0. See #5212 and #5221. "--submodule=short") "--" files)) @@ -1399,27 +1406,13 @@ ref that should have been excluded, then that is discarded and this function returns nil instead. This is unfortunate because there might be other refs that do match. To fix that, update Git." - (if (magit-git-version< "2.13") - (and-let* - ((ref (magit-git-string "name-rev" "--name-only" "--no-undefined" - (and pattern (concat "--refs=" pattern)) - rev))) - (if (and pattern - (string-match-p "\\`refs/[^/]+/\\*\\'" pattern)) - (let ((namespace (substring pattern 0 -1))) - (and (not (or (string-suffix-p "HEAD" ref) - (and (string-match-p namespace ref) - (not (magit-rev-verify - (concat namespace ref)))))) - ref)) - ref)) - (magit-git-string "name-rev" "--name-only" "--no-undefined" - (and pattern (concat "--refs=" pattern)) - (and pattern - (not not-anchored) - (list "--exclude=*/HEAD" - (concat "--exclude=*/" pattern))) - rev))) + (magit-git-string "name-rev" "--name-only" "--no-undefined" + (and pattern (concat "--refs=" pattern)) + (and pattern + (not not-anchored) + (list "--exclude=*/HEAD" + (concat "--exclude=*/" pattern))) + rev)) (defun magit-rev-branch (rev) (and-let* ((name (magit-rev-name rev "refs/heads/*"))) @@ -1463,8 +1456,6 @@ Git." (defun magit-name-tag (rev &optional lax) (and-let* ((name (magit-rev-name rev "refs/tags/*"))) - ;; The progn is necessary to work around debbugs#31840. This, and all - ;; the other instances, can be removed once we require at least Emacs 27. (progn (when (string-suffix-p "^0" name) (setq name (substring name 0 -2))) @@ -2004,10 +1995,8 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of (defun magit-list-special-refnames () (let ((gitdir (magit-gitdir))) - (cl-mapcan (lambda (name) - (and (file-exists-p (expand-file-name name gitdir)) - (list name))) - magit-special-refnames))) + (seq-keep (lambda (name) (file-exists-p (expand-file-name name gitdir))) + magit-special-refnames))) (defun magit-list-branch-names () (magit-list-refnames (list "refs/heads" "refs/remotes"))) @@ -2117,13 +2106,9 @@ would claim a worktree is bare, even though the working tree is specified using `core.worktree'." (let ((remote (file-remote-p default-directory)) worktrees worktree) - (dolist (line (let ((magit-git-global-arguments - ;; KLUDGE At least in Git v2.8.3 this argument - ;; would trigger a segfault. - (remove "--no-pager" magit-git-global-arguments))) - (if (magit-git-version>= "2.36") - (magit-git-items "worktree" "list" "--porcelain" "-z") - (magit-git-lines "worktree" "list" "--porcelain")))) + (dolist (line (if (magit-git-version>= "2.36") + (magit-git-items "worktree" "list" "--porcelain" "-z") + (magit-git-lines "worktree" "list" "--porcelain"))) (cond ((string-prefix-p "worktree" line) (let ((path (substring line 9))) (when remote @@ -2270,7 +2255,7 @@ If `first-parent' is set, traverse only first parents." (cdr (split-string str)))) (defun magit-patch-id (rev) - (magit--with-connection-local-variables + (with-connection-local-variables (magit--with-temp-process-buffer (magit-process-file shell-file-name nil '(t nil) nil shell-command-switch @@ -2470,27 +2455,12 @@ and this option only controls what face is used.") (defun magit-update-files (files) (magit-git-success "update-index" "--add" "--remove" "--" files)) -(defun magit-update-ref (ref message rev &optional stashish) +(defun magit-update-ref (ref message rev) (let ((magit--refresh-cache nil)) - (or (if (magit-git-version>= "2.6.0") - (zerop (magit-call-git "update-ref" "--create-reflog" + (unless (zerop (magit-call-git "update-ref" "--create-reflog" "-m" message ref rev (or (magit-rev-verify ref) ""))) - ;; `--create-reflog' didn't exist before v2.6.0 - (let ((oldrev (magit-rev-verify ref)) - (logfile (expand-file-name (concat "logs/" ref) - (magit-gitdir)))) - (unless (file-exists-p logfile) - (when oldrev - (magit-git-success "update-ref" "-d" ref oldrev)) - (make-directory (file-name-directory logfile) t) - (with-temp-file logfile) - (when (and oldrev (not stashish)) - (magit-git-success "update-ref" "-m" "enable reflog" - ref oldrev "")))) - (magit-git-success "update-ref" "-m" message ref rev - (or (magit-rev-verify ref) ""))) - (error "Cannot update %s with %s" ref rev)))) + (error "Cannot update %s with %s" ref rev)))) (defconst magit-range-re (concat "\\`\\([^ \t]*[^.]\\)?" ; revA diff --git a/elpa/magit-20241102.2124/magit-gitignore.el b/elpa/magit-20241221.1030/magit-gitignore.el similarity index 100% rename from elpa/magit-20241102.2124/magit-gitignore.el rename to elpa/magit-20241221.1030/magit-gitignore.el diff --git a/elpa/magit-20241102.2124/magit-log.el b/elpa/magit-20241221.1030/magit-log.el similarity index 96% rename from elpa/magit-20241102.2124/magit-log.el rename to elpa/magit-20241221.1030/magit-log.el index 3b39a6eb..5f4bae56 100644 --- a/elpa/magit-20241102.2124/magit-log.el +++ b/elpa/magit-20241221.1030/magit-log.el @@ -353,7 +353,7 @@ commits before and half after." (pcase-let ((`(,args ,files) (magit-log--get-value 'magit-log-mode magit-prefix-use-buffer-arguments))) - (when-let ((not (eq transient-current-command 'magit-dispatch)) + (when-let (((not (eq transient-current-command 'magit-dispatch))) (file (magit-file-relative-name))) (setq files (list file))) (oset obj value (if files `(("--" ,@files) ,args) args)))) @@ -422,51 +422,57 @@ commits before and half after." ;;; Commands ;;;; Prefix Commands +(eval-and-compile + (defvar magit-log-infix-arguments + ;; The grouping in git-log(1) appears to be guided by implementation + ;; details, so our logical grouping only follows it to an extend. + ;; Arguments that are "misplaced" here: + ;; 1. From "Commit Formatting". + ;; 2. From "Common Diff Options". + ;; 3. From unnamed first group. + ;; 4. Implemented by Magit. + [:class transient-subgroups + ["Commit limiting" + (magit-log:-n) + (magit:--author) + (7 magit-log:--since) + (7 magit-log:--until) + (magit-log:--grep) + (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) + (7 "-I" "Invert search pattern" "--invert-grep") + (magit-log:-G) ;2 + (magit-log:-S) ;2 + (magit-log:-L) ;2 + (7 "=m" "Omit merges" "--no-merges") + (7 "=p" "First parent" "--first-parent")] + ["History simplification" + ( "-D" "Simplify by decoration" "--simplify-by-decoration") + (magit:--) + ( "-f" "Follow renames when showing single-file log" "--follow") ;3 + (6 "/s" "Only commits changing given paths" "--sparse") + (7 "/d" "Only selected commits plus meaningful history" "--dense") + (7 "/a" "Only commits existing directly on ancestry path" "--ancestry-path") + (6 "/f" "Do not prune history" "--full-history") + (7 "/m" "Prune some history" "--simplify-merges")] + ["Commit ordering" + (magit-log:--*-order) + ("-r" "Reverse order" "--reverse")] + ["Formatting" + ("-g" "Show graph" "--graph") ;1 + ("-c" "Show graph in color" "--color") ;2 + ("-d" "Show refnames" "--decorate") ;3 + ("=S" "Show signatures" "--show-signature") ;1 + ("-h" "Show header" "++header") ;4 + ("-p" "Show diffs" ("-p" "--patch")) ;2 + ("-s" "Show diffstats" "--stat")] ;2 + ])) + ;;;###autoload (autoload 'magit-log "magit-log" nil t) (transient-define-prefix magit-log () "Show a commit or reference log." :man-page "git-log" :class 'magit-log-prefix - ;; The grouping in git-log(1) appears to be guided by implementation - ;; details, so our logical grouping only follows it to an extend. - ;; Arguments that are "misplaced" here: - ;; 1. From "Commit Formatting". - ;; 2. From "Common Diff Options". - ;; 3. From unnamed first group. - ;; 4. Implemented by Magit. - ["Commit limiting" - (magit-log:-n) - (magit:--author) - (7 magit-log:--since) - (7 magit-log:--until) - (magit-log:--grep) - (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) - (7 "-I" "Invert search pattern" "--invert-grep") - (magit-log:-G) ;2 - (magit-log:-S) ;2 - (magit-log:-L) ;2 - (7 "=m" "Omit merges" "--no-merges") - (7 "=p" "First parent" "--first-parent")] - ["History simplification" - ( "-D" "Simplify by decoration" "--simplify-by-decoration") - (magit:--) - ( "-f" "Follow renames when showing single-file log" "--follow") ;3 - (6 "/s" "Only commits changing given paths" "--sparse") - (7 "/d" "Only selected commits plus meaningful history" "--dense") - (7 "/a" "Only commits existing directly on ancestry path" "--ancestry-path") - (6 "/f" "Do not prune history" "--full-history") - (7 "/m" "Prune some history" "--simplify-merges")] - ["Commit ordering" - (magit-log:--*-order) - ("-r" "Reverse order" "--reverse")] - ["Formatting" - ("-g" "Show graph" "--graph") ;1 - ("-c" "Show graph in color" "--color") ;2 - ("-d" "Show refnames" "--decorate") ;3 - ("=S" "Show signatures" "--show-signature") ;1 - ("-h" "Show header" "++header") ;4 - ("-p" "Show diffs" ("-p" "--patch")) ;2 - ("-s" "Show diffstats" "--stat")] ;2 + [magit-log-infix-arguments] [["Log" ("l" "current" magit-log-current) ("h" "HEAD" magit-log-head) @@ -498,36 +504,7 @@ commits before and half after." :man-page "git-log" :class 'magit-log-refresh-prefix [:if-mode magit-log-mode - :class transient-subgroups - ["Commit limiting" - (magit-log:-n) - (magit:--author) - (magit-log:--grep) - (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) - (7 "-I" "Invert search pattern" "--invert-grep") - (magit-log:-G) - (magit-log:-S) - (magit-log:-L)] - ["History simplification" - ( "-D" "Simplify by decoration" "--simplify-by-decoration") - (magit:--) - ( "-f" "Follow renames when showing single-file log" "--follow") ;3 - (6 "/s" "Only commits changing given paths" "--sparse") - (7 "/d" "Only selected commits plus meaningful history" "--dense") - (7 "/a" "Only commits existing directly on ancestry path" "--ancestry-path") - (6 "/f" "Do not prune history" "--full-history") - (7 "/m" "Prune some history" "--simplify-merges")] - ["Commit ordering" - (magit-log:--*-order) - ("-r" "Reverse order" "--reverse")] - ["Formatting" - ("-g" "Show graph" "--graph") - ("-c" "Show graph in color" "--color") - ("-d" "Show refnames" "--decorate") - ("=S" "Show signatures" "--show-signature") - ("-h" "Show header" "++header") - ("-p" "Show diffs" ("-p" "--patch")) - ("-s" "Show diffstats" "--stat")]] + magit-log-infix-arguments] [:if-not-mode magit-log-mode :description "Arguments" (magit-log:-n) diff --git a/elpa/magit-20241102.2124/magit-margin.el b/elpa/magit-20241221.1030/magit-margin.el similarity index 100% rename from elpa/magit-20241102.2124/magit-margin.el rename to elpa/magit-20241221.1030/magit-margin.el diff --git a/elpa/magit-20241102.2124/magit-merge.el b/elpa/magit-20241221.1030/magit-merge.el similarity index 100% rename from elpa/magit-20241102.2124/magit-merge.el rename to elpa/magit-20241221.1030/magit-merge.el diff --git a/elpa/magit-20241102.2124/magit-mode.el b/elpa/magit-20241221.1030/magit-mode.el similarity index 97% rename from elpa/magit-20241102.2124/magit-mode.el rename to elpa/magit-20241221.1030/magit-mode.el index 2d3370af..2a7b79fe 100644 --- a/elpa/magit-20241102.2124/magit-mode.el +++ b/elpa/magit-20241221.1030/magit-mode.el @@ -39,6 +39,13 @@ (require 'transient) (defvar bookmark-make-record-function) + +(eval-when-compile (require 'elp)) +(declare-function elp-reset-all "elp" ()) +(declare-function elp-instrument-package "elp" (prefix)) +(declare-function elp-results "elp" ()) +(declare-function elp-restore-all "elp" ()) + (defvar magit--wip-inhibit-autosave) (defvar magit-wip-after-save-local-mode) (declare-function magit-wip-get-ref "magit-wip" ()) @@ -878,7 +885,7 @@ If a frame, then only consider buffers on that frame." (setq magit-buffer-locked-p (and value t)) (magit-restore-section-visibility-cache mode)) (when magit-uniquify-buffer-names - (add-to-list 'uniquify-list-buffers-directory-modes mode) + (cl-pushnew mode uniquify-list-buffers-directory-modes) (with-current-buffer buffer (setq list-buffers-directory (abbreviate-file-name default-directory))) (let ((uniquify-buffer-name-style @@ -1051,7 +1058,7 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (when magit-refresh-verbose (message "Refreshing buffer `%s'..." (buffer-name))) (let* ((buffer (current-buffer)) - (windows (cl-mapcan + (windows (mapcan (lambda (window) (with-selected-window window (with-current-buffer buffer @@ -1093,13 +1100,31 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." "Profile refreshing the current Magit buffer." (interactive) (require (quote elp)) - (when (fboundp 'elp-reset-all) - (elp-reset-all) - (elp-instrument-package "magit-") - (elp-instrument-package "forge-") - (magit-refresh-buffer) - (elp-results) - (elp-reset-all))) + (elp-reset-all) + (message "Profiling Magit and Forge...") + (elp-instrument-package "magit-") + (elp-instrument-package "forge-") + (magit-refresh-buffer) + (message "Profiling Magit and Forge...done") + (elp-results) + (elp-reset-all)) + +(defun magit-toggle-profiling () + "Start profiling Magit, or if in progress, stop and display the results." + (interactive) + (require (quote elp)) + (cond ((catch 'in-progress + (mapatoms (lambda (symbol) + (and (get symbol elp-timer-info-property) + (throw 'in-progress t))))) + (message "Stop profiling and display results...") + (elp-results) + (elp-restore-all)) + (t + (message "Start profiling Magit and Forge...") + (elp-reset-all) + (elp-instrument-package "magit-") + (elp-instrument-package "forge-")))) ;;; Save File-Visiting Buffers @@ -1135,7 +1160,7 @@ should obviously not add this function to that hook." (when-let (((and (not magit--disable-save-buffers) (magit-inside-worktree-p t))) (buf (ignore-errors (magit-get-mode-buffer 'magit-status-mode)))) - (add-to-list 'magit-after-save-refresh-buffers buf) + (cl-pushnew buf magit-after-save-refresh-buffers) (add-hook 'post-command-hook #'magit-after-save-refresh-buffers))) (defun magit-maybe-save-repository-buffers () diff --git a/elpa/magit-20241102.2124/magit-notes.el b/elpa/magit-20241221.1030/magit-notes.el similarity index 100% rename from elpa/magit-20241102.2124/magit-notes.el rename to elpa/magit-20241221.1030/magit-notes.el diff --git a/elpa/magit-20241102.2124/magit-patch.el b/elpa/magit-20241221.1030/magit-patch.el similarity index 100% rename from elpa/magit-20241102.2124/magit-patch.el rename to elpa/magit-20241221.1030/magit-patch.el diff --git a/elpa/magit-20241102.2124/magit-pkg.el b/elpa/magit-20241221.1030/magit-pkg.el similarity index 68% rename from elpa/magit-20241102.2124/magit-pkg.el rename to elpa/magit-20241221.1030/magit-pkg.el index 96644fdb..f6008ca6 100644 --- a/elpa/magit-20241102.2124/magit-pkg.el +++ b/elpa/magit-20241221.1030/magit-pkg.el @@ -1,16 +1,16 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "magit" "20241102.2124" +(define-package "magit" "20241221.1030" "A Git porcelain inside Emacs." - '((emacs "26.1") + '((emacs "27.1") (compat "30.0.0.0") (dash "2.19.1") - (magit-section "4.1.2") + (magit-section "4.1.3") (seq "2.24") - (transient "0.7.8") - (with-editor "3.4.2")) + (transient "20241217") + (with-editor "3.4.3")) :url "https://github.com/magit/magit" - :commit "b2b07b993ec2d80f6f7b8b34df0cc77565d9fb18" - :revdesc "b2b07b993ec2" + :commit "f4c05e9cd44ac1c881e834290479616244bfdb66" + :revdesc "f4c05e9cd44a" :keywords '("git" "tools" "vc") :authors '(("Marius Vollmer" . "marius.vollmer@gmail.com") ("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")) diff --git a/elpa/magit-20241102.2124/magit-process.el b/elpa/magit-20241221.1030/magit-process.el similarity index 99% rename from elpa/magit-20241102.2124/magit-process.el rename to elpa/magit-20241221.1030/magit-process.el index 8cdab4e2..953086b9 100644 --- a/elpa/magit-20241102.2124/magit-process.el +++ b/elpa/magit-20241221.1030/magit-process.el @@ -169,10 +169,11 @@ itself from the hook, to avoid further futile attempts." '("^\\(Enter \\)?[Pp]assphrase\\( for \\(RSA \\)?key '.*'\\)?: ?$" ;; Match-group 99 is used to identify the "user@host" part. "^\\(Enter \\|([^) ]+) \\)?\ -[Pp]assword\\( for '?\\(https?://\\)?\\(?99:[^']*\\)'?\\)?: ?$" +[Pp]assword\\( for '?\\(https?://\\)?\\(?99:[^']+\\)'?\\)?: ?$" "Please enter the passphrase for the ssh key" "Please enter the passphrase to unlock the OpenPGP secret key" - "^.*'s password: ?$" + "^\\(?99:[^']+\\)\\('s\\)? password: ?$" + "^.+ password: ?$" "^Token: $" ; For git-credential-manager-core (#4318). "^Yubikey for .*: ?$" "^Enter PIN for .*: ?$") @@ -882,10 +883,6 @@ PARENT is used as the parent of the returned keymap." "Use `auth-source-search' to get a password. If found, return the password. Otherwise, return nil. -To use this function add it to the appropriate hook - (add-hook \\='magit-process-find-password-functions - \\='magit-process-password-auth-source) - KEY typically derives from a prompt such as: Password for \\='https://yourname@github.com\\=' in which case it would be the string diff --git a/elpa/magit-20241102.2124/magit-pull.el b/elpa/magit-20241221.1030/magit-pull.el similarity index 100% rename from elpa/magit-20241102.2124/magit-pull.el rename to elpa/magit-20241221.1030/magit-pull.el diff --git a/elpa/magit-20241102.2124/magit-push.el b/elpa/magit-20241221.1030/magit-push.el similarity index 99% rename from elpa/magit-20241102.2124/magit-push.el rename to elpa/magit-20241221.1030/magit-push.el index 8e89d736..558a0da8 100644 --- a/elpa/magit-20241102.2124/magit-push.el +++ b/elpa/magit-20241221.1030/magit-push.el @@ -305,7 +305,7 @@ what this command will do. To add it use something like: (let ((remotes (magit-list-remotes))) (cond ((and (magit-git-version>= "2.27") - (= (length remotes) 1)) + (length= remotes 1)) (car remotes)) ((member "origin" remotes) "origin")))))) (if (null remote) diff --git a/elpa/magit-20241102.2124/magit-reflog.el b/elpa/magit-20241221.1030/magit-reflog.el similarity index 100% rename from elpa/magit-20241102.2124/magit-reflog.el rename to elpa/magit-20241221.1030/magit-reflog.el diff --git a/elpa/magit-20241102.2124/magit-refs.el b/elpa/magit-20241221.1030/magit-refs.el similarity index 100% rename from elpa/magit-20241102.2124/magit-refs.el rename to elpa/magit-20241221.1030/magit-refs.el diff --git a/elpa/magit-20241102.2124/magit-remote.el b/elpa/magit-20241221.1030/magit-remote.el similarity index 97% rename from elpa/magit-20241102.2124/magit-remote.el rename to elpa/magit-20241221.1030/magit-remote.el index 2cf913cf..aa218ee8 100644 --- a/elpa/magit-20241102.2124/magit-remote.el +++ b/elpa/magit-20241221.1030/magit-remote.el @@ -68,9 +68,7 @@ has to be used to view and change remote related variables." :man-page "git-remote" :value '("-f") ["Variables" - :if (lambda () - (and magit-remote-direct-configure - (oref (transient-prefix-object) scope))) + :if (lambda () (and magit-remote-direct-configure (transient-scope))) ("u" magit-remote..url) ("U" magit-remote..fetch) ("s" magit-remote..pushurl) @@ -211,8 +209,8 @@ the now stale refspecs. Other stale branches are not removed." nil refs)) (magit-confirm 'prune-stale-refspecs nil (format "Prune %%d stale refspecs and %d branches" - (length (cl-mapcan (lambda (s) (copy-sequence (cdr s))) - stale))) + (length (mapcan (lambda (s) (copy-sequence (cdr s))) + stale))) nil (mapcar (pcase-lambda (`(,refspec . ,refs)) (concat refspec "\n" @@ -315,8 +313,7 @@ refspec." [:description (lambda () (concat (propertize "Configure " 'face 'transient-heading) - (propertize (oref (transient-prefix-object) scope) - 'face 'magit-branch-remote))) + (propertize (transient-scope) 'face 'magit-branch-remote))) ("u" magit-remote..url) ("U" magit-remote..fetch) ("s" magit-remote..pushurl) diff --git a/elpa/magit-20241102.2124/magit-repos.el b/elpa/magit-20241221.1030/magit-repos.el similarity index 99% rename from elpa/magit-20241102.2124/magit-repos.el rename to elpa/magit-20241221.1030/magit-repos.el index 95fbd653..335713aa 100644 --- a/elpa/magit-20241102.2124/magit-repos.el +++ b/elpa/magit-20241221.1030/magit-repos.el @@ -502,9 +502,9 @@ instead." (or (magit-toplevel) default-directory))))) (defun magit-list-repos () - (cl-mapcan (pcase-lambda (`(,dir . ,depth)) - (magit-list-repos-1 dir depth)) - magit-repository-directories)) + (mapcan (pcase-lambda (`(,dir . ,depth)) + (magit-list-repos-1 dir depth)) + magit-repository-directories)) (defun magit-list-repos-1 (directory depth) (cond ((file-readable-p (expand-file-name ".git" directory)) diff --git a/elpa/magit-20241102.2124/magit-reset.el b/elpa/magit-20241221.1030/magit-reset.el similarity index 100% rename from elpa/magit-20241102.2124/magit-reset.el rename to elpa/magit-20241221.1030/magit-reset.el diff --git a/elpa/magit-20241102.2124/magit-sequence.el b/elpa/magit-20241221.1030/magit-sequence.el similarity index 99% rename from elpa/magit-20241102.2124/magit-sequence.el rename to elpa/magit-20241221.1030/magit-sequence.el index b4e9f51f..1cfa7f98 100644 --- a/elpa/magit-20241102.2124/magit-sequence.el +++ b/elpa/magit-20241221.1030/magit-sequence.el @@ -530,8 +530,7 @@ This discards all changes made since the sequence started." ("-p" "Preserve merges" ("-p" "--preserve-merges") :if (lambda () (magit-git-version< "2.33.0"))) ("-r" "Rebase merges" ("-r" "--rebase-merges=") - magit-rebase-merges-select-mode - :if (lambda () (magit-git-version>= "2.18.0"))) + magit-rebase-merges-select-mode) ("-u" "Update branches" "--update-refs" :if (lambda () (magit-git-version>= "2.38.0"))) (7 magit-merge:--strategy) diff --git a/elpa/magit-20241102.2124/magit-sparse-checkout.el b/elpa/magit-20241221.1030/magit-sparse-checkout.el similarity index 91% rename from elpa/magit-20241102.2124/magit-sparse-checkout.el rename to elpa/magit-20241221.1030/magit-sparse-checkout.el index a57d2301..2805f3e3 100644 --- a/elpa/magit-20241102.2124/magit-sparse-checkout.el +++ b/elpa/magit-20241221.1030/magit-sparse-checkout.el @@ -43,13 +43,6 @@ "Return non-nil if working tree is a sparse checkout." (magit-get-boolean "core.sparsecheckout")) -(defun magit-sparse-checkout--assert-version () - ;; Older versions of Git have the ability to define sparse checkout - ;; patterns in .git/info/sparse-checkout, but the sparse-checkout - ;; command isn't available until 2.25.0. - (when (magit-git-version< "2.25.0") - (user-error "`git sparse-checkout' not available until Git v2.25"))) - (defun magit-sparse-checkout--auto-enable () (if (magit-sparse-checkout-enabled-p) (unless (magit-get-boolean "core.sparsecheckoutcone") @@ -89,7 +82,6 @@ See the `git sparse-checkout' manpage for details about (defun magit-sparse-checkout-enable (&optional args) "Convert the working tree to a sparse checkout." (interactive (list (transient-args 'magit-sparse-checkout))) - (magit-sparse-checkout--assert-version) (magit-run-git-async "sparse-checkout" "init" "--cone" args)) ;;;###autoload @@ -104,7 +96,6 @@ directories, call `magit-sparse-checkout-add' instead." ;; dealing with very large trees, listing all subdirectories ;; may need to be reconsidered. (magit-revision-directories "HEAD")))) - (magit-sparse-checkout--assert-version) (magit-sparse-checkout--auto-enable) (magit-run-git-async "sparse-checkout" "set" directories)) @@ -124,7 +115,6 @@ directories, call `magit-sparse-checkout-set' instead." (regexp-opt (magit-sparse-checkout-directories))))) (lambda (d) (string-match-p re d))) (magit-revision-directories "HEAD"))))) - (magit-sparse-checkout--assert-version) (magit-sparse-checkout--auto-enable) (magit-run-git-async "sparse-checkout" "add" directories)) @@ -135,7 +125,6 @@ Some operations such as merging or rebasing may need to check out files that aren't included in the sparse checkout. Call this command to reset to the sparse checkout state." (interactive) - (magit-sparse-checkout--assert-version) (magit-run-git-async "sparse-checkout" "reapply")) ;;;###autoload @@ -145,7 +134,6 @@ Note that disabling the sparse checkout does not clear the configured directories. Call `magit-sparse-checkout-enable' to restore the previous sparse checkout." (interactive) - (magit-sparse-checkout--assert-version) (magit-run-git-async "sparse-checkout" "disable")) ;;; Miscellaneous diff --git a/elpa/magit-20241102.2124/magit-stash.el b/elpa/magit-20241221.1030/magit-stash.el similarity index 90% rename from elpa/magit-20241102.2124/magit-stash.el rename to elpa/magit-20241221.1030/magit-stash.el index e09bb789..269a2434 100644 --- a/elpa/magit-20241102.2124/magit-stash.el +++ b/elpa/magit-20241221.1030/magit-stash.el @@ -256,17 +256,24 @@ specifying a list of files to be stashed." (list t))) (if transient (transient-setup 'magit-stash-push) - (magit-run-git "stash" "push" args))) + (magit-run-git "stash" "push" + (seq-filter #'atom args) + (assoc "--" args)))) ;;;###autoload (defun magit-stash-apply (stash) "Apply a stash to the working tree. +When using a Git release before v2.38.0, simply run \"git stash +apply\" or with a prefix argument \"git stash apply --index\". + +When using Git v2.38.0 or later, behave more intelligently: + First try \"git stash apply --index\", which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the -stash's index there as well. +stash's index there. If the above failed, then try \"git stash apply\". This fails \(with or without \"--index\") if there are any uncommitted @@ -284,11 +291,16 @@ the user whether to use \"--3way\" or \"--reject\"." (defun magit-stash-pop (stash) "Apply a stash to the working tree, on success remove it from stash list. +When using a Git release before v2.38.0, simply run \"git stash +pop\" or with a prefix argument \"git stash pop --index\". + +When using Git v2.38.0 or later, behave more intelligently: + First try \"git stash pop --index\", which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the -stash's index there as well. +stash's index there. If the above failed, then try \"git stash apply\". This fails \(with or without \"--index\") if there are any uncommitted @@ -303,29 +315,50 @@ the user whether to use \"--3way\" or \"--reject\"." (magit-stash--apply "pop" stash)) (defun magit-stash--apply (action stash) - (or (= (magit-call-git "stash" action "--index" stash) 0) - ;; The stash's index could not be applied, so always keep the stash. - (= (magit-call-git "stash" "apply" stash) 0) - (let* ((range (format "%s^..%s" stash stash)) - (stashed (magit-git-items "diff" "-z" "--name-only" range "--")) - (conflicts (cl-sort (cl-union (magit-unstaged-files t stashed) - (magit-untracked-files t stashed) - :test #'equal) - #'string<)) - (arg (cond - ((not conflicts) "--3way") - ((magit-confirm-files - 'stash-apply-3way conflicts - "Apply stash using `--3way', which requires first staging" - "(else use `--reject')" - t) - (magit-stage-1 nil conflicts) - "--3way") - ("--reject")))) - (with-temp-buffer - (magit-git-insert "diff" range) - (magit-run-git-with-input "apply" arg "-")))) - (magit-refresh)) + (if (magit-git-version< "2.38.0") + (magit-run-git "stash" action stash (and current-prefix-arg "--index")) + (or (magit--run-git-stash action "--index" stash) + ;; The stash's index could not be applied, so always keep the stash. + (magit--run-git-stash "apply" stash) + (let* ((range (format "%s^..%s" stash stash)) + (stashed (magit-git-items "diff" "-z" "--name-only" range "--")) + (conflicts (cl-sort (cl-union (magit-unstaged-files t stashed) + (magit-untracked-files t stashed) + :test #'equal) + #'string<)) + (arg (cond + ((not conflicts) "--3way") + ((magit-confirm-files + 'stash-apply-3way conflicts + "Apply stash using `--3way', which requires first staging" + "(else use `--reject')" + t) + (magit-stage-1 nil conflicts) + "--3way") + ("--reject")))) + (with-temp-buffer + (magit-git-insert "diff" range) + (magit-run-git-with-input "apply" arg "-")))) + (magit-refresh))) + +(defun magit--run-git-stash (&rest args) + (magit--with-temp-process-buffer + (let ((exit (save-excursion + (with-environment-variables (("LC_ALL" "en_US.utf8")) + (magit-process-git t "stash" args)))) + (buffer (current-buffer)) + (failed (looking-at "\\`error: \ +Your local changes to the following files would be overwritten by merge"))) + (with-current-buffer (magit-process-buffer t) + (magit-process-finish-section + (magit-process-insert-section default-directory magit-git-executable + (magit-process-git-arguments args) + exit buffer) + exit)) + (pcase (list exit failed) + (`(0 ,_) t) ; no conflict + (`(1 nil) t) ; successfully installed conflict + (_ nil))))) ; could not install conflict, or genuine error ;;;###autoload (defun magit-stash-drop (stash) @@ -413,7 +446,7 @@ Then apply STASH, dropping it if it applies cleanly." (t "local")))))) (defun magit-stash-store (message ref commit) - (magit-update-ref ref message commit t)) + (magit-update-ref ref message commit)) (defun magit-stash-create (message index worktree untracked) (unless (magit-rev-parse "--verify" "HEAD") diff --git a/elpa/magit-20241102.2124/magit-status.el b/elpa/magit-20241221.1030/magit-status.el similarity index 98% rename from elpa/magit-20241102.2124/magit-status.el rename to elpa/magit-20241221.1030/magit-status.el index 6b7b475f..9881d70d 100644 --- a/elpa/magit-20241102.2124/magit-status.el +++ b/elpa/magit-20241221.1030/magit-status.el @@ -708,14 +708,14 @@ remote in alphabetic order." (defun magit-insert-untracked-files () "Maybe insert a list or tree of untracked files. -Do so depending on the value of `status.showUntrackedFiles'. -Note that even if the value is `all', Magit still initially -only shows directories. But the directory sections can then -be expanded using \"TAB\". - -If the first element of `magit-buffer-diff-files' is a -directory, then limit the list to files below that. The value -value of that variable can be set using \"D -- DIRECTORY RET g\"." +Do so depending on the value of `status.showUntrackedFiles'. Note +that even if the value is `all', Magit still initially only shows +directories. But the directory sections can then be expanded using +\"TAB\". + +If the first element of `magit-buffer-diff-files' is a directory, then +limit the list to files below that. The value of that variable can be +set using \"D -- DIRECTORY RET g\"." (let ((show (or (magit-get "status.showUntrackedFiles") "normal"))) (unless (equal show "no") (let* ((all (equal show "all")) diff --git a/elpa/magit-20241102.2124/magit-submodule.el b/elpa/magit-20241221.1030/magit-submodule.el similarity index 98% rename from elpa/magit-20241102.2124/magit-submodule.el rename to elpa/magit-20241221.1030/magit-submodule.el index 0a4e7088..ae22fd51 100644 --- a/elpa/magit-20241102.2124/magit-submodule.el +++ b/elpa/magit-20241221.1030/magit-submodule.el @@ -248,8 +248,7 @@ it is nil, then PATH also becomes the name." (magit-process-sentinel process event) (process-put process 'inhibit-refresh t) (magit-process-sentinel process event) - (when (magit-git-version>= "2.12.0") - (magit-call-git "submodule" "absorbgitdirs" path)) + (magit-call-git "submodule" "absorbgitdirs" path) (magit-refresh))))))) ;;;###autoload @@ -285,7 +284,7 @@ single module from the user." (magit-run-git-async "submodule" "init" "--" modules))) ;;;###autoload (autoload 'magit-submodule-populate "magit-submodule" nil t) -(transient-define-suffix magit-submodule-populate (modules) +(transient-define-suffix magit-submodule-populate (modules args) "Create MODULES working directories, checking out the recorded commits. With a prefix argument act on all suitable modules. Otherwise, @@ -295,11 +294,13 @@ single module from the user." ;; This is the command that actually "initializes" modules. ;; A module is initialized when it has a working directory, ;; a gitlink, and a .gitmodules entry. - :description "Populate git submodule update --init" + :class 'magit--git-submodule-suffix + :description "Populate git submodule update --init [--recursive]" (interactive - (list (magit-module-confirm "Populate" 'magit-module-no-worktree-p))) + (list (magit-module-confirm "Populate" 'magit-module-no-worktree-p) + (magit-submodule-arguments "--recursive"))) (magit-with-toplevel - (magit-run-git-async "submodule" "update" "--init" "--" modules))) + (magit-run-git-async "submodule" "update" "--init" args "--" modules))) ;;;###autoload (autoload 'magit-submodule-update "magit-submodule" nil t) (transient-define-suffix magit-submodule-update (modules args) @@ -383,8 +384,6 @@ to recover from making a mistake here, but don't count on it." (list (magit-read-module-path "Remove module"))) (magit-submodule-arguments "--force") current-prefix-arg)) - (when (magit-git-version< "2.12.0") - (error "This command requires Git v2.12.0")) (when magit-submodule-remove-trash-gitdirs (setq trash-gitdirs t)) (magit-with-toplevel diff --git a/elpa/magit-20241102.2124/magit-subtree.el b/elpa/magit-20241221.1030/magit-subtree.el similarity index 98% rename from elpa/magit-20241102.2124/magit-subtree.el rename to elpa/magit-20241221.1030/magit-subtree.el index e56c47c6..8f4ec3d0 100644 --- a/elpa/magit-20241102.2124/magit-subtree.el +++ b/elpa/magit-20241221.1030/magit-subtree.el @@ -30,7 +30,7 @@ (transient-define-prefix magit-subtree () "Import or export subtrees." :man-page "git-subtree" - ["Actions" + ["Subtree actions" ("i" "Import" magit-subtree-import) ("e" "Export" magit-subtree-export)]) @@ -42,7 +42,7 @@ (magit-subtree:--prefix) (magit-subtree:--message) ("-s" "Squash" "--squash")] - ["Actions" + ["Subtree import actions" [("a" "Add" magit-subtree-add) ("c" "Add commit" magit-subtree-add-commit)] [("m" "Merge" magit-subtree-merge) @@ -59,7 +59,7 @@ (magit-subtree:--onto) ("-i" "Ignore joins" "--ignore-joins") ("-j" "Rejoin" "--rejoin")] - ["Actions" + ["Subtree export actions" ("p" "Push" magit-subtree-push) ("s" "Split" magit-subtree-split)]) diff --git a/elpa/magit-20241102.2124/magit-tag.el b/elpa/magit-20241221.1030/magit-tag.el similarity index 99% rename from elpa/magit-20241102.2124/magit-tag.el rename to elpa/magit-20241221.1030/magit-tag.el index aa2647d7..1b4f282d 100644 --- a/elpa/magit-20241102.2124/magit-tag.el +++ b/elpa/magit-20241221.1030/magit-tag.el @@ -226,7 +226,7 @@ a tag qualifies as a release tag." (mapcar #'cdr (nreverse - (cl-sort (cl-mapcan + (cl-sort (mapcan (lambda (line) (and (string-match " +" line) (let ((tag (substring line 0 (match-beginning 0))) diff --git a/elpa/magit-20241102.2124/magit-transient.el b/elpa/magit-20241221.1030/magit-transient.el similarity index 100% rename from elpa/magit-20241102.2124/magit-transient.el rename to elpa/magit-20241221.1030/magit-transient.el diff --git a/elpa/magit-20241102.2124/magit-wip.el b/elpa/magit-20241221.1030/magit-wip.el similarity index 98% rename from elpa/magit-20241102.2124/magit-wip.el rename to elpa/magit-20241221.1030/magit-wip.el index 1621d62a..cee20dea 100644 --- a/elpa/magit-20241102.2124/magit-wip.el +++ b/elpa/magit-20241221.1030/magit-wip.el @@ -317,11 +317,9 @@ commit message." ;; Note: `update-index' is used instead of `add' ;; because `add' will fail if a file is already ;; deleted in the temporary index. - (magit-call-git - "update-index" "--add" "--remove" - (and (magit-git-version>= "2.25.0") - "--ignore-skip-worktree-entries") - "--" files) + (magit-call-git "update-index" "--add" "--remove" + "--ignore-skip-worktree-entries" + "--" files) (magit-with-toplevel (magit-call-git "add" "-u" "."))) (magit-git-string "write-tree")))) diff --git a/elpa/magit-20241102.2124/magit-worktree.el b/elpa/magit-20241221.1030/magit-worktree.el similarity index 100% rename from elpa/magit-20241102.2124/magit-worktree.el rename to elpa/magit-20241221.1030/magit-worktree.el diff --git a/elpa/magit-20241102.2124/magit.el b/elpa/magit-20241221.1030/magit.el similarity index 99% rename from elpa/magit-20241102.2124/magit.el rename to elpa/magit-20241221.1030/magit.el index 63bf4962..84b0d869 100644 --- a/elpa/magit-20241102.2124/magit.el +++ b/elpa/magit-20241221.1030/magit.el @@ -17,16 +17,16 @@ ;; Homepage: https://github.com/magit/magit ;; Keywords: git tools vc -;; Package-Version: 20241102.2124 -;; Package-Revision: b2b07b993ec2 +;; Package-Version: 20241221.1030 +;; Package-Revision: f4c05e9cd44a ;; Package-Requires: ( -;; (emacs "26.1") +;; (emacs "27.1") ;; (compat "30.0.0.0") ;; (dash "2.19.1") -;; (magit-section "4.1.2") +;; (magit-section "4.1.3") ;; (seq "2.24") -;; (transient "0.7.8") -;; (with-editor "3.4.2")) +;; (transient "20241217") +;; (with-editor "3.4.3")) ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -482,7 +482,7 @@ is run in the top-level directory of the current working tree." (defun magit--shell-command (command &optional directory) (let ((default-directory (or directory default-directory))) (with-environment-variables (("GIT_PAGER" "cat")) - (magit--with-connection-local-variables + (with-connection-local-variables (magit-with-editor (magit-start-process shell-file-name nil shell-command-switch command))))) @@ -515,7 +515,7 @@ is run in the top-level directory of the current working tree." (defun magit-read-gpg-secret-key (prompt &optional initial-input history predicate default) (require 'epa) - (let* ((keys (cl-mapcan + (let* ((keys (mapcan (lambda (cert) (and (or (not predicate) (funcall predicate cert)) diff --git a/elpa/magit-20241102.2124/magit.info b/elpa/magit-20241221.1030/magit.info similarity index 98% rename from elpa/magit-20241102.2124/magit.info rename to elpa/magit-20241221.1030/magit.info index 1594cce4..d96e94d3 100644 --- a/elpa/magit-20241102.2124/magit.info +++ b/elpa/magit-20241221.1030/magit.info @@ -32,7 +32,7 @@ to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains. -This manual is for Magit version 4.1.2. +This manual is for Magit version 4.1.3. Copyright (C) 2015-2024 Jonas Bernoulli @@ -2662,6 +2662,10 @@ default the following functions are also members of that hook: directories. But the directory sections can then be expanded using ‘TAB’. + If the first element of ‘magit-buffer-diff-files’ is a directory, + then limit the list to files below that. The value of that + variable can be set using ‘D -- DIRECTORY RET g’. + -- Function: magit-insert-unstaged-changes Insert section showing unstaged changes. @@ -3491,6 +3495,25 @@ Buffer Variables::). ‘d d’ (‘magit-diff-dwim’) Show changes for the thing at point. + For example, if point is on a commit, show the changes introduced + by that commit. Likewise if point is on the section titled + "Unstaged changes", then show those changes in a separate buffer. + Generally speaking, compare the thing at point with the most + logical, trivial and (in *any* situation) at least potentially + useful other thing it could be compared to. + + When the region selects commits, then compare the two commits at + either end. There are different ways two commits can be compared. + In the buffer showing the diff, you can control how the comparison, + is done, using "D r" and "D f". + + This function does not always show the changes that you might want + to view in any given situation. You can think of the changes being + shown as the smallest common denominator. There is no AI involved. + If this command never does what you want, then ignore it, and + instead use the commands that allow you to explicitly specify what + you need. + ‘d r’ (‘magit-diff-range’) Show differences between two commits. @@ -6735,11 +6758,16 @@ Also see *note (gitman)git-stash::. ‘z a’ (‘magit-stash-apply’) Apply a stash to the working tree. + When using a Git release before v2.38.0, simply run ‘git stash + apply’ or with a prefix argument ‘git stash apply --index’. + + When using Git v2.38.0 or later, behave more intelligently: + First try ‘git stash apply --index’, which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the stash’s index - there as well. + there. If the above failed, then try ‘git stash apply’. This fails (with or without ‘--index’) if there are any uncommitted changes to files @@ -6759,11 +6787,16 @@ Also see *note (gitman)git-stash::. stash can be applied without any conflicts, and while preserving the stash’s index) then remove the stash from stash list. + When using a Git release before v2.38.0, simply run ‘git stash pop’ + or with a prefix argument ‘git stash pop --index’. + + When using Git v2.38.0 or later, behave more intelligently: + First try ‘git stash pop --index’, which tries to preserve the index stored in the stash, if any. This may fail because applying the stash could result in conflicts and those have to be stored in the index, making it impossible to also store the stash’s index - there as well. + there. If the above failed, then try ‘git stash apply’. This fails (with or without ‘--index’) if there are any uncommitted changes to files @@ -9776,6 +9809,15 @@ issue. Please include all relevant output when reporting an issue. Also see *note Git Executable::. +‘M-x magit-profile-refresh-buffer’ + This command profiles refreshing the current Magit buffer and then + displays the results. + +‘M-x magit-toggle-profiling’ + This command starts profiling Magit and Forge, or if profiling is + already in progress, it instead stops that and displays the + results. + ‘M-x with-editor-debug’ This command displays a buffer containing information about the available and used ‘emacsclient’ executable(s), and can be useful @@ -10072,20 +10114,20 @@ Appendix C Keystroke Index (line 77) * d: Diffing. (line 22) * D: Refreshing Diffs. (line 16) -* d c: Diffing. (line 63) +* d c: Diffing. (line 82) * d d: Diffing. (line 27) * D f: Refreshing Diffs. (line 45) * D F: Refreshing Diffs. (line 49) * D g: Refreshing Diffs. (line 21) -* d p: Diffing. (line 56) -* d r: Diffing. (line 30) +* d p: Diffing. (line 75) +* d r: Diffing. (line 49) * D r: Refreshing Diffs. (line 41) -* d s: Diffing. (line 48) +* d s: Diffing. (line 67) * D s: Refreshing Diffs. (line 25) -* d t: Diffing. (line 67) +* d t: Diffing. (line 86) * D t: Refreshing Diffs. (line 38) -* d u: Diffing. (line 53) -* d w: Diffing. (line 43) +* d u: Diffing. (line 72) +* d w: Diffing. (line 62) * D w: Refreshing Diffs. (line 31) * DEL: Log Buffer. (line 50) * DEL <1>: Commands Available in Diffs. @@ -10138,7 +10180,7 @@ Appendix C Keystroke Index * k <1>: Applying. (line 40) * k <2>: Editing Rebase Sequences. (line 56) -* k <3>: Stashing. (line 118) +* k <3>: Stashing. (line 128) * l: Logging. (line 28) * L: Refreshing Logs. (line 12) * L <1>: Log Buffer. (line 7) @@ -10345,20 +10387,20 @@ Appendix C Keystroke Index * z: Stashing. (line 9) * Z: Worktree. (line 9) * z a: Stashing. (line 52) -* z b: Stashing. (line 105) -* z B: Stashing. (line 110) +* z b: Stashing. (line 115) +* z B: Stashing. (line 120) * Z b: Worktree. (line 13) * Z c: Worktree. (line 16) -* z f: Stashing. (line 115) +* z f: Stashing. (line 125) * Z g: Worktree. (line 26) * z i: Stashing. (line 20) * z I: Stashing. (line 42) -* z k: Stashing. (line 98) +* z k: Stashing. (line 108) * Z k: Worktree. (line 22) -* z l: Stashing. (line 121) +* z l: Stashing. (line 131) * Z m: Worktree. (line 19) -* z p: Stashing. (line 74) -* z v: Stashing. (line 102) +* z p: Stashing. (line 79) +* z v: Stashing. (line 112) * z w: Stashing. (line 24) * z W: Stashing. (line 46) * z x: Stashing. (line 30) @@ -10606,8 +10648,8 @@ Appendix D Function and Command Index * magit-diff-flip-revs: Refreshing Diffs. (line 45) * magit-diff-less-context: Refreshing Diffs. (line 62) * magit-diff-more-context: Refreshing Diffs. (line 65) -* magit-diff-paths: Diffing. (line 56) -* magit-diff-range: Diffing. (line 30) +* magit-diff-paths: Diffing. (line 75) +* magit-diff-range: Diffing. (line 49) * magit-diff-refresh: Refreshing Diffs. (line 16) * magit-diff-refresh <1>: Refreshing Diffs. (line 21) * magit-diff-save-default-arguments: Refreshing Diffs. (line 31) @@ -10617,14 +10659,14 @@ Appendix D Function and Command Index * magit-diff-show-or-scroll-down <1>: Blaming. (line 103) * magit-diff-show-or-scroll-up: Log Buffer. (line 41) * magit-diff-show-or-scroll-up <1>: Blaming. (line 94) -* magit-diff-staged: Diffing. (line 48) +* magit-diff-staged: Diffing. (line 67) * magit-diff-switch-range-type: Refreshing Diffs. (line 41) * magit-diff-toggle-file-filter: Refreshing Diffs. (line 49) * magit-diff-toggle-refine-hunk: Refreshing Diffs. (line 38) * magit-diff-trace-definition: Commands Available in Diffs. (line 15) * magit-diff-type: Matching Sections. (line 88) -* magit-diff-unstaged: Diffing. (line 53) +* magit-diff-unstaged: Diffing. (line 72) * magit-diff-visit-file: Visiting Files and Blobs from a Diff. (line 9) * magit-diff-visit-file-other-frame: Visiting Files and Blobs from a Diff. @@ -10640,7 +10682,7 @@ Appendix D Function and Command Index * magit-diff-while-committing: Refreshing Diffs. (line 75) * magit-diff-while-committing <1>: Editing Commit Messages. (line 54) -* magit-diff-working-tree: Diffing. (line 43) +* magit-diff-working-tree: Diffing. (line 62) * magit-disable-section-inserter: Per-Repository Configuration. (line 31) * magit-discard: Applying. (line 40) @@ -10758,7 +10800,7 @@ Appendix D Function and Command Index (line 46) * magit-init: Creating Repository. (line 7) * magit-insert-am-sequence: Status Sections. (line 25) -* magit-insert-assumed-unchanged-files: Status Sections. (line 98) +* magit-insert-assumed-unchanged-files: Status Sections. (line 102) * magit-insert-bisect-log: Status Sections. (line 39) * magit-insert-bisect-output: Status Sections. (line 33) * magit-insert-bisect-rest: Status Sections. (line 36) @@ -10769,7 +10811,7 @@ Appendix D Function and Command Index * magit-insert-head-branch-header: Status Header Sections. (line 38) * magit-insert-heading: Creating Sections. (line 41) -* magit-insert-ignored-files: Status Sections. (line 83) +* magit-insert-ignored-files: Status Sections. (line 87) * magit-insert-local-branches: References Sections. (line 16) * magit-insert-merge-log: Status Sections. (line 17) * magit-insert-modules: Status Module Sections. @@ -10787,7 +10829,7 @@ Appendix D Function and Command Index * magit-insert-push-branch-header: Status Header Sections. (line 45) * magit-insert-rebase-sequence: Status Sections. (line 21) -* magit-insert-recent-commits: Status Sections. (line 110) +* magit-insert-recent-commits: Status Sections. (line 114) * magit-insert-remote-branches: References Sections. (line 19) * magit-insert-remote-header: Status Header Sections. (line 58) @@ -10795,23 +10837,23 @@ Appendix D Function and Command Index (line 55) * magit-insert-section: Creating Sections. (line 6) * magit-insert-sequencer-sequence: Status Sections. (line 29) -* magit-insert-skip-worktree-files: Status Sections. (line 92) -* magit-insert-staged-changes: Status Sections. (line 53) -* magit-insert-stashes: Status Sections. (line 56) +* magit-insert-skip-worktree-files: Status Sections. (line 96) +* magit-insert-staged-changes: Status Sections. (line 57) +* magit-insert-stashes: Status Sections. (line 60) * magit-insert-status-headers: Status Header Sections. (line 12) * magit-insert-tags: References Sections. (line 22) * magit-insert-tags-header: Status Header Sections. (line 49) -* magit-insert-tracked-files: Status Sections. (line 80) -* magit-insert-unpulled-cherries: Status Sections. (line 119) -* magit-insert-unpulled-from-pushremote: Status Sections. (line 66) -* magit-insert-unpulled-from-upstream: Status Sections. (line 62) -* magit-insert-unpulled-or-recent-commits: Status Sections. (line 104) -* magit-insert-unpushed-cherries: Status Sections. (line 125) -* magit-insert-unpushed-to-pushremote: Status Sections. (line 74) -* magit-insert-unpushed-to-upstream: Status Sections. (line 70) -* magit-insert-unstaged-changes: Status Sections. (line 50) +* magit-insert-tracked-files: Status Sections. (line 84) +* magit-insert-unpulled-cherries: Status Sections. (line 123) +* magit-insert-unpulled-from-pushremote: Status Sections. (line 70) +* magit-insert-unpulled-from-upstream: Status Sections. (line 66) +* magit-insert-unpulled-or-recent-commits: Status Sections. (line 108) +* magit-insert-unpushed-cherries: Status Sections. (line 129) +* magit-insert-unpushed-to-pushremote: Status Sections. (line 78) +* magit-insert-unpushed-to-upstream: Status Sections. (line 74) +* magit-insert-unstaged-changes: Status Sections. (line 54) * magit-insert-untracked-files: Status Sections. (line 42) * magit-insert-upstream-branch-header: Status Header Sections. (line 41) @@ -10900,6 +10942,7 @@ Appendix D Function and Command Index * magit-process-git: Getting a Value from Git. (line 50) * magit-process-kill: Viewing Git Output. (line 24) +* magit-profile-refresh-buffer: Debugging Tools. (line 64) * magit-pull: Pulling. (line 10) * magit-pull-branch: Pulling. (line 28) * magit-pull-from-pushremote: Pulling. (line 14) @@ -11043,7 +11086,7 @@ Appendix D Function and Command Index (line 38) * magit-shell-command-topdir: Running Git Manually. (line 34) -* magit-show-commit: Diffing. (line 63) +* magit-show-commit: Diffing. (line 82) * magit-show-commit <1>: Blaming. (line 91) * magit-show-refs: References Buffer. (line 7) * magit-show-refs-current: References Buffer. (line 25) @@ -11079,17 +11122,17 @@ Appendix D Function and Command Index * magit-stash: Stashing. (line 9) * magit-stash-apply: Stashing. (line 52) * magit-stash-both: Stashing. (line 14) -* magit-stash-branch: Stashing. (line 105) -* magit-stash-branch-here: Stashing. (line 110) -* magit-stash-clear: Stashing. (line 118) -* magit-stash-drop: Stashing. (line 98) -* magit-stash-format-patch: Stashing. (line 115) +* magit-stash-branch: Stashing. (line 115) +* magit-stash-branch-here: Stashing. (line 120) +* magit-stash-clear: Stashing. (line 128) +* magit-stash-drop: Stashing. (line 108) +* magit-stash-format-patch: Stashing. (line 125) * magit-stash-index: Stashing. (line 20) * magit-stash-keep-index: Stashing. (line 30) -* magit-stash-list: Stashing. (line 121) -* magit-stash-pop: Stashing. (line 74) -* magit-stash-show: Diffing. (line 67) -* magit-stash-show <1>: Stashing. (line 102) +* magit-stash-list: Stashing. (line 131) +* magit-stash-pop: Stashing. (line 79) +* magit-stash-show: Diffing. (line 86) +* magit-stash-show <1>: Stashing. (line 112) * magit-stash-worktree: Stashing. (line 24) * magit-stashes-maybe-update-stash-buffer: Section Movement. (line 92) * magit-status: Status Buffer. (line 23) @@ -11133,6 +11176,7 @@ Appendix D Function and Command Index * magit-toggle-margin: Refreshing Logs. (line 34) * magit-toggle-margin <1>: Log Margin. (line 60) * magit-toggle-margin-details: Log Margin. (line 66) +* magit-toggle-profiling: Debugging Tools. (line 68) * magit-toggle-verbose-refresh: Debugging Tools. (line 52) * magit-unstage: Staging and Unstaging. (line 42) @@ -11168,7 +11212,7 @@ Appendix D Function and Command Index (line 22) * with-editor-cancel <1>: Editing Rebase Sequences. (line 11) -* with-editor-debug: Debugging Tools. (line 64) +* with-editor-debug: Debugging Tools. (line 73) * with-editor-finish: Editing Commit Messages. (line 18) * with-editor-finish <1>: Editing Rebase Sequences. @@ -11309,7 +11353,7 @@ Appendix E Variable Index (line 124) * magit-log-margin: Log Margin. (line 12) * magit-log-margin-show-committer-date: Log Margin. (line 44) -* magit-log-section-commit-count: Status Sections. (line 114) +* magit-log-section-commit-count: Status Sections. (line 118) * magit-log-select-margin: Select from Log. (line 28) * magit-log-show-color-graph-limit: Log Buffer. (line 78) * magit-log-show-refname-after-summary: Log Buffer. (line 74) @@ -11371,7 +11415,7 @@ Appendix E Variable Index * magit-section-visibility-indicator: Section Visibility. (line 122) * magit-shell-command-verbose-prompt: Running Git Manually. (line 43) -* magit-stashes-margin: Stashing. (line 123) +* magit-stashes-margin: Stashing. (line 133) * magit-status-headers-hook: Status Header Sections. (line 17) * magit-status-margin: Status Options. (line 6) @@ -11456,133 +11500,133 @@ Node: Global Git Arguments102927 Node: Inspecting103732 Node: Status Buffer104889 Node: Status Sections109900 -Node: Status Header Sections115427 -Node: Status Module Sections118046 -Node: Status Options120543 -Node: Repository List121906 -Node: Logging126684 -Node: Refreshing Logs129523 -Node: Log Buffer130944 -Node: Log Margin135767 -Node: Select from Log138920 -Node: Reflog141130 -Node: Cherries142767 -Node: Diffing144605 -Node: Refreshing Diffs147639 -Node: Commands Available in Diffs151328 -Node: Diff Options153841 -Node: Revision Buffer159304 -Node: Ediffing162624 -Node: References Buffer168674 -Node: References Sections179268 -Node: Bisecting180125 -Node: Visiting Files and Blobs182436 -Node: General-Purpose Visit Commands182964 -Node: Visiting Files and Blobs from a Diff183917 -Node: Blaming187361 -Node: Manipulating194349 -Node: Creating Repository194691 -Node: Cloning Repository195228 -Node: Staging and Unstaging201669 -Node: Staging from File-Visiting Buffers205642 -Node: Applying206748 -Node: Committing208821 -Node: Initiating a Commit209404 -Node: Editing Commit Messages214594 -Node: Using the Revision Stack217367 -Node: Commit Pseudo Headers220412 -Node: Commit Mode and Hooks221707 -Node: Commit Message Conventions224565 -Node: Branching226552 -Node: The Two Remotes226778 -Node: Branch Commands229431 -Node: Branch Git Variables242281 -Node: Auxiliary Branch Commands247651 -Node: Merging248767 -Node: Resolving Conflicts252923 -Node: Rebasing258297 -Node: Editing Rebase Sequences263086 -Node: Information About In-Progress Rebase267302 -Ref: Information About In-Progress Rebase-Footnote-1276415 -Node: Cherry Picking277011 -Node: Reverting281345 -Node: Resetting282764 -Node: Stashing284590 -Node: Transferring290971 -Node: Remotes291193 -Node: Remote Commands291345 -Node: Remote Git Variables295384 -Node: Fetching296655 -Node: Pulling299138 -Node: Pushing300164 -Node: Plain Patches304455 -Node: Maildir Patches305926 -Node: Miscellaneous307405 -Node: Tagging307751 -Node: Notes309644 -Node: Submodules311979 -Node: Listing Submodules312197 -Node: Submodule Transient314345 -Node: Subtree316790 -Node: Worktree318721 -Node: Sparse checkouts319797 -Node: Bundle322573 -Node: Common Commands322948 -Node: Wip Modes325576 -Node: Wip Graph330467 -Node: Legacy Wip Modes332780 -Node: Commands for Buffers Visiting Files335667 -Node: Minor Mode for Buffers Visiting Blobs343894 -Node: Customizing344692 -Node: Per-Repository Configuration346288 -Node: Essential Settings348542 -Node: Safety348888 -Node: Performance350649 -Ref: Log Performance353612 -Ref: Diff Performance354917 -Ref: Refs Buffer Performance356258 -Ref: Committing Performance356833 -Node: Microsoft Windows Performance357815 -Node: MacOS Performance359006 -Ref: MacOS Performance-Footnote-1360029 -Node: Global Bindings360111 -Node: Plumbing362339 -Node: Calling Git363168 -Node: Getting a Value from Git364693 -Node: Calling Git for Effect368421 -Node: Section Plumbing374315 -Node: Creating Sections374543 -Node: Section Selection378439 -Node: Matching Sections380235 -Node: Refreshing Buffers386156 -Node: Conventions389300 -Node: Theming Faces389492 -Node: FAQ397597 -Node: FAQ - How to ...?398035 -Node: How to pronounce Magit?398392 -Node: How to show git's output?399195 -Node: How to install the gitman info manual?399981 -Node: How to show diffs for gpg-encrypted files?400951 -Node: How does branching and pushing work?401547 -Node: Should I disable VC?401880 -Node: FAQ - Issues and Errors402483 -Node: Magit is slow403428 -Node: I changed several thousand files at once and now Magit is unusable403721 -Node: I am having problems committing404447 -Node: I am using MS Windows and cannot push with Magit404928 -Node: I am using macOS and SOMETHING works in shell but not in Magit405546 -Node: Expanding a file to show the diff causes it to disappear406380 -Node: Point is wrong in the COMMIT_EDITMSG buffer406968 -Node: The mode-line information isn't always up-to-date408016 -Node: A branch and tag sharing the same name breaks SOMETHING409079 -Node: My Git hooks work on the command-line but not inside Magit409966 -Node: git-commit-mode isn't used when committing from the command-line410812 -Node: Point ends up inside invisible text when jumping to a file-visiting buffer413083 -Node: I am no longer able to save popup defaults413932 -Node: Debugging Tools414913 -Node: Keystroke Index418087 -Node: Function and Command Index459701 -Node: Variable Index517902 +Node: Status Header Sections115627 +Node: Status Module Sections118246 +Node: Status Options120743 +Node: Repository List122106 +Node: Logging126884 +Node: Refreshing Logs129723 +Node: Log Buffer131144 +Node: Log Margin135967 +Node: Select from Log139120 +Node: Reflog141330 +Node: Cherries142967 +Node: Diffing144805 +Node: Refreshing Diffs148856 +Node: Commands Available in Diffs152545 +Node: Diff Options155058 +Node: Revision Buffer160521 +Node: Ediffing163841 +Node: References Buffer169891 +Node: References Sections180485 +Node: Bisecting181342 +Node: Visiting Files and Blobs183653 +Node: General-Purpose Visit Commands184181 +Node: Visiting Files and Blobs from a Diff185134 +Node: Blaming188578 +Node: Manipulating195566 +Node: Creating Repository195908 +Node: Cloning Repository196445 +Node: Staging and Unstaging202886 +Node: Staging from File-Visiting Buffers206859 +Node: Applying207965 +Node: Committing210038 +Node: Initiating a Commit210621 +Node: Editing Commit Messages215811 +Node: Using the Revision Stack218584 +Node: Commit Pseudo Headers221629 +Node: Commit Mode and Hooks222924 +Node: Commit Message Conventions225782 +Node: Branching227769 +Node: The Two Remotes227995 +Node: Branch Commands230648 +Node: Branch Git Variables243498 +Node: Auxiliary Branch Commands248868 +Node: Merging249984 +Node: Resolving Conflicts254140 +Node: Rebasing259514 +Node: Editing Rebase Sequences264303 +Node: Information About In-Progress Rebase268519 +Ref: Information About In-Progress Rebase-Footnote-1277632 +Node: Cherry Picking278228 +Node: Reverting282562 +Node: Resetting283981 +Node: Stashing285807 +Node: Transferring292584 +Node: Remotes292806 +Node: Remote Commands292958 +Node: Remote Git Variables296997 +Node: Fetching298268 +Node: Pulling300751 +Node: Pushing301777 +Node: Plain Patches306068 +Node: Maildir Patches307539 +Node: Miscellaneous309018 +Node: Tagging309364 +Node: Notes311257 +Node: Submodules313592 +Node: Listing Submodules313810 +Node: Submodule Transient315958 +Node: Subtree318403 +Node: Worktree320334 +Node: Sparse checkouts321410 +Node: Bundle324186 +Node: Common Commands324561 +Node: Wip Modes327189 +Node: Wip Graph332080 +Node: Legacy Wip Modes334393 +Node: Commands for Buffers Visiting Files337280 +Node: Minor Mode for Buffers Visiting Blobs345507 +Node: Customizing346305 +Node: Per-Repository Configuration347901 +Node: Essential Settings350155 +Node: Safety350501 +Node: Performance352262 +Ref: Log Performance355225 +Ref: Diff Performance356530 +Ref: Refs Buffer Performance357871 +Ref: Committing Performance358446 +Node: Microsoft Windows Performance359428 +Node: MacOS Performance360619 +Ref: MacOS Performance-Footnote-1361642 +Node: Global Bindings361724 +Node: Plumbing363952 +Node: Calling Git364781 +Node: Getting a Value from Git366306 +Node: Calling Git for Effect370034 +Node: Section Plumbing375928 +Node: Creating Sections376156 +Node: Section Selection380052 +Node: Matching Sections381848 +Node: Refreshing Buffers387769 +Node: Conventions390913 +Node: Theming Faces391105 +Node: FAQ399210 +Node: FAQ - How to ...?399648 +Node: How to pronounce Magit?400005 +Node: How to show git's output?400808 +Node: How to install the gitman info manual?401594 +Node: How to show diffs for gpg-encrypted files?402564 +Node: How does branching and pushing work?403160 +Node: Should I disable VC?403493 +Node: FAQ - Issues and Errors404096 +Node: Magit is slow405041 +Node: I changed several thousand files at once and now Magit is unusable405334 +Node: I am having problems committing406060 +Node: I am using MS Windows and cannot push with Magit406541 +Node: I am using macOS and SOMETHING works in shell but not in Magit407159 +Node: Expanding a file to show the diff causes it to disappear407993 +Node: Point is wrong in the COMMIT_EDITMSG buffer408581 +Node: The mode-line information isn't always up-to-date409629 +Node: A branch and tag sharing the same name breaks SOMETHING410692 +Node: My Git hooks work on the command-line but not inside Magit411579 +Node: git-commit-mode isn't used when committing from the command-line412425 +Node: Point ends up inside invisible text when jumping to a file-visiting buffer414696 +Node: I am no longer able to save popup defaults415545 +Node: Debugging Tools416526 +Node: Keystroke Index420023 +Node: Function and Command Index461637 +Node: Variable Index519984  End Tag Table diff --git a/elpa/magit-readme.txt b/elpa/magit-readme.txt deleted file mode 100644 index 52bcc521..00000000 --- a/elpa/magit-readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -Magit is an interface to the version control system Git, -implemented as an Emacs package. Magit aspires to be a complete -Git porcelain. While we cannot (yet) claim, that Magit wraps and -improves upon each and every Git command, it is complete enough to -allow even experienced Git users to perform almost all of their -daily version control tasks directly from within Emacs. While many -fine Git clients exist, only Magit and Git itself deserve to be -called porcelains. diff --git a/elpa/magit-section-20241102.1300/dir b/elpa/magit-section-20241217.845/dir similarity index 100% rename from elpa/magit-section-20241102.1300/dir rename to elpa/magit-section-20241217.845/dir diff --git a/elpa/magit-section-20241102.1300/magit-section-autoloads.el b/elpa/magit-section-20241217.845/magit-section-autoloads.el similarity index 100% rename from elpa/magit-section-20241102.1300/magit-section-autoloads.el rename to elpa/magit-section-20241217.845/magit-section-autoloads.el diff --git a/elpa/magit-section-20241102.1300/magit-section-pkg.el b/elpa/magit-section-20241217.845/magit-section-pkg.el similarity index 71% rename from elpa/magit-section-20241102.1300/magit-section-pkg.el rename to elpa/magit-section-20241217.845/magit-section-pkg.el index 7cd73b3c..9b2cd0ca 100644 --- a/elpa/magit-section-20241102.1300/magit-section-pkg.el +++ b/elpa/magit-section-20241217.845/magit-section-pkg.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "magit-section" "20241102.1300" +(define-package "magit-section" "20241217.845" "Sections for read-only buffers." - '((emacs "26.1") + '((emacs "27.1") (compat "30.0.0.0") (dash "2.19.1") (seq "2.24")) :url "https://github.com/magit/magit" - :commit "4992c3d1f64e0e983692c7a61d47069f47380dbf" - :revdesc "4992c3d1f64e" + :commit "c1a86066e8d20b5b54d4c3df0c044c4b9a99a30e" + :revdesc "c1a86066e8d2" :keywords '("tools") :authors '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev"))) diff --git a/elpa/magit-section-20241102.1300/magit-section.el b/elpa/magit-section-20241217.845/magit-section.el similarity index 98% rename from elpa/magit-section-20241102.1300/magit-section.el rename to elpa/magit-section-20241217.845/magit-section.el index 03125e78..f2205817 100644 --- a/elpa/magit-section-20241102.1300/magit-section.el +++ b/elpa/magit-section-20241217.845/magit-section.el @@ -8,10 +8,10 @@ ;; Homepage: https://github.com/magit/magit ;; Keywords: tools -;; Package-Version: 20241102.1300 -;; Package-Revision: 4992c3d1f64e +;; Package-Version: 20241217.845 +;; Package-Revision: c1a86066e8d2 ;; Package-Requires: ( -;; (emacs "26.1") +;; (emacs "27.1") ;; (compat "30.0.0.0") ;; (dash "2.19.1") ;; (seq "2.24")) @@ -330,39 +330,38 @@ no effect. This also has no effect for Emacs >= 28, where :group 'faces) (defface magit-section-highlight - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :background "grey95") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :background "grey20")) "Face for highlighting the current section." :group 'magit-section-faces) (defface magit-section-heading - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :foreground "DarkGoldenrod4" :weight bold) (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :foreground "LightGoldenrod2" :weight bold)) "Face for section headings." :group 'magit-section-faces) (defface magit-section-secondary-heading - `((t ,@(and (>= emacs-major-version 27) '(:extend t)) - :weight bold)) + '((t :extend t :weight bold)) "Face for section headings of some secondary headings." :group 'magit-section-faces) (defface magit-section-heading-selection - `((((class color) (background light)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + '((((class color) (background light)) + :extend t :foreground "salmon4") (((class color) (background dark)) - ,@(and (>= emacs-major-version 27) '(:extend t)) + :extend t :foreground "LightSalmon3")) "Face for selected section headings." :group 'magit-section-faces) @@ -1184,7 +1183,6 @@ section lineage. This command is intended for debugging purposes. (cl-defmethod cl-print-object ((section magit-section) stream) "Print `magit-describe-section' result of SECTION." - ;; Used by debug and edebug as of Emacs 26. (princ (magit-describe-section-briefly section) stream)) (defun magit-describe-section (section &optional interactive-p) @@ -2304,7 +2302,7 @@ Configuration'." (or magit--imenu-group-types magit--imenu-item-types) (let ((index - (cl-mapcan + (mapcan (lambda (section) (cond (magit--imenu-group-types @@ -2437,77 +2435,70 @@ with the variables' values as arguments, which were recorded by (format "%s%s" (substring (symbol-name major-mode) 0 -5) (if-let ((vars (get major-mode 'magit-bookmark-variables))) - (cl-mapcan (lambda (var) - (let ((val (symbol-value var))) - (if (and val (atom val)) - (list val) - val))) - vars) + (mapcan (lambda (var) (ensure-list (symbol-value var))) vars) ""))) ;;; Bitmaps -(when (fboundp 'define-fringe-bitmap) ;for Emacs 26 - (define-fringe-bitmap 'magit-fringe-bitmap+ - [#b00000000 - #b00011000 - #b00011000 - #b01111110 - #b01111110 - #b00011000 - #b00011000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmap- - [#b00000000 - #b00000000 - #b00000000 - #b01111110 - #b01111110 - #b00000000 - #b00000000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmap> - [#b01100000 - #b00110000 - #b00011000 - #b00001100 - #b00011000 - #b00110000 - #b01100000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmapv - [#b00000000 - #b10000010 - #b11000110 - #b01101100 - #b00111000 - #b00010000 - #b00000000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmap-bold> - [#b11100000 - #b01110000 - #b00111000 - #b00011100 - #b00011100 - #b00111000 - #b01110000 - #b11100000]) - - (define-fringe-bitmap 'magit-fringe-bitmap-boldv - [#b10000001 - #b11000011 - #b11100111 - #b01111110 - #b00111100 - #b00011000 - #b00000000 - #b00000000]) - ) +(define-fringe-bitmap 'magit-fringe-bitmap+ + [#b00000000 + #b00011000 + #b00011000 + #b01111110 + #b01111110 + #b00011000 + #b00011000 + #b00000000]) + +(define-fringe-bitmap 'magit-fringe-bitmap- + [#b00000000 + #b00000000 + #b00000000 + #b01111110 + #b01111110 + #b00000000 + #b00000000 + #b00000000]) + +(define-fringe-bitmap 'magit-fringe-bitmap> + [#b01100000 + #b00110000 + #b00011000 + #b00001100 + #b00011000 + #b00110000 + #b01100000 + #b00000000]) + +(define-fringe-bitmap 'magit-fringe-bitmapv + [#b00000000 + #b10000010 + #b11000110 + #b01101100 + #b00111000 + #b00010000 + #b00000000 + #b00000000]) + +(define-fringe-bitmap 'magit-fringe-bitmap-bold> + [#b11100000 + #b01110000 + #b00111000 + #b00011100 + #b00011100 + #b00111000 + #b01110000 + #b11100000]) + +(define-fringe-bitmap 'magit-fringe-bitmap-boldv + [#b10000001 + #b11000011 + #b11100111 + #b01111110 + #b00111100 + #b00011000 + #b00000000 + #b00000000]) ;;; _ (provide 'magit-section) diff --git a/elpa/magit-section-20241102.1300/magit-section.info b/elpa/magit-section-20241217.845/magit-section.info similarity index 99% rename from elpa/magit-section-20241102.1300/magit-section.info rename to elpa/magit-section-20241217.845/magit-section.info index 4bb09d53..e4c1ec60 100644 --- a/elpa/magit-section-20241102.1300/magit-section.info +++ b/elpa/magit-section-20241217.845/magit-section.info @@ -34,7 +34,7 @@ packages that have nothing to do with Magit or Git. and user options see *note (magit)Sections::. This manual documents how you can use sections in your own packages. -This manual is for Magit-Section version 4.1.2. +This manual is for Magit-Section version 4.1.3. Copyright (C) 2015-2024 Jonas Bernoulli -- 2.47.3