From 59e5d075b2a5aa1187cc286c03a12f66bf341e45 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 24 Dec 2025 14:48:23 +0100 Subject: [PATCH] update magit --- .../.dir-locals.el | 0 .../AUTHORS.md | 4 +- .../LICENSE | 0 .../dir | 0 .../git-commit.el | 116 +-- .../git-hooks/applypatch-msg | 8 + elpa/magit-20251217.1836/git-hooks/commit-msg | 8 + .../magit-20251217.1836/git-hooks/fallthrough | 8 + .../git-hooks/fsmonitor-watchman | 8 + .../git-hooks/p4-changelist | 8 + .../git-hooks/p4-post-changelist | 8 + .../git-hooks/p4-pre-submit | 8 + .../git-hooks/p4-prepare-changelist | 8 + .../git-hooks/post-applypatch | 8 + .../git-hooks/post-checkout | 8 + .../magit-20251217.1836/git-hooks/post-commit | 13 + .../git-hooks/post-index-change | 8 + elpa/magit-20251217.1836/git-hooks/post-merge | 13 + .../git-hooks/post-receive | 8 + .../git-hooks/post-rewrite | 13 + .../magit-20251217.1836/git-hooks/post-update | 8 + .../git-hooks/pre-applypatch | 8 + .../magit-20251217.1836/git-hooks/pre-auto-gc | 8 + elpa/magit-20251217.1836/git-hooks/pre-commit | 8 + .../git-hooks/pre-merge-commit | 8 + elpa/magit-20251217.1836/git-hooks/pre-push | 8 + elpa/magit-20251217.1836/git-hooks/pre-rebase | 8 + .../magit-20251217.1836/git-hooks/pre-receive | 8 + .../git-hooks/prepare-commit-msg | 8 + .../git-hooks/proc-receive | 8 + .../git-hooks/push-to-checkout | 8 + .../git-hooks/reference-transaction | 8 + .../git-hooks/sendemail-validate | 8 + elpa/magit-20251217.1836/git-hooks/update | 8 + .../git-rebase.el | 0 .../magit-apply.el | 29 +- .../magit-autoloads.el | 262 ++---- .../magit-autorevert.el | 124 ++- .../magit-base.el | 18 +- .../magit-bisect.el | 2 +- .../magit-blame.el | 10 +- .../magit-bookmark.el | 0 .../magit-branch.el | 4 +- .../magit-bundle.el | 4 +- .../magit-clone.el | 2 +- .../magit-commit.el | 101 +- .../magit-core.el | 0 .../magit-diff.el | 32 +- .../magit-dired.el | 0 .../magit-ediff.el | 2 +- .../magit-extras.el | 4 +- .../magit-fetch.el | 8 +- .../magit-files.el | 8 +- .../magit-git.el | 212 +++-- .../magit-gitignore.el | 2 +- .../magit-log.el | 11 +- .../magit-margin.el | 2 +- .../magit-merge.el | 2 +- .../magit-mode.el | 12 +- .../magit-notes.el | 2 +- .../magit-patch.el | 6 +- .../magit-pkg.el | 6 +- .../magit-process.el | 35 +- .../magit-pull.el | 6 +- .../magit-push.el | 10 +- .../magit-reflog.el | 0 .../magit-refs.el | 2 +- .../magit-remote.el | 6 +- .../magit-repos.el | 0 .../magit-reset.el | 10 +- .../magit-sequence.el | 48 +- .../magit-sparse-checkout.el | 2 +- .../magit-stash.el | 4 +- .../magit-status.el | 2 + .../magit-submodule.el | 14 +- .../magit-subtree.el | 6 +- .../magit-tag.el | 21 +- .../magit-transient.el | 0 .../magit-wip.el | 276 ++---- .../magit-worktree.el | 2 +- .../magit.el | 28 +- .../magit.info | 867 +++++++++--------- .../dir | 0 .../magit-section-autoloads.el | 0 .../magit-section-pkg.el | 6 +- .../magit-section.el | 74 +- .../magit-section.info | 71 +- 87 files changed, 1455 insertions(+), 1267 deletions(-) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/.dir-locals.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/AUTHORS.md (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/LICENSE (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/dir (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/git-commit.el (99%) create mode 100755 elpa/magit-20251217.1836/git-hooks/applypatch-msg create mode 100755 elpa/magit-20251217.1836/git-hooks/commit-msg create mode 100755 elpa/magit-20251217.1836/git-hooks/fallthrough create mode 100755 elpa/magit-20251217.1836/git-hooks/fsmonitor-watchman create mode 100755 elpa/magit-20251217.1836/git-hooks/p4-changelist create mode 100755 elpa/magit-20251217.1836/git-hooks/p4-post-changelist create mode 100755 elpa/magit-20251217.1836/git-hooks/p4-pre-submit create mode 100755 elpa/magit-20251217.1836/git-hooks/p4-prepare-changelist create mode 100755 elpa/magit-20251217.1836/git-hooks/post-applypatch create mode 100755 elpa/magit-20251217.1836/git-hooks/post-checkout create mode 100755 elpa/magit-20251217.1836/git-hooks/post-commit create mode 100755 elpa/magit-20251217.1836/git-hooks/post-index-change create mode 100755 elpa/magit-20251217.1836/git-hooks/post-merge create mode 100755 elpa/magit-20251217.1836/git-hooks/post-receive create mode 100755 elpa/magit-20251217.1836/git-hooks/post-rewrite create mode 100755 elpa/magit-20251217.1836/git-hooks/post-update create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-applypatch create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-auto-gc create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-commit create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-merge-commit create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-push create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-rebase create mode 100755 elpa/magit-20251217.1836/git-hooks/pre-receive create mode 100755 elpa/magit-20251217.1836/git-hooks/prepare-commit-msg create mode 100755 elpa/magit-20251217.1836/git-hooks/proc-receive create mode 100755 elpa/magit-20251217.1836/git-hooks/push-to-checkout create mode 100755 elpa/magit-20251217.1836/git-hooks/reference-transaction create mode 100755 elpa/magit-20251217.1836/git-hooks/sendemail-validate create mode 100755 elpa/magit-20251217.1836/git-hooks/update rename elpa/{magit-20251103.1130 => magit-20251217.1836}/git-rebase.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-apply.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-autoloads.el (90%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-autorevert.el (73%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-base.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-bisect.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-blame.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-bookmark.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-branch.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-bundle.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-clone.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-commit.el (95%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-core.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-diff.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-dired.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-ediff.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-extras.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-fetch.el (96%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-files.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-git.el (94%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-gitignore.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-log.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-margin.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-merge.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-mode.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-notes.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-patch.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-pkg.el (84%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-process.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-pull.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-push.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-reflog.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-refs.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-remote.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-repos.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-reset.el (94%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-sequence.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-sparse-checkout.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-stash.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-status.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-submodule.el (98%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-subtree.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-tag.el (93%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-transient.el (100%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-wip.el (62%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit-worktree.el (99%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit.el (97%) rename elpa/{magit-20251103.1130 => magit-20251217.1836}/magit.info (96%) rename elpa/{magit-section-20251027.1634 => magit-section-20251220.917}/dir (100%) rename elpa/{magit-section-20251027.1634 => magit-section-20251220.917}/magit-section-autoloads.el (100%) rename elpa/{magit-section-20251027.1634 => magit-section-20251220.917}/magit-section-pkg.el (76%) rename elpa/{magit-section-20251027.1634 => magit-section-20251220.917}/magit-section.el (97%) rename elpa/{magit-section-20251027.1634 => magit-section-20251220.917}/magit-section.info (85%) diff --git a/elpa/magit-20251103.1130/.dir-locals.el b/elpa/magit-20251217.1836/.dir-locals.el similarity index 100% rename from elpa/magit-20251103.1130/.dir-locals.el rename to elpa/magit-20251217.1836/.dir-locals.el diff --git a/elpa/magit-20251103.1130/AUTHORS.md b/elpa/magit-20251217.1836/AUTHORS.md similarity index 98% rename from elpa/magit-20251103.1130/AUTHORS.md rename to elpa/magit-20251217.1836/AUTHORS.md index ba62bdf3..e1673d29 100644 --- a/elpa/magit-20251103.1130/AUTHORS.md +++ b/elpa/magit-20251217.1836/AUTHORS.md @@ -1,5 +1,5 @@ The following people have contributed to Magit. -For statistics see https://magit.vc/stats/magit/authors.html. +For statistics see https://stats.magit.vc/magit/authors.html. Authors ------- @@ -169,6 +169,7 @@ All Contributors - Hannu Koivisto - Hans-Peter Deifel - hokomo +- Huon Wilson - Hussein Ait-Lahcen - Ian Eure - Ian Milligan @@ -238,6 +239,7 @@ All Contributors - Lluís Vilanova - Loic Dachary - Louis Roché +- Lucius Chen - Luís Oliveira - Luke Amdor - Magnar Sveen diff --git a/elpa/magit-20251103.1130/LICENSE b/elpa/magit-20251217.1836/LICENSE similarity index 100% rename from elpa/magit-20251103.1130/LICENSE rename to elpa/magit-20251217.1836/LICENSE diff --git a/elpa/magit-20251103.1130/dir b/elpa/magit-20251217.1836/dir similarity index 100% rename from elpa/magit-20251103.1130/dir rename to elpa/magit-20251217.1836/dir diff --git a/elpa/magit-20251103.1130/git-commit.el b/elpa/magit-20251217.1836/git-commit.el similarity index 99% rename from elpa/magit-20251103.1130/git-commit.el rename to elpa/magit-20251217.1836/git-commit.el index 0bcad3d3..82c4dee0 100644 --- a/elpa/magit-20251103.1130/git-commit.el +++ b/elpa/magit-20251217.1836/git-commit.el @@ -216,36 +216,6 @@ Also note that `git-commit-mode' (which see) is not a major-mode.") git-commit-propertize-diff bug-reference-mode)) -(defcustom git-commit-post-finish-hook nil - "Hook run after the user finished writing a commit message. - -\\\ -This hook is only run after pressing \\[with-editor-finish] in a buffer used -to edit a commit message. If a commit is created without the -user typing a message into a buffer, then this hook is not run. - -This hook is not run until the new commit has been created. If -that takes Git longer than `git-commit-post-finish-hook-timeout' -seconds, then this hook isn't run at all. For certain commands -such as `magit-rebase-continue' this hook is never run because -doing so would lead to a race condition. - -Also see `magit-post-commit-hook'." - :group 'git-commit - :type 'hook - :get #'magit-hook-custom-get) - -(defcustom git-commit-post-finish-hook-timeout 2 - "Time in seconds to wait for git to create a commit. - -The hook `git-commit-post-finish-hook' (which see) is run only -after git is done creating a commit. If it takes longer than -`git-commit-post-finish-hook-timeout' seconds to create the -commit, then the hook is not run at all." - :group 'git-commit - :safe 'numberp - :type 'number) - (defcustom git-commit-finish-query-functions (list #'git-commit-check-style-conventions) "List of functions called to query before performing commit. @@ -586,19 +556,7 @@ Used as the local value of `header-line-format', in buffer using (when (fboundp 'magit-commit--reset-command) (add-hook 'with-editor-post-finish-hook #'magit-commit--reset-command) (add-hook 'with-editor-post-cancel-hook #'magit-commit--reset-command)) - (unless (memq last-command - '(magit-sequencer-continue - magit-sequencer-skip - magit-am-continue - magit-am-skip - magit-rebase-continue - magit-rebase-skip)) - (add-hook 'with-editor-post-finish-hook - (apply-partially #'git-commit-run-post-finish-hook - (magit-rev-parse "HEAD")) - nil t) - (when (fboundp 'magit-wip-maybe-add-commit-hook) - (magit-wip-maybe-add-commit-hook))) + (git-commit-add-post-finish-hook) (setq with-editor-cancel-message #'git-commit-cancel-message) (git-commit-setup-font-lock) @@ -617,17 +575,6 @@ Used as the local value of `header-line-format', in buffer using (setq with-editor-usage-message git-commit-usage-message)) (with-editor-usage-message)) -(defun git-commit-run-post-finish-hook (previous) - (when git-commit-post-finish-hook - (if (with-timeout (git-commit-post-finish-hook-timeout) - (while (equal (magit-rev-parse "HEAD") previous) - (sit-for 0.01)) - t) - (run-hooks 'git-commit-post-finish-hook) - (message "No commit created after %s second. Not running %s." - git-commit-post-finish-hook-timeout - 'git-commit-post-finish-hook)))) - (define-minor-mode git-commit-mode "Auxiliary minor mode used when editing Git commit messages. This mode is only responsible for setting up some key bindings. @@ -1171,6 +1118,11 @@ Added to `font-lock-extend-region-functions'." (delete-region (point) (point-max))))) (let ((diff-default-read-only nil)) (diff-mode)) + ;; These won't survive copying to another buffer, + ;; so let's not waste any time. See #5483. + (setq-local diff-refine nil) + (setq-local diff-font-lock-syntax nil) + (setq-local diff-font-lock-prettify nil) (let ((font-lock-verbose nil) (font-lock-support-mode nil)) (font-lock-ensure)) @@ -1198,6 +1150,62 @@ Elisp doc-strings, including this one. Unlike in doc-strings, (1 font-lock-constant-face prepend)) ("\"[^\"]*\"" (0 font-lock-string-face prepend)))) +;;; Post Hook + +(defcustom git-commit-post-finish-hook nil + "Hook run after the user finished writing a commit message. + +\\\ +This hook is only run after pressing \\[with-editor-finish] in a buffer used +to edit a commit message. If a commit is created without the +user typing a message into a buffer, then this hook is not run. + +This hook is not run until the new commit has been created. If +that takes Git longer than `git-commit-post-finish-hook-timeout' +seconds, then this hook isn't run at all. For certain commands +such as `magit-rebase-continue' this hook is never run because +doing so would lead to a race condition. + +Also see `magit-post-commit-hook'." + :group 'git-commit + :type 'hook + :get #'magit-hook-custom-get) + +(defcustom git-commit-post-finish-hook-timeout 2 + "Time in seconds to wait for git to create a commit. + +The hook `git-commit-post-finish-hook' (which see) is run only +after git is done creating a commit. If it takes longer than +`git-commit-post-finish-hook-timeout' seconds to create the +commit, then the hook is not run at all." + :group 'git-commit + :safe 'numberp + :type 'number) + +(defun git-commit-add-post-finish-hook () + (unless (memq last-command + '(magit-sequencer-continue + magit-sequencer-skip + magit-am-continue + magit-am-skip + magit-rebase-continue + magit-rebase-skip)) + (add-hook 'with-editor-post-finish-hook + (apply-partially #'git-commit-run-post-finish-hook + (magit-rev-parse "HEAD")) + nil t))) + +(defun git-commit-run-post-finish-hook (previous) + (when git-commit-post-finish-hook + (if (with-timeout (git-commit-post-finish-hook-timeout) + (while (equal (magit-rev-parse "HEAD") previous) + (sit-for 0.01)) + t) + (run-hooks 'git-commit-post-finish-hook) + (message "No commit created after %s second. Not running %s." + git-commit-post-finish-hook-timeout + 'git-commit-post-finish-hook)))) + ;;; _ (define-obsolete-function-alias diff --git a/elpa/magit-20251217.1836/git-hooks/applypatch-msg b/elpa/magit-20251217.1836/git-hooks/applypatch-msg new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/applypatch-msg @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/commit-msg b/elpa/magit-20251217.1836/git-hooks/commit-msg new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/commit-msg @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/fallthrough b/elpa/magit-20251217.1836/git-hooks/fallthrough new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/fallthrough @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/fsmonitor-watchman b/elpa/magit-20251217.1836/git-hooks/fsmonitor-watchman new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/fsmonitor-watchman @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/p4-changelist b/elpa/magit-20251217.1836/git-hooks/p4-changelist new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/p4-changelist @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/p4-post-changelist b/elpa/magit-20251217.1836/git-hooks/p4-post-changelist new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/p4-post-changelist @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/p4-pre-submit b/elpa/magit-20251217.1836/git-hooks/p4-pre-submit new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/p4-pre-submit @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/p4-prepare-changelist b/elpa/magit-20251217.1836/git-hooks/p4-prepare-changelist new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/p4-prepare-changelist @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-applypatch b/elpa/magit-20251217.1836/git-hooks/post-applypatch new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-applypatch @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-checkout b/elpa/magit-20251217.1836/git-hooks/post-checkout new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-checkout @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-commit b/elpa/magit-20251217.1836/git-hooks/post-commit new file mode 100755 index 00000000..79b9aa0e --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-commit @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if [[ "$INSIDE_EMACS" == *magit ]] +then + for arg in "$@"; do args+="\"$arg\""; done + $GIT_EDITOR --eval \ + "(magit-run-git-hook '(common-post-commit post-commit) ${args[@]})" +fi + +if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]] +then + "$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-index-change b/elpa/magit-20251217.1836/git-hooks/post-index-change new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-index-change @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-merge b/elpa/magit-20251217.1836/git-hooks/post-merge new file mode 100755 index 00000000..5716dee0 --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-merge @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if [[ "$INSIDE_EMACS" == *magit ]] +then + for arg in "$@"; do args+="\"$arg\""; done + $GIT_EDITOR --eval \ + "(magit-run-git-hook '(common-post-commit post-merge) ${args[@]})" +fi + +if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]] +then + "$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-receive b/elpa/magit-20251217.1836/git-hooks/post-receive new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-receive @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-rewrite b/elpa/magit-20251217.1836/git-hooks/post-rewrite new file mode 100755 index 00000000..128ddaaa --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-rewrite @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if [[ "$INSIDE_EMACS" == *magit ]] +then + for arg in "$@"; do args+="\"$arg\""; done + $GIT_EDITOR --eval \ + "(magit-run-git-hook '(common-post-commit post-rewrite) ${args[@]})" +fi + +if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]] +then + "$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/post-update b/elpa/magit-20251217.1836/git-hooks/post-update new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/post-update @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-applypatch b/elpa/magit-20251217.1836/git-hooks/pre-applypatch new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-applypatch @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-auto-gc b/elpa/magit-20251217.1836/git-hooks/pre-auto-gc new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-auto-gc @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-commit b/elpa/magit-20251217.1836/git-hooks/pre-commit new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-commit @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-merge-commit b/elpa/magit-20251217.1836/git-hooks/pre-merge-commit new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-merge-commit @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-push b/elpa/magit-20251217.1836/git-hooks/pre-push new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-push @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-rebase b/elpa/magit-20251217.1836/git-hooks/pre-rebase new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-rebase @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/pre-receive b/elpa/magit-20251217.1836/git-hooks/pre-receive new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/pre-receive @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/prepare-commit-msg b/elpa/magit-20251217.1836/git-hooks/prepare-commit-msg new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/prepare-commit-msg @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/proc-receive b/elpa/magit-20251217.1836/git-hooks/proc-receive new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/proc-receive @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/push-to-checkout b/elpa/magit-20251217.1836/git-hooks/push-to-checkout new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/push-to-checkout @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/reference-transaction b/elpa/magit-20251217.1836/git-hooks/reference-transaction new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/reference-transaction @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/sendemail-validate b/elpa/magit-20251217.1836/git-hooks/sendemail-validate new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/sendemail-validate @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251217.1836/git-hooks/update b/elpa/magit-20251217.1836/git-hooks/update new file mode 100755 index 00000000..51928e7f --- /dev/null +++ b/elpa/magit-20251217.1836/git-hooks/update @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" + +if [[ -x "$hook" ]] +then + "$hook" "$@" +fi diff --git a/elpa/magit-20251103.1130/git-rebase.el b/elpa/magit-20251217.1836/git-rebase.el similarity index 100% rename from elpa/magit-20251103.1130/git-rebase.el rename to elpa/magit-20251217.1836/git-rebase.el diff --git a/elpa/magit-20251103.1130/magit-apply.el b/elpa/magit-20251217.1836/magit-apply.el similarity index 97% rename from elpa/magit-20251103.1130/magit-apply.el rename to elpa/magit-20251217.1836/magit-apply.el index e5b69d59..75457ce8 100644 --- a/elpa/magit-20251103.1130/magit-apply.el +++ b/elpa/magit-20251217.1836/magit-apply.el @@ -225,8 +225,8 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." (ignore-context (magit-diff-ignore-any-space-p))) (unless (magit-diff-context-p) (user-error "Not enough context to apply patch. Increase the context")) - (when (and magit-wip-before-change-mode (not magit-inhibit-refresh)) - (magit-wip-commit-before-change files (concat " before " command))) + (unless magit-inhibit-refresh + (magit-run-before-change-functions files command)) (with-temp-buffer (insert patch) (let ((magit-inhibit-refresh t)) @@ -235,8 +235,7 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." (if ignore-context "-C0" (format "-C%s" context)) "--ignore-space-change" "-"))) (unless magit-inhibit-refresh - (when magit-wip-after-apply-mode - (magit-wip-commit-after-apply files (concat " after " command))) + (magit-run-after-apply-functions files command) (magit-refresh)))) (defun magit-apply--get-selection () @@ -339,11 +338,11 @@ ignored) files." (magit-stage-1 (if all "--all" "-u") magit-buffer-diff-files))) (defun magit-stage-1 (arg &optional files) - (magit-wip-commit-before-change files " before stage") + (magit-run-before-change-functions files "stage") (magit-run-git "add" arg (if files (cons "--" files) ".")) (when magit-auto-revert-mode (mapc #'magit-turn-on-auto-revert-mode-if-desired files)) - (magit-wip-commit-after-apply files " after stage")) + (magit-run-after-apply-functions files "stage")) (defun magit-stage-untracked (&optional intent) (let* ((section (magit-current-section)) @@ -357,7 +356,7 @@ ignored) files." (magit-git-repo-p file t)) (push file repos) (push file plain))) - (magit-wip-commit-before-change files " before stage") + (magit-run-before-change-functions files "stage") (when plain (magit-run-git "add" (and intent "--intent-to-add") "--" plain) @@ -389,7 +388,7 @@ ignored) files." (expand-file-name ".gitmodules" topdir)) (let ((default-directory borg-user-emacs-directory)) (borg--maybe-absorb-gitdir package))))))))) - (magit-wip-commit-after-apply files " after stage"))) + (magit-run-after-apply-functions files "stage"))) (defvar magit-post-stage-hook-commands (list #'magit-stage @@ -397,6 +396,7 @@ ignored) files." #'magit-stage-modified 'magit-file-stage)) +;;;###autoload (defun magit-run-post-stage-hook () (when (memq this-command magit-post-stage-hook-commands) (magit-run-hook-with-benchmark 'magit-post-stage-hook))) @@ -443,11 +443,11 @@ ignored) files." (magit-unstage-1 files))) (defun magit-unstage-1 (files) - (magit-wip-commit-before-change files " before unstage") + (magit-run-before-change-functions files "unstage") (if (magit-no-commit-p) (magit-run-git "rm" "--cached" "--" files) (magit-run-git "reset" "HEAD" "--" files)) - (magit-wip-commit-after-apply files " after unstage")) + (magit-run-after-apply-functions files "unstage")) (defun magit-unstage-intent (files) (if-let* ((staged (magit-staged-files)) @@ -464,9 +464,9 @@ ignored) files." (when (or (magit-anything-unstaged-p) (magit-untracked-files)) (magit-confirm 'unstage-all-changes)) - (magit-wip-commit-before-change nil " before unstage") + (magit-run-before-change-functions nil "unstage") (magit-run-git "reset" "HEAD" "--" magit-buffer-diff-files) - (magit-wip-commit-after-apply nil " after unstage")) + (magit-run-after-apply-functions nil "unstage")) (defvar magit-post-unstage-hook-commands (list #'magit-unstage @@ -474,6 +474,7 @@ ignored) files." #'magit-unstage-all 'magit-file-unstage)) +;;;###autoload (defun magit-run-post-unstage-hook () (when (memq this-command magit-post-unstage-hook-commands) (magit-run-hook-with-benchmark 'magit-post-unstage-hook))) @@ -571,7 +572,7 @@ of a side, then keep that side without prompting." (`(?X ?R ,(or ? ?M ?D)) (push file rename))))) (unwind-protect (let ((magit-inhibit-refresh t)) - (magit-wip-commit-before-change files " before discard") + (magit-run-before-change-functions files "discard") (when resolve (magit-discard-files--resolve (nreverse resolve))) (when resurrect @@ -583,7 +584,7 @@ of a side, then keep that side without prompting." (when (or discard discard-new) (magit-discard-files--discard (nreverse discard) (nreverse discard-new))) - (magit-wip-commit-after-apply files " after discard")) + (magit-run-after-apply-functions files "discard")) (magit-refresh)))) (defun magit-discard-files--resolve (files) diff --git a/elpa/magit-20251103.1130/magit-autoloads.el b/elpa/magit-20251217.1836/magit-autoloads.el similarity index 90% rename from elpa/magit-20251103.1130/magit-autoloads.el rename to elpa/magit-20251217.1836/magit-autoloads.el index 9d414e5f..1e3b10e7 100644 --- a/elpa/magit-20251103.1130/magit-autoloads.el +++ b/elpa/magit-20251217.1836/magit-autoloads.el @@ -99,8 +99,8 @@ already been run.") (defun magit-maybe-define-global-key-bindings (&optional force) "\ See variable `magit-define-global-key-bindings'." (when magit-define-global-key-bindings (let ((map (current-global-map))) (pcase-dolist (`(,key \, def) (cond ((eq magit-define-global-key-bindings 'recommended) '(("C-x g" . magit-status) ("C-c g" . magit-dispatch) ("C-c f" . magit-file-dispatch))) ('(("C-x g" . magit-status) ("C-x M-g" . magit-dispatch) ("C-c M-g" . magit-file-dispatch))))) (when (or force (not (or (lookup-key map (kbd key)) (where-is-internal def (make-sparse-keymap) t)))) (define-key map (kbd key) def)))))) (if after-init-time (magit-maybe-define-global-key-bindings) (add-hook 'after-init-hook #'magit-maybe-define-global-key-bindings t)) - (autoload 'magit-dispatch "magit" nil t) - (autoload 'magit-run "magit" nil t) +(autoload 'magit-dispatch "magit" nil t) +(autoload 'magit-run "magit" nil t) (autoload 'magit-git-command "magit" "\ Execute COMMAND asynchronously; display output. @@ -164,25 +164,28 @@ With a prefix argument also stage previously untracked (but not ignored) files. (fn &optional ALL)" t) +(autoload 'magit-run-post-stage-hook "magit-apply") (autoload 'magit-unstage-files "magit-apply" "\ Read one or more files and unstage all changes to those files. (fn FILES)" t) (autoload 'magit-unstage-all "magit-apply" "\ Remove all changes from the staging area." t) +(autoload 'magit-run-post-unstage-hook "magit-apply") (register-definition-prefixes "magit-apply" '("magit-")) ;;; Generated autoloads from magit-autorevert.el +(defun magit-auto-revert-mode--initialize (symbol value) (internal--define-uninitialized-variable symbol) (if (not load-file-name) (custom-initialize-set symbol value) (defalias 'magit-auto-revert-mode--after-load (apply-partially (lambda (symbol value mode-file file) (when (equal file mode-file) (remove-hook 'after-load-functions 'magit-auto-revert-mode--after-load) (fmakunbound 'magit-auto-revert-mode--after-load) (if after-init-time (custom-initialize-set symbol value) (defalias 'magit-auto-revert-mode--after-init (apply-partially (lambda (symbol value) (remove-hook 'after-init-hook 'magit-auto-revert-mode--after-init) (fmakunbound 'magit-auto-revert-mode--after-init) (custom-initialize-set symbol value)) symbol value)) (add-hook 'after-init-hook 'magit-auto-revert-mode--after-init)))) symbol value load-file-name)) (add-hook 'after-load-functions 'magit-auto-revert-mode--after-load))) (put 'magit-auto-revert-mode 'globalized-minor-mode t) -(defvar magit-auto-revert-mode (not (or global-auto-revert-mode noninteractive)) "\ +(defcustom magit-auto-revert-mode (not (or global-auto-revert-mode noninteractive)) "\ Non-nil if Magit-Auto-Revert mode is enabled. See the `magit-auto-revert-mode' command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') -or call the function `magit-auto-revert-mode'.") +or call the function `magit-auto-revert-mode'." :set #'custom-set-minor-mode :initialize #'magit-auto-revert-mode--initialize :type 'boolean :group 'magit-auto-revert :group 'magit-essentials :package-version '(magit . "2.4.0") :link '(info-link "(magit)Automatic Reverting of File-Visiting Buffers")) (custom-autoload 'magit-auto-revert-mode "magit-autorevert" nil) (autoload 'magit-auto-revert-mode "magit-autorevert" "\ Toggle Auto-Revert mode in many buffers. @@ -199,6 +202,7 @@ Disable the mode if ARG is a negative number. See `auto-revert-mode' for more information on Auto-Revert mode. (fn &optional ARG)" t) +(autoload 'magit-auto-revert-buffers "magit-autorevert") (register-definition-prefixes "magit-autorevert" '("auto-revert-buffer" "magit-")) @@ -229,7 +233,7 @@ the %s(1) manpage. ;;; Generated autoloads from magit-bisect.el - (autoload 'magit-bisect "magit-bisect" nil t) +(autoload 'magit-bisect "magit-bisect" nil t) (autoload 'magit-bisect-start "magit-bisect" "\ Start a bisect session. @@ -274,17 +278,17 @@ bisect run'. ;;; Generated autoloads from magit-blame.el - (autoload 'magit-blame-echo "magit-blame" nil t) - (autoload 'magit-blame-addition "magit-blame" nil t) - (autoload 'magit-blame-removal "magit-blame" nil t) - (autoload 'magit-blame-reverse "magit-blame" nil t) - (autoload 'magit-blame "magit-blame" nil t) +(autoload 'magit-blame-echo "magit-blame" nil t) +(autoload 'magit-blame-addition "magit-blame" nil t) +(autoload 'magit-blame-removal "magit-blame" nil t) +(autoload 'magit-blame-reverse "magit-blame" nil t) +(autoload 'magit-blame "magit-blame" nil t) (register-definition-prefixes "magit-blame" '("magit-")) ;;; Generated autoloads from magit-branch.el - (autoload 'magit-branch "magit" nil t) +(autoload 'magit-branch "magit" nil t) (autoload 'magit-checkout "magit-branch" "\ Checkout COMMIT, updating the index and the working tree. If COMMIT is a local branch, then that becomes the current @@ -442,14 +446,14 @@ is prefixed with \"YYYY-MM-DD\", then drop that part of the name. Also rename the respective reflog file. (fn BRANCH)" t) - (autoload 'magit-branch-configure "magit-branch" nil t) +(autoload 'magit-branch-configure "magit-branch" nil t) (register-definition-prefixes "magit-branch" '("magit-")) ;;; Generated autoloads from magit-bundle.el - (autoload 'magit-bundle "magit-bundle" nil t) - (autoload 'magit-bundle-import "magit-bundle" nil t) +(autoload 'magit-bundle "magit-bundle" nil t) +(autoload 'magit-bundle-import "magit-bundle" nil t) (autoload 'magit-bundle-create-tracked "magit-bundle" "\ Create and track a new bundle. @@ -471,7 +475,7 @@ List the refs in FILE. ;;; Generated autoloads from magit-clone.el - (autoload 'magit-clone "magit-clone" nil t) +(autoload 'magit-clone "magit-clone" nil t) (autoload 'magit-clone-regular "magit-clone" "\ Create a clone of REPOSITORY in DIRECTORY. Then show the status buffer for the new repository. @@ -517,7 +521,7 @@ Clone REPOSITORY into DIRECTORY and create a sparse checkout. ;;; Generated autoloads from magit-commit.el - (autoload 'magit-commit "magit-commit" nil t) +(autoload 'magit-commit "magit-commit" nil t) (autoload 'magit-commit-create "magit-commit" "\ Create a new commit. @@ -662,15 +666,16 @@ is updated: Spread modified modules across recent commits. (fn PHASE COMMIT)" t) - (autoload 'magit-commit-absorb "magit-commit" nil t) - (autoload 'magit-commit-autofixup "magit-commit" nil t) +(autoload 'magit-commit-absorb "magit-commit" nil t) +(autoload 'magit-commit-autofixup "magit-commit" nil t) +(autoload 'magit-run-post-commit-hook "magit-commit") (register-definition-prefixes "magit-commit" '("magit-")) ;;; Generated autoloads from magit-diff.el - (autoload 'magit-diff "magit-diff" nil t) - (autoload 'magit-diff-refresh "magit-diff" nil t) +(autoload 'magit-diff "magit-diff" nil t) +(autoload 'magit-diff-refresh "magit-diff" nil t) (autoload 'magit-diff-dwim "magit-diff" "\ Show changes for the thing at point. @@ -784,7 +789,7 @@ Interactively, open the file at point. ;;; Generated autoloads from magit-ediff.el - (autoload 'magit-ediff "magit-ediff" nil) +(autoload 'magit-ediff "magit-ediff" nil) (autoload 'magit-ediff-resolve-all "magit-ediff" "\ Resolve all conflicts in the FILE at point using Ediff. @@ -872,7 +877,7 @@ stash that were staged. ;;; Generated autoloads from magit-extras.el - (autoload 'magit-git-mergetool "magit-extras" nil t) +(autoload 'magit-git-mergetool "magit-extras" nil t) (autoload 'magit-run-git-gui-blame "magit-extras" "\ Run `git gui blame' on the given FILENAME and COMMIT. Interactively run it for the current file and the `HEAD', with a @@ -1094,9 +1099,9 @@ In Magit diffs, also skip over - and + at the beginning of the line." t) ;;; Generated autoloads from magit-fetch.el - (autoload 'magit-fetch "magit-fetch" nil t) - (autoload 'magit-fetch-from-pushremote "magit-fetch" nil t) - (autoload 'magit-fetch-from-upstream "magit-fetch" nil t) +(autoload 'magit-fetch "magit-fetch" nil t) +(autoload 'magit-fetch-from-pushremote "magit-fetch" nil t) +(autoload 'magit-fetch-from-upstream "magit-fetch" nil t) (autoload 'magit-fetch-other "magit-fetch" "\ Fetch from another repository. @@ -1119,7 +1124,7 @@ Prune remote tracking branches for branches that have been removed on the respective remote." t) (autoload 'magit-fetch-all-no-prune "magit-fetch" "\ Fetch from all remotes." t) - (autoload 'magit-fetch-modules "magit-fetch" nil t) +(autoload 'magit-fetch-modules "magit-fetch" nil t) (register-definition-prefixes "magit-fetch" '("magit-")) @@ -1149,7 +1154,7 @@ buffer and/or cursor position is about the same file, then go to the line and column corresponding to that location. (fn REV FILE)" t) - (autoload 'magit-file-dispatch "magit" nil t) +(autoload 'magit-file-dispatch "magit" nil t) (autoload 'magit-blob-visit-file "magit-files" "\ View the file from the worktree corresponding to the current blob. When visiting a blob or the version from the index, then go to @@ -1193,7 +1198,7 @@ Checkout FILE from REV. ;;; Generated autoloads from magit-gitignore.el - (autoload 'magit-gitignore "magit-gitignore" nil t) +(autoload 'magit-gitignore "magit-gitignore" nil t) (autoload 'magit-gitignore-in-topdir "magit-gitignore" "\ Add the Git ignore RULE to the top-level \".gitignore\" file. Since this file is tracked, it is shared with other clones of the @@ -1239,9 +1244,9 @@ Call \"git update-index --no-assume-unchanged -- FILE\". ;;; Generated autoloads from magit-log.el - (autoload 'magit-log "magit-log" nil t) - (autoload 'magit-log-refresh "magit-log" nil t) - (autoload 'magit-log-current "magit-log" nil t) +(autoload 'magit-log "magit-log" nil t) +(autoload 'magit-log-refresh "magit-log" nil t) +(autoload 'magit-log-current "magit-log" nil t) (autoload 'magit-log-head "magit-log" "\ Show log for `HEAD'. @@ -1313,7 +1318,7 @@ Delete a ref created by `magit-branch-shelve'. Move to the Nth parent of the current commit. (fn &optional N)" t) - (autoload 'magit-shortlog "magit-log" nil t) +(autoload 'magit-shortlog "magit-log" nil t) (autoload 'magit-shortlog-since "magit-log" "\ Show a history summary for commits since REV. @@ -1336,7 +1341,7 @@ Show commits in a branch that are not merged in the upstream branch. ;;; Generated autoloads from magit-merge.el - (autoload 'magit-merge "magit" nil t) +(autoload 'magit-merge "magit" nil t) (autoload 'magit-merge-plain "magit-merge" "\ Merge commit REV into the current branch; using default message. @@ -1413,15 +1418,15 @@ Visit the Magit manual." t) ;;; Generated autoloads from magit-notes.el - (autoload 'magit-notes "magit" nil t) +(autoload 'magit-notes "magit" nil t) (register-definition-prefixes "magit-notes" '("magit-notes-")) ;;; Generated autoloads from magit-patch.el - (autoload 'magit-patch "magit-patch" nil t) - (autoload 'magit-patch-create "magit-patch" nil t) - (autoload 'magit-patch-apply "magit-patch" nil t) +(autoload 'magit-patch "magit-patch" nil t) +(autoload 'magit-patch-create "magit-patch" nil t) +(autoload 'magit-patch-apply "magit-patch" nil t) (autoload 'magit-patch-save "magit-patch" "\ Write current diff into patch FILE. @@ -1465,9 +1470,9 @@ is asked to pull. START has to be reachable from that commit. ;;; Generated autoloads from magit-pull.el - (autoload 'magit-pull "magit-pull" nil t) - (autoload 'magit-pull-from-pushremote "magit-pull" nil t) - (autoload 'magit-pull-from-upstream "magit-pull" nil t) +(autoload 'magit-pull "magit-pull" nil t) +(autoload 'magit-pull-from-pushremote "magit-pull" nil t) +(autoload 'magit-pull-from-upstream "magit-pull" nil t) (autoload 'magit-pull-branch "magit-pull" "\ Pull from a branch read in the minibuffer. @@ -1477,9 +1482,9 @@ Pull from a branch read in the minibuffer. ;;; Generated autoloads from magit-push.el - (autoload 'magit-push "magit-push" nil t) - (autoload 'magit-push-current-to-pushremote "magit-push" nil t) - (autoload 'magit-push-current-to-upstream "magit-push" nil t) +(autoload 'magit-push "magit-push" nil t) +(autoload 'magit-push-current-to-pushremote "magit-push" nil t) +(autoload 'magit-push-current-to-upstream "magit-push" nil t) (autoload 'magit-push-current "magit-push" "\ Push the current branch to a branch read in the minibuffer. @@ -1518,8 +1523,8 @@ Push a tag to another repository. Push a notes ref to another repository. (fn REF REMOTE &optional ARGS)" t) - (autoload 'magit-push-implicitly "magit-push" nil t) - (autoload 'magit-push-to-remote "magit-push" nil t) +(autoload 'magit-push-implicitly "magit-push" nil t) +(autoload 'magit-push-to-remote "magit-push" nil t) (register-definition-prefixes "magit-push" '("magit-")) @@ -1539,7 +1544,7 @@ Display the `HEAD' reflog." t) ;;; Generated autoloads from magit-refs.el - (autoload 'magit-show-refs "magit-refs" nil t) +(autoload 'magit-show-refs "magit-refs" nil t) (autoload 'magit-show-refs-head "magit-refs" "\ List and compare references in a dedicated buffer. Compared with `HEAD'. @@ -1560,7 +1565,7 @@ Compared with a branch read from the user. ;;; Generated autoloads from magit-remote.el - (autoload 'magit-remote "magit-remote" nil t) +(autoload 'magit-remote "magit-remote" nil t) (autoload 'magit-remote-add "magit-remote" "\ Add a remote named REMOTE and fetch it. @@ -1605,7 +1610,7 @@ Unset the local representation of REMOTE's default branch. Delete the symbolic-ref \"refs/remotes//HEAD\". (fn REMOTE)" t) - (autoload 'magit-update-default-branch "magit-remote" nil t) +(autoload 'magit-update-default-branch "magit-remote" nil t) (autoload 'magit-remote-unshallow "magit-remote" "\ Convert a shallow remote into a full one. If only a single refspec is set and it does not contain a @@ -1613,7 +1618,7 @@ wildcard, then also offer to replace it with the standard refspec. (fn REMOTE)" t) - (autoload 'magit-remote-configure "magit-remote" nil t) +(autoload 'magit-remote-configure "magit-remote" nil t) (register-definition-prefixes "magit-remote" '("magit-")) @@ -1629,7 +1634,7 @@ repositories are displayed." t) ;;; Generated autoloads from magit-reset.el - (autoload 'magit-reset "magit" nil t) +(autoload 'magit-reset "magit" nil t) (autoload 'magit-reset-mixed "magit-reset" "\ Reset the `HEAD' and index to COMMIT, but not the working tree. @@ -1686,7 +1691,7 @@ Skip the stopped at commit during a cherry-pick or revert sequence." t) (autoload 'magit-sequencer-abort "magit-sequence" "\ Abort the current cherry-pick or revert sequence. This discards all changes made since the sequence started." t) - (autoload 'magit-cherry-pick "magit-sequence" nil t) +(autoload 'magit-cherry-pick "magit-sequence" nil t) (autoload 'magit-cherry-copy "magit-sequence" "\ Copy COMMITS from another branch onto the current branch. Prompt for a commit, defaulting to the commit at point. If @@ -1729,7 +1734,7 @@ If a conflict occurs, then you have to fix that and finish the process manually. (fn COMMITS BRANCH START-POINT &optional ARGS)" t) - (autoload 'magit-revert "magit-sequence" nil t) +(autoload 'magit-revert "magit-sequence" nil t) (autoload 'magit-revert-and-commit "magit-sequence" "\ Revert COMMIT by creating a new commit. Prompt for a commit, defaulting to the commit at point. If @@ -1744,7 +1749,7 @@ the region selects multiple commits, then revert all of them, without prompting. (fn COMMIT &optional ARGS)" t) - (autoload 'magit-am "magit-sequence" nil t) +(autoload 'magit-am "magit-sequence" nil t) (autoload 'magit-am-apply-patches "magit-sequence" "\ Apply the patches FILES. @@ -1760,9 +1765,9 @@ Skip the stopped at patch during a patch applying sequence." t) (autoload 'magit-am-abort "magit-sequence" "\ Abort the current patch applying sequence. This discards all changes made since the sequence started." t) - (autoload 'magit-rebase "magit-sequence" nil t) - (autoload 'magit-rebase-onto-pushremote "magit-sequence" nil t) - (autoload 'magit-rebase-onto-upstream "magit-sequence" nil t) +(autoload 'magit-rebase "magit-sequence" nil t) +(autoload 'magit-rebase-onto-pushremote "magit-sequence" nil t) +(autoload 'magit-rebase-onto-upstream "magit-sequence" nil t) (autoload 'magit-rebase-branch "magit-sequence" "\ Rebase the current branch onto a branch read in the minibuffer. All commits that are reachable from `HEAD' but not from the @@ -1815,7 +1820,7 @@ Abort the current rebase operation, restoring the original branch." t) ;;; Generated autoloads from magit-sparse-checkout.el - (autoload 'magit-sparse-checkout "magit-sparse-checkout" nil t) +(autoload 'magit-sparse-checkout "magit-sparse-checkout" nil t) (autoload 'magit-sparse-checkout-enable "magit-sparse-checkout" "\ Convert the working tree to a sparse checkout. @@ -1847,7 +1852,7 @@ restore the previous sparse checkout." t) ;;; Generated autoloads from magit-stash.el - (autoload 'magit-stash "magit-stash" nil t) +(autoload 'magit-stash "magit-stash" nil t) (autoload 'magit-stash-both "magit-stash" "\ Create a stash of the index and working tree. Untracked files are included according to infix arguments. @@ -1894,7 +1899,7 @@ One prefix argument is equivalent to `--include-untracked' while two prefix arguments are equivalent to `--all'. (fn &optional INCLUDE-UNTRACKED)" t) - (autoload 'magit-stash-push "magit-stash" nil t) +(autoload 'magit-stash-push "magit-stash" nil t) (autoload 'magit-stash-apply "magit-stash" "\ Apply a stash to the working tree. @@ -2055,17 +2060,17 @@ init file: (global-set-key (kbd \"C-x g\") \\='magit-status-quick)." t) ;;; Generated autoloads from magit-submodule.el - (autoload 'magit-submodule "magit-submodule" nil t) - (autoload 'magit-submodule-add "magit-submodule" nil t) +(autoload 'magit-submodule "magit-submodule" nil t) +(autoload 'magit-submodule-add "magit-submodule" nil t) (autoload 'magit-submodule-read-name-for-path "magit-submodule" "\ (fn PATH &optional PREFER-SHORT)") - (autoload 'magit-submodule-register "magit-submodule" nil t) - (autoload 'magit-submodule-populate "magit-submodule" nil t) - (autoload 'magit-submodule-update "magit-submodule" nil t) - (autoload 'magit-submodule-synchronize "magit-submodule" nil t) - (autoload 'magit-submodule-unpopulate "magit-submodule" nil t) +(autoload 'magit-submodule-register "magit-submodule" nil t) +(autoload 'magit-submodule-populate "magit-submodule" nil t) +(autoload 'magit-submodule-update "magit-submodule" nil t) +(autoload 'magit-submodule-synchronize "magit-submodule" nil t) +(autoload 'magit-submodule-unpopulate "magit-submodule" nil t) (autoload 'magit-submodule-remove "magit-submodule" "\ Unregister MODULES and remove their working directories. @@ -2109,9 +2114,9 @@ Display a list of the current repository's populated submodules." t) ;;; Generated autoloads from magit-subtree.el - (autoload 'magit-subtree "magit-subtree" nil t) - (autoload 'magit-subtree-import "magit-subtree" nil t) - (autoload 'magit-subtree-export "magit-subtree" nil t) +(autoload 'magit-subtree "magit-subtree" nil t) +(autoload 'magit-subtree-import "magit-subtree" nil t) +(autoload 'magit-subtree-export "magit-subtree" nil t) (autoload 'magit-subtree-add "magit-subtree" "\ Add REF from REPOSITORY as a new subtree at PREFIX. @@ -2141,7 +2146,7 @@ Extract the history of the subtree PREFIX. ;;; Generated autoloads from magit-tag.el - (autoload 'magit-tag "magit" nil t) +(autoload 'magit-tag "magit" nil t) (autoload 'magit-tag-create "magit-tag" "\ Create a new tag with the given NAME at COMMIT. With a prefix argument annotate the tag. @@ -2198,16 +2203,7 @@ either customize it (see the info node `Easy Customization') or call the function `magit-wip-mode'.") (custom-autoload 'magit-wip-mode "magit-wip" nil) (autoload 'magit-wip-mode "magit-wip" "\ -Save uncommitted changes to work-in-progress refs. - -Whenever appropriate (i.e., when dataloss would be a possibility -otherwise) this mode causes uncommitted changes to be committed -to dedicated work-in-progress refs. - -For historic reasons this mode is implemented on top of four -other `magit-wip-*' modes, which can also be used individually, -if you want finer control over when the wip refs are updated; -but that is discouraged. +Automatically save uncommitted changes to work-in-progress refs. This is a global minor mode. If called interactively, toggle the `Magit-Wip mode' mode. If the prefix argument is positive, enable the @@ -2224,116 +2220,12 @@ The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG)" t) -(put 'magit-wip-after-save-mode 'globalized-minor-mode t) -(defvar magit-wip-after-save-mode nil "\ -Non-nil if Magit-Wip-After-Save mode is enabled. -See the `magit-wip-after-save-mode' command -for a description of this minor mode. -Setting this variable directly does not take effect; -either customize it (see the info node `Easy Customization') -or call the function `magit-wip-after-save-mode'.") -(custom-autoload 'magit-wip-after-save-mode "magit-wip" nil) -(autoload 'magit-wip-after-save-mode "magit-wip" "\ -Toggle Magit-Wip-After-Save-Local mode in many buffers. -Specifically, Magit-Wip-After-Save-Local mode is enabled in all -buffers where `magit-wip-after-save-local-mode-turn-on' would do it. - -With prefix ARG, enable Magit-Wip-After-Save mode if ARG is positive; -otherwise, disable it. - -If called from Lisp, toggle the mode if ARG is `toggle'. -Enable the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -See `magit-wip-after-save-local-mode' for more information on -Magit-Wip-After-Save-Local mode. - -(fn &optional ARG)" t) -(defvar magit-wip-after-apply-mode nil "\ -Non-nil if Magit-Wip-After-Apply mode is enabled. -See the `magit-wip-after-apply-mode' command -for a description of this minor mode.") -(custom-autoload 'magit-wip-after-apply-mode "magit-wip" nil) -(autoload 'magit-wip-after-apply-mode "magit-wip" "\ -Commit to work-in-progress refs. - -After applying a change using any \"apply variant\" -command (apply, stage, unstage, discard, and reverse) commit the -affected files to the current wip refs. For each branch there -may be two wip refs; one contains snapshots of the files as found -in the worktree and the other contains snapshots of the entries -in the index. - -This is a global minor mode. If called interactively, toggle the -`Magit-Wip-After-Apply mode' mode. If the prefix argument is positive, -enable the mode, and if it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable the -mode if ARG is nil, omitted, or is a positive number. Disable the mode -if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `(default-value \\='magit-wip-after-apply-mode)'. - -The mode's hook is called both when the mode is enabled and when it is -disabled. - -(fn &optional ARG)" t) -(defvar magit-wip-before-change-mode nil "\ -Non-nil if Magit-Wip-Before-Change mode is enabled. -See the `magit-wip-before-change-mode' command -for a description of this minor mode.") -(custom-autoload 'magit-wip-before-change-mode "magit-wip" nil) -(autoload 'magit-wip-before-change-mode "magit-wip" "\ -Commit to work-in-progress refs before certain destructive changes. - -Before invoking a revert command or an \"apply variant\" -command (apply, stage, unstage, discard, and reverse) commit the -affected tracked files to the current wip refs. For each branch -there may be two wip refs; one contains snapshots of the files -as found in the worktree and the other contains snapshots of the -entries in the index. - -Only changes to files which could potentially be affected by the -command which is about to be called are committed. - -This is a global minor mode. If called interactively, toggle the -`Magit-Wip-Before-Change mode' mode. If the prefix argument is -positive, enable the mode, and if it is zero or negative, disable the -mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable the -mode if ARG is nil, omitted, or is a positive number. Disable the mode -if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `(default-value \\='magit-wip-before-change-mode)'. - -The mode's hook is called both when the mode is enabled and when it is -disabled. - -(fn &optional ARG)" t) -(autoload 'magit-wip-commit-initial-backup "magit-wip" "\ -Before saving, commit current file to a worktree wip ref. - -The user has to add this function to `before-save-hook'. - -Commit the current state of the visited file before saving the -current buffer to that file. This backs up the same version of -the file as `backup-buffer' would, but stores the backup in the -worktree wip ref, which is also used by the various Magit Wip -modes, instead of in a backup file as `backup-buffer' would. - -This function ignores the variables that affect `backup-buffer' -and can be used along-side that function, which is recommended -because this function only backs up files that are tracked in -a Git repository.") (register-definition-prefixes "magit-wip" '("magit-")) ;;; Generated autoloads from magit-worktree.el - (autoload 'magit-worktree "magit-worktree" nil t) +(autoload 'magit-worktree "magit-worktree" nil t) (autoload 'magit-worktree-checkout "magit-worktree" "\ Checkout COMMIT in a new worktree in DIRECTORY. COMMIT may, but does not have to be, a local branch. diff --git a/elpa/magit-20251103.1130/magit-autorevert.el b/elpa/magit-20251217.1836/magit-autorevert.el similarity index 73% rename from elpa/magit-20251103.1130/magit-autorevert.el rename to elpa/magit-20251217.1836/magit-autorevert.el index 564b9c0d..3b0c465a 100644 --- a/elpa/magit-20251103.1130/magit-autorevert.el +++ b/elpa/magit-20251217.1836/magit-autorevert.el @@ -29,10 +29,12 @@ ;;; Code: -(require 'magit-process) - (require 'autorevert) +(declare-function magit-file-tracked-p "magit-git" (file)) +(declare-function magit-toplevel "magit-git" (&optional directory)) +(declare-function magit-git-executable "magit-git" ()) + ;;; Options (defgroup magit-auto-revert nil @@ -104,18 +106,51 @@ seconds of user inactivity. That is not desirable." ;;; Mode +;;;###autoload +(progn ; magit-auto-revert-mode--initialize + (defun magit-auto-revert-mode--initialize (symbol value) + (internal--define-uninitialized-variable symbol) + (if (not load-file-name) + (custom-initialize-set symbol value) + ;; Bugs in package managers prevent the use of lexical + ;; bindings in autoloaded code. See #5476 and #5485. + (defalias 'magit-auto-revert-mode--after-load + (apply-partially + (lambda (symbol value mode-file file) + (when (equal file mode-file) + (remove-hook 'after-load-functions + 'magit-auto-revert-mode--after-load) + (fmakunbound 'magit-auto-revert-mode--after-load) + (if after-init-time + (custom-initialize-set symbol value) + ;; Delay activation in case the user disables the mode + ;; after loading this library but still during startup. + (defalias 'magit-auto-revert-mode--after-init + (apply-partially + (lambda (symbol value) + (remove-hook 'after-init-hook + 'magit-auto-revert-mode--after-init) + (fmakunbound 'magit-auto-revert-mode--after-init) + (custom-initialize-set symbol value)) + symbol value)) + (add-hook 'after-init-hook 'magit-auto-revert-mode--after-init)))) + symbol value load-file-name)) + (add-hook 'after-load-functions 'magit-auto-revert-mode--after-load)))) + (defun magit-turn-on-auto-revert-mode-if-desired (&optional file) (cond (file - (when-let ((buffer (find-buffer-visiting file))) - (with-current-buffer buffer - (magit-turn-on-auto-revert-mode-if-desired)))) + (let ((buffer (find-buffer-visiting file))) + (when buffer + (with-current-buffer buffer + (magit-turn-on-auto-revert-mode-if-desired))))) ((and (not auto-revert-mode) ; see #3014 (not global-auto-revert-mode) ; see #3460 buffer-file-name (or auto-revert-remote-files ; see #5422 (not (file-remote-p buffer-file-name))) (file-readable-p buffer-file-name) - (compat-call executable-find (magit-git-executable) t) + (require 'magit-process) + (executable-find (magit-git-executable) t) (magit-toplevel) (or (not magit-auto-revert-tracked-only) (magit-file-tracked-p buffer-file-name))) @@ -128,57 +163,20 @@ seconds of user inactivity. That is not desirable." :link '(info-link "(magit)Automatic Reverting of File-Visiting Buffers") :group 'magit-auto-revert :group 'magit-essentials - ;; - When `global-auto-revert-mode' is enabled, then this mode is - ;; redundant. - ;; - In all other cases enable the mode because if buffers are not - ;; automatically reverted that would make many very common tasks - ;; much more cumbersome. - :init-value (not (or global-auto-revert-mode - noninteractive))) -;; - Unfortunately `:init-value t' only sets the value of the mode -;; variable but does not cause the mode function to be called. -;; - I don't think it works like this on purpose, but since one usually -;; should not enable global modes by default, it is understandable. -;; - If the user has set the variable `magit-auto-revert-mode' to nil -;; after loading magit (instead of doing so before loading magit or -;; by using the function), then we should still respect that setting. -;; - If the user enables `global-auto-revert-mode' after loading magit -;; and after `after-init-hook' has run, then `magit-auto-revert-mode' -;; remains enabled; and there is nothing we can do about it. -;; - However if the init file causes `magit-autorevert' to be loaded -;; and only later it enables `global-auto-revert-mode', then we can -;; and should leave `magit-auto-revert-mode' disabled. -(defun magit-auto-revert-mode--init-kludge () - "This is an internal kludge to be used on `after-init-hook'. -Do not use this function elsewhere, and don't remove it from -the `after-init-hook'. For more information see the comments -and code surrounding the definition of this function." - (if (or (not magit-auto-revert-mode) - (and global-auto-revert-mode (not after-init-time))) - (magit-auto-revert-mode -1) - (let ((start (current-time))) - (magit-message "Turning on magit-auto-revert-mode...") - (magit-auto-revert-mode 1) - (magit-message - "Turning on magit-auto-revert-mode...done%s" - (let ((elapsed (float-time (time-since start)))) - (if (> elapsed 0.2) - (format " (%.3fs, %s buffers checked)" elapsed - (length (buffer-list))) - "")))))) -;; FIXME Suppressing this for recent 31.0.50 builds is not the -;; final solution. -(unless (fboundp 'custom-initialize-after-file-load) - (if after-init-time - ;; Since `after-init-hook' has already been - ;; run, turn the mode on or off right now. - (magit-auto-revert-mode--init-kludge) - ;; By the time the init file has been fully loaded the - ;; values of the relevant variables might have changed. - (add-hook 'after-init-hook #'magit-auto-revert-mode--init-kludge t))) + :init-value (not (or global-auto-revert-mode noninteractive)) + :initialize #'magit-auto-revert-mode--initialize) + +(defun magit-auto-revert-mode--disable () + "When enabling `global-auto-revert-mode', disable `magit-auto-revert-mode'." + (when (and global-auto-revert-mode + (bound-and-true-p magit-auto-revert-mode)) + (magit-auto-revert-mode -1))) + +(add-hook 'global-auto-revert-mode-hook #'magit-auto-revert-mode--disable) (put 'magit-auto-revert-mode 'function-documentation "Toggle Magit Auto Revert mode. + If called interactively, enable Magit Auto Revert mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and @@ -213,8 +211,11 @@ Like nearly every mode, this mode should be enabled or disabled by calling the respective mode function, the reason being that changing the state of a mode involves more than merely toggling a single switch, so setting the mode variable is not enough. -Also, you should not use `after-init-hook' to disable this mode.") +Also, you should not use `after-init-hook' to disable this mode. +\(fn &optional ARG)") + +;;;###autoload (defun magit-auto-revert-buffers () (when (and magit-auto-revert-immediately (or global-auto-revert-mode @@ -244,6 +245,7 @@ defaults to nil) for any BUFFER." (unless (and magit-auto-revert-toplevel (= (cdr magit-auto-revert-toplevel) magit-auto-revert-counter)) + (require 'magit-process) (setq magit-auto-revert-toplevel (cons (or (magit-toplevel) 'no-repo) magit-auto-revert-counter))) @@ -271,15 +273,5 @@ defaults to nil) for any BUFFER." ;;; _ (provide 'magit-autorevert) -;; Local Variables: -;; read-symbol-shorthands: ( -;; ("and$" . "cond-let--and$") -;; ("and>" . "cond-let--and>") -;; ("and-let" . "cond-let--and-let") -;; ("if-let" . "cond-let--if-let") -;; ("when-let" . "cond-let--when-let") -;; ("while-let" . "cond-let--while-let") -;; ("match-string" . "match-string") -;; ("match-str" . "match-string-no-properties")) -;; End: +;; `cond-let' intentionally not used. ;;; magit-autorevert.el ends here diff --git a/elpa/magit-20251103.1130/magit-base.el b/elpa/magit-20251217.1836/magit-base.el similarity index 99% rename from elpa/magit-20251103.1130/magit-base.el rename to elpa/magit-20251217.1836/magit-base.el index 99566a83..90a35d80 100644 --- a/elpa/magit-20251103.1130/magit-base.el +++ b/elpa/magit-20251217.1836/magit-base.el @@ -333,11 +333,11 @@ Global settings: for confirmation for any of these actions, you are still better of adding all of the respective symbols individually. - When `magit-wip-before-change-mode' is enabled then these actions - can fairly easily be undone: `discard', `reverse', - `stage-all-changes', and `unstage-all-changes'. If and only if - this mode is enabled, then `safe-with-wip' has the same effect - as adding all of these symbols individually." + When `magit-wip-mode' is enabled then these actions can fairly + easily be undone: `discard', `reverse', `stage-all-changes', and + `unstage-all-changes'. If and only if this mode is enabled, then + `safe-with-wip' has the same effect as adding all of these symbols + individually." :package-version '(magit . "2.1.0") :group 'magit-essentials :group 'magit-commands @@ -426,7 +426,7 @@ the ellipsis definition. Currently the only acceptable values for WHERE are `margin' or t (representing the default). Whether collapsed sections are indicated using ellipsis is -controlled by `magit-section-visibility-indicator'." +controlled by option `magit-section-visibility-indicators'." :package-version '(magit . "4.0.0") :group 'magit-miscellaneous :type '(repeat (list (symbol :tag "Where") @@ -799,7 +799,7 @@ ACTION is a member of option `magit-slow-confirm'." (y-or-n-p prompt))) (defvar magit--no-confirm-alist - '((safe-with-wip magit-wip-before-change-mode + '((safe-with-wip magit-wip-mode discard reverse stage-all-changes unstage-all-changes))) (cl-defun magit-confirm ( action &optional prompt prompt-n noabort @@ -880,10 +880,10 @@ See info node `(magit)Debugging Tools' for more information." ,@(mapcan (##list "-L" %) (delete-dups - (mapcan + (seq-keep (lambda (lib) (if-let ((path (locate-library lib))) - (list (file-name-directory path)) + (file-name-directory path) (error "Cannot find mandatory dependency %s" lib))) '(;; Like `LOAD_PATH' in `default.mk'. "compat" diff --git a/elpa/magit-20251103.1130/magit-bisect.el b/elpa/magit-20251217.1836/magit-bisect.el similarity index 99% rename from elpa/magit-20251103.1130/magit-bisect.el rename to elpa/magit-20251217.1836/magit-bisect.el index 6496510f..00e094ad 100644 --- a/elpa/magit-20251103.1130/magit-bisect.el +++ b/elpa/magit-20251217.1836/magit-bisect.el @@ -53,7 +53,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-bisect "magit-bisect" nil t) +;;;###autoload(autoload 'magit-bisect "magit-bisect" nil t) (transient-define-prefix magit-bisect () "Narrow in on the commit that introduced a bug." :man-page "git-bisect" diff --git a/elpa/magit-20251103.1130/magit-blame.el b/elpa/magit-20251217.1836/magit-blame.el similarity index 99% rename from elpa/magit-20251103.1130/magit-blame.el rename to elpa/magit-20251217.1836/magit-blame.el index bd0b444f..078188c2 100644 --- a/elpa/magit-20251103.1130/magit-blame.el +++ b/elpa/magit-20251217.1836/magit-blame.el @@ -761,7 +761,7 @@ modes is toggled, then this mode also gets toggled automatically. ;;; Commands -;;;###autoload (autoload 'magit-blame-echo "magit-blame" nil t) +;;;###autoload(autoload 'magit-blame-echo "magit-blame" nil t) (transient-define-suffix magit-blame-echo (args) "For each line show the revision in which it was added. Show the information about the chunk at point in the echo area @@ -785,7 +785,7 @@ not turn on `read-only-mode'." (read-only-mode -1) (magit-blame--update-overlays))) -;;;###autoload (autoload 'magit-blame-addition "magit-blame" nil t) +;;;###autoload(autoload 'magit-blame-addition "magit-blame" nil t) (transient-define-suffix magit-blame-addition (args) "For each line show the revision in which it was added." (interactive (list (magit-blame-arguments))) @@ -793,7 +793,7 @@ not turn on `read-only-mode'." (magit-blame--pre-blame-setup 'addition) (magit-blame--run args)) -;;;###autoload (autoload 'magit-blame-removal "magit-blame" nil t) +;;;###autoload(autoload 'magit-blame-removal "magit-blame" nil t) (transient-define-suffix magit-blame-removal (args) "For each line show the revision in which it was removed." :if-nil 'buffer-file-name @@ -804,7 +804,7 @@ not turn on `read-only-mode'." (magit-blame--pre-blame-setup 'removal) (magit-blame--run args)) -;;;###autoload (autoload 'magit-blame-reverse "magit-blame" nil t) +;;;###autoload(autoload 'magit-blame-reverse "magit-blame" nil t) (transient-define-suffix magit-blame-reverse (args) "For each line show the last revision in which it still exists." :if-nil 'buffer-file-name @@ -941,7 +941,7 @@ instead of the hash, like `kill-ring-save' would." ;;; Popup -;;;###autoload (autoload 'magit-blame "magit-blame" nil t) +;;;###autoload(autoload 'magit-blame "magit-blame" nil t) (transient-define-prefix magit-blame () "Show the commits that added or removed lines in the visited file." :man-page "git-blame" diff --git a/elpa/magit-20251103.1130/magit-bookmark.el b/elpa/magit-20251217.1836/magit-bookmark.el similarity index 100% rename from elpa/magit-20251103.1130/magit-bookmark.el rename to elpa/magit-20251217.1836/magit-bookmark.el diff --git a/elpa/magit-20251103.1130/magit-branch.el b/elpa/magit-20251217.1836/magit-branch.el similarity index 99% rename from elpa/magit-20251103.1130/magit-branch.el rename to elpa/magit-20251217.1836/magit-branch.el index 7e252d35..d7c29805 100644 --- a/elpa/magit-20251103.1130/magit-branch.el +++ b/elpa/magit-20251217.1836/magit-branch.el @@ -204,7 +204,7 @@ has to be used to view and change branch related variables." ;;; Commands -;;;###autoload (autoload 'magit-branch "magit" nil t) +;;;###autoload(autoload 'magit-branch "magit" nil t) (transient-define-prefix magit-branch (branch) "Add, configure or remove a branch." :man-page "git-branch" @@ -848,7 +848,7 @@ Also rename the respective reflog file." ;;; Configure -;;;###autoload (autoload 'magit-branch-configure "magit-branch" nil t) +;;;###autoload(autoload 'magit-branch-configure "magit-branch" nil t) (transient-define-prefix magit-branch-configure (branch) "Configure a branch." :man-page "git-branch" diff --git a/elpa/magit-20251103.1130/magit-bundle.el b/elpa/magit-20251217.1836/magit-bundle.el similarity index 97% rename from elpa/magit-20251103.1130/magit-bundle.el rename to elpa/magit-20251217.1836/magit-bundle.el index 5c739575..9ff8c711 100644 --- a/elpa/magit-20251103.1130/magit-bundle.el +++ b/elpa/magit-20251217.1836/magit-bundle.el @@ -33,7 +33,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-bundle "magit-bundle" nil t) +;;;###autoload(autoload 'magit-bundle "magit-bundle" nil t) (transient-define-prefix magit-bundle () "Create or verify Git bundles." :man-page "git-bundle" @@ -42,7 +42,7 @@ ("v" "verify" magit-bundle-verify) ("l" "list-heads" magit-bundle-list-heads)]) -;;;###autoload (autoload 'magit-bundle-import "magit-bundle" nil t) +;;;###autoload(autoload 'magit-bundle-import "magit-bundle" nil t) (transient-define-prefix magit-bundle-create (&optional file refs args) "Create a bundle." :man-page "git-bundle" diff --git a/elpa/magit-20251103.1130/magit-clone.el b/elpa/magit-20251217.1836/magit-clone.el similarity index 99% rename from elpa/magit-20251103.1130/magit-clone.el rename to elpa/magit-20251217.1836/magit-clone.el index dc7c827c..83e9db2e 100644 --- a/elpa/magit-20251103.1130/magit-clone.el +++ b/elpa/magit-20251217.1836/magit-clone.el @@ -123,7 +123,7 @@ directory where the repository has been cloned." ;;; Commands -;;;###autoload (autoload 'magit-clone "magit-clone" nil t) +;;;###autoload(autoload 'magit-clone "magit-clone" nil t) (transient-define-prefix magit-clone (&optional transient) "Clone a repository." :man-page "git-clone" diff --git a/elpa/magit-20251103.1130/magit-commit.el b/elpa/magit-20251217.1836/magit-commit.el similarity index 95% rename from elpa/magit-20251103.1130/magit-commit.el rename to elpa/magit-20251217.1836/magit-commit.el index c5a40146..53e845d7 100644 --- a/elpa/magit-20251103.1130/magit-commit.el +++ b/elpa/magit-20251217.1836/magit-commit.el @@ -71,20 +71,6 @@ an error while using those is harder to recover from." :group 'magit-commands :type 'boolean) -(defcustom magit-post-commit-hook nil - "Hook run after creating a commit without the user editing a message. - -This hook is run by `magit-refresh' if `this-command' is a member -of `magit-post-commit-hook-commands'. This only includes commands -named `magit-commit-*' that do *not* require that the user edits -the commit message in a buffer and then finishes by pressing -\\\\[with-editor-finish]. - -Also see `git-commit-post-finish-hook'." - :package-version '(magit . "2.90.0") - :group 'magit-commands - :type 'hook) - (defcustom magit-commit-diff-inhibit-same-window nil "Whether to inhibit use of same window when showing diff while committing. @@ -113,9 +99,47 @@ Also see https://github.com/magit/magit/issues/4132." :group 'magit-commands :type 'boolean) +(defvar magit-common-git-post-commit-functions nil + "Hook run by Git hooks `post-commit', `post-merge' and `post-rewrite'. + +This hook is run if `magit-overriding-githook-directory' is non-nil. +The functions are called with the same arguments as the Git hook. + +This hook is still experimental.") + +(defvar magit-git-post-commit-functions nil + "Hook run by Git hook `post-commit'. + +This hook is run if `magit-overriding-githook-directory' is non-nil. +The functions are called with the same arguments as the Git hook. + +See also `magit-common-git-post-commit-functions'. + +This hook is still experimental.") + +(defvar magit-git-post-merge-functions nil + "Hook run by Git hook `post-merge'. + +This hook is run if `magit-overriding-githook-directory' is non-nil. +The functions are called with the same arguments as the Git hook. + +See also `magit-common-git-post-commit-functions'. + +This hook is still experimental.") + +(defvar magit-git-post-rewrite-functions nil + "Hook run by Git hook `post-rewrite'. + +This hook is run if `magit-overriding-githook-directory' is non-nil. +The functions are called with the same arguments as the Git hook. + +See also `magit-common-git-post-commit-functions'. + +This hook is still experimental.") + ;;; Popup -;;;###autoload (autoload 'magit-commit "magit-commit" nil t) +;;;###autoload(autoload 'magit-commit "magit-commit" nil t) (transient-define-prefix magit-commit () "Create a new commit or replace an existing commit." :info-manual "(magit)Initiating a Commit" @@ -539,7 +563,7 @@ is updated: (magit-commit-absorb-modules 'run commit)) nil nil nil nil commit)))) -;;;###autoload (autoload 'magit-commit-absorb "magit-commit" nil t) +;;;###autoload(autoload 'magit-commit-absorb "magit-commit" nil t) (transient-define-prefix magit-commit-absorb (phase commit args) "Spread staged changes across recent commits. With a prefix argument use a transient command to select infix @@ -581,7 +605,7 @@ See `magit-commit-autofixup' for an alternative implementation." (transient-augment-suffix magit-commit-absorb :transient 'transient--do-exit) -;;;###autoload (autoload 'magit-commit-autofixup "magit-commit" nil t) +;;;###autoload(autoload 'magit-commit-autofixup "magit-commit" nil t) (transient-define-prefix magit-commit-autofixup (phase commit args) "Spread staged or unstaged changes across recent commits. @@ -637,20 +661,6 @@ an alternative implementation." :argument "--strict=" :reader #'transient-read-number-N0) -;;;; Hooks - -(defvar magit-post-commit-hook-commands - (list #'magit-commit-extend - #'magit-commit-fixup - #'magit-commit-augment - #'magit-commit-instant-fixup - #'magit-commit-instant-squash)) - -(defun magit-run-post-commit-hook () - (when (and (not this-command) - (memq last-command magit-post-commit-hook-commands)) - (run-hooks 'magit-post-commit-hook))) - ;;; Pending Diff (defun magit-commit-diff () @@ -811,6 +821,35 @@ actually insert the entry." (insert (format "(%s): \n" defun)) (backward-char))))))) +;;; Post Hook + +(defcustom magit-post-commit-hook nil + "Hook run after creating a commit without the user editing a message. + +This hook is run by `magit-refresh' if `this-command' is a member +of `magit-post-commit-hook-commands'. This only includes commands +named `magit-commit-*' that do *not* require that the user edits +the commit message in a buffer and then finishes by pressing +\\\\[with-editor-finish]. + +Also see `git-commit-post-finish-hook'." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type 'hook) + +(defvar magit-post-commit-hook-commands + (list #'magit-commit-extend + #'magit-commit-fixup + #'magit-commit-augment + #'magit-commit-instant-fixup + #'magit-commit-instant-squash)) + +;;;###autoload +(defun magit-run-post-commit-hook () + (when (and (not this-command) + (memq last-command magit-post-commit-hook-commands)) + (run-hooks 'magit-post-commit-hook))) + ;;; _ (provide 'magit-commit) ;; Local Variables: diff --git a/elpa/magit-20251103.1130/magit-core.el b/elpa/magit-20251217.1836/magit-core.el similarity index 100% rename from elpa/magit-20251103.1130/magit-core.el rename to elpa/magit-20251217.1836/magit-core.el diff --git a/elpa/magit-20251103.1130/magit-diff.el b/elpa/magit-20251217.1836/magit-diff.el similarity index 99% rename from elpa/magit-20251103.1130/magit-diff.el rename to elpa/magit-20251217.1836/magit-diff.el index 1b3d568c..3b6ff333 100644 --- a/elpa/magit-20251103.1130/magit-diff.el +++ b/elpa/magit-20251217.1836/magit-diff.el @@ -89,7 +89,7 @@ (declare-function magit-smerge-keep-base "magit-apply" ()) (declare-function magit-smerge-keep-lower "magit-apply" ()) -(eval-and-compile +(eval-and-compile ;declare slot names (cl-pushnew 'orig-rev eieio--known-slot-names) (cl-pushnew 'action-type eieio--known-slot-names) (cl-pushnew 'target eieio--known-slot-names)) @@ -935,7 +935,7 @@ and `:slant'." (magit-diff:--stat) (magit-diff:--show-signature)]) -;;;###autoload (autoload 'magit-diff "magit-diff" nil t) +;;;###autoload(autoload 'magit-diff "magit-diff" nil t) (transient-define-prefix magit-diff () "Show changes between different versions." :man-page "git-diff" @@ -951,7 +951,7 @@ and `:slant'." [("c" "Show commit" magit-show-commit) ("t" "Show stash" magit-stash-show)]]) -;;;###autoload (autoload 'magit-diff-refresh "magit-diff" nil t) +;;;###autoload(autoload 'magit-diff-refresh "magit-diff" nil t) (transient-define-prefix magit-diff-refresh () "Change the arguments used for the diff(s) in the current buffer." :man-page "git-diff" @@ -1794,19 +1794,19 @@ the Magit-Status buffer for DIRECTORY." (list new-rev new-file)))) (defun magit-diff-visit--position (buffer rev file goto-from goto-file) - (and-let ((hunk (magit-diff--hunk-section))) - (let ((line (magit-diff-hunk-line hunk goto-from)) - (column (magit-diff-hunk-column hunk goto-from))) - (with-current-buffer buffer - (when (and goto-file (not (equal rev "{worktree}"))) - (setq line (magit-diff-visit--offset - file (if (equal rev "{index}") nil rev) line))) - (save-restriction - (widen) - (goto-char (point-min)) - (forward-line (1- line)) - (move-to-column column) - (point)))))) + (and-let* ((hunk (magit-diff--hunk-section)) + (line (magit-diff-hunk-line hunk goto-from)) + (column (magit-diff-hunk-column hunk goto-from))) + (with-current-buffer buffer + (when (and goto-file (not (equal rev "{worktree}"))) + (setq line (magit-diff-visit--offset + file (if (equal rev "{index}") nil rev) line))) + (save-restriction + (widen) + (goto-char (point-min)) + (forward-line (1- line)) + (move-to-column column) + (point))))) (defun magit-diff-hunk-line (section goto-from) (save-excursion diff --git a/elpa/magit-20251103.1130/magit-dired.el b/elpa/magit-20251217.1836/magit-dired.el similarity index 100% rename from elpa/magit-20251103.1130/magit-dired.el rename to elpa/magit-20251217.1836/magit-dired.el diff --git a/elpa/magit-20251103.1130/magit-ediff.el b/elpa/magit-20251217.1836/magit-ediff.el similarity index 99% rename from elpa/magit-20251103.1130/magit-ediff.el rename to elpa/magit-20251217.1836/magit-ediff.el index 0390d452..015eade5 100644 --- a/elpa/magit-20251103.1130/magit-ediff.el +++ b/elpa/magit-20251217.1836/magit-ediff.el @@ -115,7 +115,7 @@ recommend you do not further complicate that by enabling this.") (defvar magit-ediff-previous-winconf nil) -;;;###autoload (autoload 'magit-ediff "magit-ediff" nil) +;;;###autoload(autoload 'magit-ediff "magit-ediff" nil) (transient-define-prefix magit-ediff () "Show differences using the Ediff package." :info-manual "(ediff)" diff --git a/elpa/magit-20251103.1130/magit-extras.el b/elpa/magit-20251217.1836/magit-extras.el similarity index 99% rename from elpa/magit-20251103.1130/magit-extras.el rename to elpa/magit-20251217.1836/magit-extras.el index 9e17129e..fce0ae13 100644 --- a/elpa/magit-20251103.1130/magit-extras.el +++ b/elpa/magit-20251217.1836/magit-extras.el @@ -42,7 +42,7 @@ ;;; Git Tools ;;;; Git-Mergetool -;;;###autoload (autoload 'magit-git-mergetool "magit-extras" nil t) +;;;###autoload(autoload 'magit-git-mergetool "magit-extras" nil t) (transient-define-prefix magit-git-mergetool (file args &optional transient) "Resolve conflicts in FILE using \"git mergetool --gui\". With a prefix argument allow changing ARGS using a transient @@ -279,7 +279,7 @@ with two prefix arguments remove ignored files only. (1 "untracked") (4 "untracked and ignored") (_ "ignored")))) - (magit-wip-commit-before-change) + (magit-run-before-change-functions nil "clean") (magit-run-git "clean" "-f" "-d" (pcase arg (4 "-x") (16 "-X"))))) (put 'magit-clean 'disabled t) diff --git a/elpa/magit-20251103.1130/magit-fetch.el b/elpa/magit-20251217.1836/magit-fetch.el similarity index 96% rename from elpa/magit-20251103.1130/magit-fetch.el rename to elpa/magit-20251217.1836/magit-fetch.el index 4a38da72..bbd136aa 100644 --- a/elpa/magit-20251103.1130/magit-fetch.el +++ b/elpa/magit-20251217.1836/magit-fetch.el @@ -30,7 +30,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-fetch "magit-fetch" nil t) +;;;###autoload(autoload 'magit-fetch "magit-fetch" nil t) (transient-define-prefix magit-fetch () "Fetch from another repository." :man-page "git-fetch" @@ -58,7 +58,7 @@ (run-hooks 'magit-credential-hook) (magit-run-git-async "fetch" remote args)) -;;;###autoload (autoload 'magit-fetch-from-pushremote "magit-fetch" nil t) +;;;###autoload(autoload 'magit-fetch-from-pushremote "magit-fetch" nil t) (transient-define-suffix magit-fetch-from-pushremote (args) "Fetch from the current push-remote. @@ -86,7 +86,7 @@ push-remote." (format "%s, replacing invalid" v)) ((format "%s, setting that" v))))) -;;;###autoload (autoload 'magit-fetch-from-upstream "magit-fetch" nil t) +;;;###autoload(autoload 'magit-fetch-from-upstream "magit-fetch" nil t) (transient-define-suffix magit-fetch-from-upstream (remote args) "Fetch from the \"current\" remote, usually the upstream. @@ -155,7 +155,7 @@ removed on the respective remote." (run-hooks 'magit-credential-hook) (magit-run-git-async "remote" "update")) -;;;###autoload (autoload 'magit-fetch-modules "magit-fetch" nil t) +;;;###autoload(autoload 'magit-fetch-modules "magit-fetch" nil t) (transient-define-prefix magit-fetch-modules (&optional transient args) "Fetch all populated submodules. diff --git a/elpa/magit-20251103.1130/magit-files.el b/elpa/magit-20251217.1836/magit-files.el similarity index 98% rename from elpa/magit-20251103.1130/magit-files.el rename to elpa/magit-20251217.1836/magit-files.el index 38f4beba..fde39225 100644 --- a/elpa/magit-20251103.1130/magit-files.el +++ b/elpa/magit-20251217.1836/magit-files.el @@ -211,8 +211,7 @@ is done using `magit-find-index-noselect'." (let ((index (make-temp-name (expand-file-name "magit-update-index-" (magit-gitdir)))) (buffer (current-buffer))) - (when magit-wip-before-change-mode - (magit-wip-commit-before-change (list file) " before un-/stage")) + (magit-run-before-change-functions file "un-/stage") (unwind-protect (progn (let ((coding-system-for-write buffer-file-coding-system)) @@ -229,8 +228,7 @@ is done using `magit-find-index-noselect'." file))) (ignore-errors (delete-file index))) (set-buffer-modified-p nil) - (when magit-wip-after-apply-mode - (magit-wip-commit-after-apply (list file) " after un-/stage"))) + (magit-run-after-apply-functions file "un-/stage")) (message "Abort"))) (when-let ((buffer (magit-get-mode-buffer 'magit-status-mode))) (with-current-buffer buffer @@ -289,7 +287,7 @@ directory, while reading the FILENAME." ;;; File Dispatch -;;;###autoload (autoload 'magit-file-dispatch "magit" nil t) +;;;###autoload(autoload 'magit-file-dispatch "magit" nil t) (transient-define-prefix magit-file-dispatch () "Invoke a Magit command that acts on the visited file. When invoked outside a file-visiting buffer, then fall back diff --git a/elpa/magit-20251103.1130/magit-git.el b/elpa/magit-20251217.1836/magit-git.el similarity index 94% rename from elpa/magit-20251103.1130/magit-git.el rename to elpa/magit-20251217.1836/magit-git.el index 73f64ee2..99fea61c 100644 --- a/elpa/magit-20251103.1130/magit-git.el +++ b/elpa/magit-20251217.1836/magit-git.el @@ -29,6 +29,7 @@ (require 'magit-base) (require 'format-spec) +(require 'server) ;; From `magit-branch'. (defvar magit-branch-prefer-remote-upstream) @@ -67,7 +68,7 @@ ;; From `magit-status'. (defvar magit-status-show-untracked-files) -(eval-and-compile +(eval-and-compile ;declare slot names (cl-pushnew 'orig-rev eieio--known-slot-names) (cl-pushnew 'number eieio--known-slot-names)) @@ -94,6 +95,13 @@ this." :type '(choice (coding-system :tag "Coding system to decode Git output") (const :tag "Use system default" nil))) +(defun magit--early-process-lines (program &rest args) + "Only used to initialize custom options." + (let ((process-environment + (append magit-git-environment process-environment))) + (ignore-error file-missing + (apply #'process-lines-ignore-status program args)))) + (defvar magit-git-w32-path-hack nil "Alist of (EXE . (PATHENTRY)). This specifies what additional PATH setting needs to be added to @@ -105,31 +113,29 @@ successfully.") ;; Avoid the wrappers "cmd/git.exe" and "cmd/git.cmd", ;; which are much slower than using "bin/git.exe" directly. (and-let ((exec (executable-find "git"))) - (ignore-errors - ;; Git for Windows 2.x provides cygpath so we can - ;; ask it for native paths. - (let* ((core-exe - (car - (process-lines - exec "-c" - "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x" - "X" "git"))) - (hack-entry (assoc core-exe magit-git-w32-path-hack)) - ;; Running the libexec/git-core executable - ;; requires some extra PATH entries. - (path-hack - (list (concat "PATH=" - (car (process-lines - exec "-c" - "alias.P=!cygpath -wp \"$PATH\"" - "P")))))) - ;; The defcustom STANDARD expression can be - ;; evaluated many times, so make sure it is - ;; idempotent. - (if hack-entry - (setcdr hack-entry path-hack) - (push (cons core-exe path-hack) magit-git-w32-path-hack)) - core-exe)))) + ;; Git for Windows 2.x provides cygpath so we can + ;; ask it for native paths. + (let* ((core-exe + (car (magit--early-process-lines + exec "-c" + "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x" + "X" "git"))) + (hack-entry (assoc core-exe magit-git-w32-path-hack)) + ;; Running the libexec/git-core executable + ;; requires some extra PATH entries. + (path-hack + (list (concat "PATH=" + (car (magit--early-process-lines + exec "-c" + "alias.P=!cygpath -wp \"$PATH\"" + "P")))))) + ;; The defcustom STANDARD expression can be + ;; evaluated many times, so make sure it is + ;; idempotent. + (if hack-entry + (setcdr hack-entry path-hack) + (push (cons core-exe path-hack) magit-git-w32-path-hack)) + core-exe))) (and (eq system-type 'darwin) (executable-find "git")) "git") @@ -148,9 +154,52 @@ option." :group 'magit-process :type 'string) +(defvar magit--overriding-githook-directory nil) + +(defcustom magit-overriding-githook-directory nil + "Directory containing the Git hook scripts used by Magit. + +No Magit-specific Git hook scripts are used if this is nil, which it +is the default. This feature is still experimental. + +Git does not allow overriding just an individual hook. It is only +possible to point Git at an alternative directory containing hook +scripts, using the Git variable `core.hooksPath'. When doing that, +the hooks located in `$GIT_DIR/hooks' are ignored. + +If `magit', use the directory containing Git hook scripts distributed +with Magit. To counteract Git's limited granularity, Magit provides a +script for every Git hook, most of which only run the respective script +located in `$GIT_DIR/hooks', provided it exists and is executable. + +A few Git hooks additionally run Lisp hooks: + +- `post-commit' runs `magit-git-post-commit-functions' +- `post-merge' runs `magit-git-post-merge-functions' +- `post-rewrite' runs `magit-git-post-rewrite-functions' + +All of these hooks also run `magit-common-git-post-rewrite-functions'. +For many uses this hook variable is more useful than the three above. + +If you want to teach additional Git hooks to run Lisp hooks, you have to +copy Magit's hook script directory elsewhere, modify the hook scripts in +question, and point this variable at the used directory. + +Magit only sets `core.hooksPath' when calling Git asynchronously. Doing +the same when calling Git synchronously would cause Git and Magit to wait +on one another." + :package-version '(magit . "4.5.0") + :group 'magit-process + :set (lambda (symbol value) + (set-default-toplevel-value symbol value) + (setq magit--overriding-githook-directory nil)) + :type '(choice (const :tag "Do not shadow Git's hook directory" nil) + (const :tag "Use Magit's hook directory" magit) + (directory :tag "Custom directory"))) + (defcustom magit-git-global-arguments `("--no-pager" "--literal-pathspecs" - "-c" "core.preloadindex=true" + "-c" "core.preloadIndex=true" "-c" "log.showSignature=false" "-c" "color.ui=false" "-c" "color.diff=false" @@ -331,17 +380,39 @@ is remote." magit-remote-git-executable magit-git-executable)) -(defun magit-process-git-arguments (args) +(defun magit-process-git-arguments--length () + (+ (length magit-git-global-arguments) + (if magit--overriding-githook-directory 2 0))) + +(defun magit-process-git-arguments (args &optional async) "Prepare ARGS for a function that invokes Git. Magit has many specialized functions for running Git; they all pass arguments through this function before handing them to Git, to do the following. -* Flatten ARGS, removing nil arguments. * Prepend `magit-git-global-arguments' to ARGS. -* On w32 systems, encode to `w32-ansi-code-page'." - (setq args (append magit-git-global-arguments (flatten-tree args))) +* If ASYNC is non-nil and `magit-overriding-githook-directory' is non-nil + and valid, set `core.hooksPath' by adding additional aguments to ARGS. +* Flatten ARGS, removing nil arguments. +* If `system-type' is `windows-nt', encode ARGS to `w32-ansi-code-page'." + (cond ((not async)) + (magit--overriding-githook-directory) + ((eq magit-overriding-githook-directory 'magit) + (setq magit--overriding-githook-directory + (expand-file-name "git-hooks" + (locate-dominating-file + (locate-library "magit.el") "git-hooks")))) + ((and magit-overriding-githook-directory + (file-directory-p magit-overriding-githook-directory)) + (setq magit--overriding-githook-directory + magit-overriding-githook-directory))) + (setq args + (append magit-git-global-arguments + (and magit--overriding-githook-directory + (list "-c" (format "core.hooksPath=%s" + magit--overriding-githook-directory))) + (flatten-tree args))) (if (and (eq system-type 'windows-nt) (boundp 'w32-ansi-code-page)) ;; On w32, the process arguments *must* be encoded in the ;; current code-page (see #3250). @@ -606,7 +677,7 @@ executable." (error "`git --exec-path' failed")))) exec-suffixes #'file-executable-p) - (compat-call executable-find command t))) + (executable-find command t))) ;;; Git Version @@ -953,7 +1024,7 @@ returning the truename." "(see https://magit.vc/goto/e6a78ed2)")) (defun magit--assert-usable-git () - (if (not (compat-call executable-find (magit-git-executable) t)) + (if (not (executable-find (magit-git-executable) t)) (signal 'magit-git-executable-not-found (magit-git-executable)) (let ((magit-git-debug (lambda (err) @@ -1093,12 +1164,12 @@ See also `magit-untracked-files'." ("all" 'all)) magit-status-show-untracked-files)) (_(not (eq value 'no)))) - (mapcan (##and (eq (aref % 0) ??) - (list (substring % 3))) - (apply #'magit-git-items "status" "-z" "--porcelain" - (format "--untracked-files=%s" - (if (eq value 'all) "all" "normal")) - "--" files)))) + (seq-keep (##and (eq (aref % 0) ??) + (substring % 3)) + (apply #'magit-git-items "status" "-z" "--porcelain" + (format "--untracked-files=%s" + (if (eq value 'all) "all" "normal")) + "--" files)))) (defun magit-ignored-files (&rest args) (magit-list-files "--others" "--ignored" "--exclude-standard" args)) @@ -1122,11 +1193,11 @@ See also `magit-untracked-files'." (magit-headish) "--" files)) (defun magit-binary-files (&rest args) - (mapcan (##and (string-match "^-\t-\t\\(.+\\)" %) - (list (match-str 1 %))) - (apply #'magit-git-items - "diff" "-z" "--numstat" "--ignore-submodules" - args))) + (seq-keep (##and (string-match "^-\t-\t\\(.+\\)" %) + (match-str 1 %)) + (apply #'magit-git-items + "diff" "-z" "--numstat" "--ignore-submodules" + args))) (defun magit-unmerged-files () (magit-git-items "diff-files" "-z" "--name-only" "--diff-filter=U")) @@ -1208,14 +1279,11 @@ or if no rename is detected." "Failed to parse Cygwin mount: %S" mount))) ;; If --exec-path is not a native Windows path, ;; then we probably have a cygwin git. - (let ((process-environment - (append magit-git-environment - process-environment))) - (and (not (string-match-p - "\\`[a-zA-Z]:" - (car (process-lines - magit-git-executable "--exec-path")))) - (ignore-errors (process-lines "mount"))))) + (and (not (string-match-p + "\\`[a-zA-Z]:" + (car (magit--early-process-lines + magit-git-executable "--exec-path")))) + (magit--early-process-lines "mount"))) #'> :key (pcase-lambda (`(,cyg . ,_win)) (length cyg)))) "Alist of (CYGWIN . WIN32) directory names. Sorted from longest to shortest CYGWIN name." @@ -2043,9 +2111,9 @@ When nil, use `magit-list-refs-sortby'. If both are nil, use (defun magit-list-remote-branch-names (&optional remote relative) (if (and remote relative) (let ((regexp (format "^refs/remotes/%s/\\(.+\\)" remote))) - (mapcan (##when (string-match regexp %) - (list (match-str 1 %))) - (magit-list-remote-branches remote))) + (seq-keep (##and (string-match regexp %) + (match-str 1 %)) + (magit-list-remote-branches remote))) (magit-list-refnames (concat "refs/remotes/" remote)))) (defun magit-format-refs (format &rest args) @@ -2102,9 +2170,9 @@ When nil, use `magit-list-refs-sortby'. If both are nil, use (defun magit-list-module-paths () (magit-with-toplevel - (mapcan (##and (string-match "^160000 [0-9a-z]\\{40,\\} 0\t\\(.+\\)$" %) - (list (match-str 1 %))) - (magit-git-items "ls-files" "-z" "--stage")))) + (seq-keep (##and (string-match "^160000 [0-9a-z]\\{40,\\} 0\t\\(.+\\)$" %) + (match-str 1 %)) + (magit-git-items "ls-files" "-z" "--stage")))) (defun magit-list-module-names () (mapcar #'magit-get-submodule-name (magit-list-module-paths))) @@ -2896,6 +2964,34 @@ out. Only existing branches can be selected." (magit-confirm t nil (format "%s %%d modules" verb) nil modules) (list (magit-read-module-path (format "%s module" verb) predicate))))) +;;; Git Hooks + +(defun magit-run-git-hook (githook &rest args) + (dolist (githook (ensure-list githook)) + (let* ((githook (symbol-name githook)) + (hook (save-match-data + (if (string-match "\\`common-" githook) + (intern (format "magit-common-git-%s-functions" + (substring githook (match-end 0)))) + (intern (format "magit-git-%s-functions" githook)))))) + (when (and (boundp hook) + (symbol-value hook)) + (magit--client-message "Running %s..." hook) + (apply #'run-hook-with-args hook args) + (magit--client-message "Running %s...done" hook)))) + ;; Emacsclient prints the returned value to stdout. We cannot prevent + ;; that, but we can use something that looks like we actually *wanted* + ;; to print (which we don't). + '---) + +(defun magit--client-message (format-string &rest args) + ;; See `server-process-filter'. + (let ((msg (format "-print %s\n" + (server-quote-arg + (apply #'format-message format-string args))))) + (dolist (client server-clients) + (server-send-string client msg)))) + ;;; _ (provide 'magit-git) ;; Local Variables: diff --git a/elpa/magit-20251103.1130/magit-gitignore.el b/elpa/magit-20251217.1836/magit-gitignore.el similarity index 99% rename from elpa/magit-20251103.1130/magit-gitignore.el rename to elpa/magit-20251217.1836/magit-gitignore.el index ef2bc7a3..8d2eaf29 100644 --- a/elpa/magit-20251103.1130/magit-gitignore.el +++ b/elpa/magit-20251217.1836/magit-gitignore.el @@ -30,7 +30,7 @@ ;;; Transient -;;;###autoload (autoload 'magit-gitignore "magit-gitignore" nil t) +;;;###autoload(autoload 'magit-gitignore "magit-gitignore" nil t) (transient-define-prefix magit-gitignore () "Instruct Git to ignore a file or pattern." :man-page "gitignore" diff --git a/elpa/magit-20251103.1130/magit-log.el b/elpa/magit-20251217.1836/magit-log.el similarity index 99% rename from elpa/magit-20251103.1130/magit-log.el rename to elpa/magit-20251217.1836/magit-log.el index 3e5b4fc9..c2345d26 100644 --- a/elpa/magit-20251103.1130/magit-log.el +++ b/elpa/magit-20251217.1836/magit-log.el @@ -31,7 +31,6 @@ (require 'magit-core) (require 'magit-diff) -(declare-function magit--any-wip-mode-enabled-p "magit-wip" ()) (declare-function magit-blob-visit "magit-files" (rev file)) (declare-function magit-cherry-apply "magit-sequence" (commit &optional args)) (declare-function magit-insert-head-branch-header "magit-status" @@ -514,7 +513,7 @@ commits before and half after." (eq major-mode 'magit-log-mode) t)) -;;;###autoload (autoload 'magit-log "magit-log" nil t) +;;;###autoload(autoload 'magit-log "magit-log" nil t) (transient-define-prefix magit-log () "Show a commit or reference log." :man-page "git-log" @@ -536,14 +535,14 @@ commits before and half after." ("r" "current" magit-reflog-current) ("O" "other" magit-reflog-other) ("H" "HEAD" magit-reflog-head)] - [:if magit--any-wip-mode-enabled-p + [:if-non-nil magit-wip-mode :description "Wiplog" ("i" "index" magit-wip-log-index) ("w" "worktree" magit-wip-log-worktree)] ["Other" ("s" "shortlog" magit-shortlog)]]) -;;;###autoload (autoload 'magit-log-refresh "magit-log" nil t) +;;;###autoload(autoload 'magit-log-refresh "magit-log" nil t) (transient-define-prefix magit-log-refresh () "Change the arguments used for the log(s) in the current buffer." :man-page "git-log" @@ -676,7 +675,7 @@ commits before and half after." "Read a string from the user to pass as parameter to OPTION." (magit-read-string (format "Type a pattern to pass to %s" option))) -;;;###autoload (autoload 'magit-log-current "magit-log" nil t) +;;;###autoload(autoload 'magit-log-current "magit-log" nil t) (transient-define-suffix magit-log-current (&optional args files) "Show log for the current branch, or `HEAD' if no branch is checked out." :description (##if (magit-get-current-branch) "current" "HEAD") @@ -989,7 +988,7 @@ of the current repository first; creating it if necessary." ;;;; Shortlog Commands -;;;###autoload (autoload 'magit-shortlog "magit-log" nil t) +;;;###autoload(autoload 'magit-shortlog "magit-log" nil t) (transient-define-prefix magit-shortlog () "Show a history summary." :man-page "git-shortlog" diff --git a/elpa/magit-20251103.1130/magit-margin.el b/elpa/magit-20251217.1836/magit-margin.el similarity index 99% rename from elpa/magit-20251103.1130/magit-margin.el rename to elpa/magit-20251217.1836/magit-margin.el index 841da400..9200c89b 100644 --- a/elpa/magit-20251103.1130/magit-margin.el +++ b/elpa/magit-20251217.1836/magit-margin.el @@ -161,7 +161,7 @@ does not carry to other options." (with-selected-window window (set-window-margins nil - (if (characterp (car magit-section-visibility-indicator)) + (if (characterp (car (magit-section-visibility-indicator))) 1 (car (window-margins))) (and (magit--right-margin-active) diff --git a/elpa/magit-20251103.1130/magit-merge.el b/elpa/magit-20251217.1836/magit-merge.el similarity index 99% rename from elpa/magit-20251103.1130/magit-merge.el rename to elpa/magit-20251217.1836/magit-merge.el index ae5a8203..4d276a58 100644 --- a/elpa/magit-20251103.1130/magit-merge.el +++ b/elpa/magit-20251217.1836/magit-merge.el @@ -33,7 +33,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-merge "magit" nil t) +;;;###autoload(autoload 'magit-merge "magit" nil t) (transient-define-prefix magit-merge () "Merge branches." :man-page "git-merge" diff --git a/elpa/magit-20251103.1130/magit-mode.el b/elpa/magit-20251217.1836/magit-mode.el similarity index 99% rename from elpa/magit-20251103.1130/magit-mode.el rename to elpa/magit-20251217.1836/magit-mode.el index f70d1db7..661fa4be 100644 --- a/elpa/magit-20251103.1130/magit-mode.el +++ b/elpa/magit-20251217.1836/magit-mode.el @@ -47,7 +47,7 @@ (declare-function elp-restore-all "elp" ()) (defvar magit--wip-inhibit-autosave) -(defvar magit-wip-after-save-local-mode) +(defvar magit-wip-mode) (declare-function magit-wip-get-ref "magit-wip" ()) (declare-function magit-wip-commit-worktree "magit-wip" (ref files msg)) @@ -93,6 +93,7 @@ inside your function." (defcustom magit-post-refresh-hook ;; Do not function-quote to avoid circular dependencies. + ;; Functions added here have to be autoloaded. '(magit-auto-revert-buffers magit-run-post-commit-hook magit-run-post-stage-hook @@ -1322,8 +1323,7 @@ argument (the prefix) non-nil means save all with no questions." (setq magit-inhibit-refresh-save t)) "to skip the current buffer and remember choice") ,@save-some-buffers-action-alist)) - ;; Create a single wip commit for all saved files, for - ;; which `magit-wip-after-save-local-mode' is enabled. + ;; Create a single wip commit for all saved files. (magit--wip-inhibit-autosave t) (saved nil)) (unwind-protect @@ -1332,7 +1332,7 @@ argument (the prefix) non-nil means save all with no questions." (lambda () (and (funcall magit-save-repository-buffers-predicate topdir) (prog1 t - (when magit-wip-after-save-local-mode + (when magit-wip-mode (push (expand-file-name buffer-file-name) saved)))))) (when saved (let ((default-directory topdir)) @@ -1509,10 +1509,10 @@ repositories." (cond-let ((eq repository 'all) (dolist (cache magit-repository-local-cache) - (setf cache (compat-call assoc-delete-all key cache)))) + (setf cache (assoc-delete-all key cache)))) ([cache (assoc (or repository (magit-repository-local-repository)) magit-repository-local-cache)] - (setf cache (compat-call assoc-delete-all key cache))))) + (setf cache (assoc-delete-all key cache))))) (defmacro magit--with-repository-local-cache (key &rest body) (declare (indent 1) (debug (form body))) diff --git a/elpa/magit-20251103.1130/magit-notes.el b/elpa/magit-20251217.1836/magit-notes.el similarity index 99% rename from elpa/magit-20251103.1130/magit-notes.el rename to elpa/magit-20251217.1836/magit-notes.el index d43be85f..2e7bf0b4 100644 --- a/elpa/magit-20251103.1130/magit-notes.el +++ b/elpa/magit-20251217.1836/magit-notes.el @@ -30,7 +30,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-notes "magit" nil t) +;;;###autoload(autoload 'magit-notes "magit" nil t) (transient-define-prefix magit-notes () "Edit notes attached to commits." :man-page "git-notes" diff --git a/elpa/magit-20251103.1130/magit-patch.el b/elpa/magit-20251217.1836/magit-patch.el similarity index 98% rename from elpa/magit-20251103.1130/magit-patch.el rename to elpa/magit-20251217.1836/magit-patch.el index 0d903635..7b0eea9a 100644 --- a/elpa/magit-20251103.1130/magit-patch.el +++ b/elpa/magit-20251217.1836/magit-patch.el @@ -52,7 +52,7 @@ the prefix argument." ;;; Commands -;;;###autoload (autoload 'magit-patch "magit-patch" nil t) +;;;###autoload(autoload 'magit-patch "magit-patch" nil t) (transient-define-prefix magit-patch () "Create or apply patches." ["Actions" @@ -62,7 +62,7 @@ the prefix argument." ("s" "Save diff as patch" magit-patch-save)] [("r" "Request pull" magit-request-pull)]]) -;;;###autoload (autoload 'magit-patch-create "magit-patch" nil t) +;;;###autoload(autoload 'magit-patch-create "magit-patch" nil t) (transient-define-prefix magit-patch-create (range args files) "Create patches for the commits in RANGE. When a single commit is given for RANGE, create a patch for the @@ -236,7 +236,7 @@ which creates patches for all commits that are reachable from :argument "--output-directory=" :reader #'transient-read-existing-directory) -;;;###autoload (autoload 'magit-patch-apply "magit-patch" nil t) +;;;###autoload(autoload 'magit-patch-apply "magit-patch" nil t) (transient-define-prefix magit-patch-apply (file &rest args) "Apply the patch file FILE." :man-page "git-apply" diff --git a/elpa/magit-20251103.1130/magit-pkg.el b/elpa/magit-20251217.1836/magit-pkg.el similarity index 84% rename from elpa/magit-20251103.1130/magit-pkg.el rename to elpa/magit-20251217.1836/magit-pkg.el index 4799f659..0995cf36 100644 --- a/elpa/magit-20251103.1130/magit-pkg.el +++ b/elpa/magit-20251217.1836/magit-pkg.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "magit" "20251103.1130" +(define-package "magit" "20251217.1836" "A Git porcelain inside Emacs." '((emacs "28.1") (compat "30.1") @@ -10,8 +10,8 @@ (transient "0.10") (with-editor "3.4")) :url "https://github.com/magit/magit" - :commit "84c5c8c8c6108f6a5dbae1f145518cbaa9ca7480" - :revdesc "84c5c8c8c610" + :commit "655bc502a3bdd7f07928524515a736e4b8101eaf" + :revdesc "655bc502a3bd" :keywords '("git" "tools" "vc") :authors '(("Marius Vollmer" . "marius.vollmer@gmail.com") ("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")) diff --git a/elpa/magit-20251103.1130/magit-process.el b/elpa/magit-20251217.1836/magit-process.el similarity index 98% rename from elpa/magit-20251103.1130/magit-process.el rename to elpa/magit-20251217.1836/magit-process.el index 7d4cc829..b47237ee 100644 --- a/elpa/magit-20251103.1130/magit-process.el +++ b/elpa/magit-20251217.1836/magit-process.el @@ -119,13 +119,8 @@ displays the text of `magit-process-error-summary' instead." "\\`\\(?:\\(?:/.*/\\)?git-credential-\\)?cache\\'" prog) (or (cadr (member "--socket" args)) (expand-file-name "~/.git-credential-cache/socket"))))) - ;; Note: `magit-process-file' is not yet defined when - ;; evaluating this form, so we use `process-lines'. - (ignore-errors - (let ((process-environment - (append magit-git-environment process-environment))) - (process-lines magit-git-executable - "config" "--get-all" "credential.helper")))) + (magit--early-process-lines + magit-git-executable "config" "--get-all" "credential.helper")) "If non-nil, start a credential cache daemon using this socket. When using Git's cache credential helper in the normal way, Emacs @@ -529,12 +524,26 @@ eol conversion." (default-process-coding-system (magit--process-coding-system))) (apply #'process-file process infile buffer display args))) +(defvar magit--shadowed-githook-directory nil) + +(defun magit--shadowed-githook-directory () + (or magit--shadowed-githook-directory + (setq magit--shadowed-githook-directory + (let ((magit-git-global-arguments nil)) + (cl-letf (((symbol-function 'magit-process-environment) + (lambda () process-environment))) + (or (magit-get "core.hooksPath") + (expand-file-name "hooks" (magit-gitdir)))))))) + (defun magit-process-environment () ;; The various w32 hacks are only applicable when running on the local ;; machine. A local binding of process-environment different from the ;; top-level value affects the environment used by Tramp. (let ((local (not (file-remote-p default-directory)))) (append magit-git-environment + (and magit-overriding-githook-directory + (list (concat "SHADOWED_GITHOOK_DIRECTORY=" + (magit--shadowed-githook-directory)))) (and local (cdr (assoc magit-git-executable magit-git-w32-path-hack))) (and local magit-need-cygwin-noglob @@ -574,7 +583,7 @@ flattened before use." (run-hooks 'magit-pre-call-git-hook) (pcase-let* ((process-environment (magit-process-environment)) (default-process-coding-system (magit--process-coding-system)) - (flat-args (magit-process-git-arguments args)) + (flat-args (magit-process-git-arguments args t)) (`(,process-buf . ,section) (magit-process-setup (magit-git-executable) flat-args)) (inhibit-read-only t)) @@ -657,7 +666,7 @@ See `magit-start-process' for more information." (run-hooks 'magit-pre-start-git-hook) (let ((default-process-coding-system (magit--process-coding-system))) (apply #'magit-start-process (magit-git-executable) input - (magit-process-git-arguments args)))) + (magit-process-git-arguments args t)))) (defun magit-start-process (program &optional input &rest args) "Start PROGRAM, prepare for refresh, and return the process object. @@ -730,7 +739,7 @@ Magit status buffer." process)) (defun magit-parse-git-async (&rest args) - (setq args (magit-process-git-arguments args)) + (setq args (magit-process-git-arguments args t)) (let ((command-buf (current-buffer)) (stdout-buf (generate-new-buffer " *git-stdout*")) (stderr-buf (generate-new-buffer " *git-stderr*")) @@ -797,7 +806,7 @@ Magit status buffer." (defun magit-process--format-arguments (program args) (cond ((and args (equal program (magit-git-executable))) - (let ((global (length magit-git-global-arguments))) + (let ((global (magit-process-git-arguments--length))) (concat (propertize (file-name-nondirectory program) 'font-lock-face 'magit-section-heading) @@ -869,7 +878,7 @@ Magit status buffer." `((commit . ,(magit-rev-parse "HEAD")) (,(pcase (car (seq-drop (process-command process) - (1+ (length magit-git-global-arguments)))) + (1+ (magit-process-git-arguments--length)))) ((or "rebase" "am") 'rebase-sequence) ((or "cherry-pick" "revert") 'sequence))) (status))))) @@ -1106,7 +1115,7 @@ as argument." (defun magit-process-set-mode-line (program args) "Display the git command (sans arguments) in the mode line." (when (equal program (magit-git-executable)) - (setq args (nthcdr (length magit-git-global-arguments) args))) + (setq args (nthcdr (magit-process-git-arguments--length) args))) (let ((str (concat " " (propertize (concat (file-name-nondirectory program) (and args (concat " " (car args)))) diff --git a/elpa/magit-20251103.1130/magit-pull.el b/elpa/magit-20251217.1836/magit-pull.el similarity index 97% rename from elpa/magit-20251103.1130/magit-pull.el rename to elpa/magit-20251217.1836/magit-pull.el index 17401cd7..507c6953 100644 --- a/elpa/magit-20251103.1130/magit-pull.el +++ b/elpa/magit-20251217.1836/magit-pull.el @@ -38,7 +38,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-pull "magit-pull" nil t) +;;;###autoload(autoload 'magit-pull "magit-pull" nil t) (transient-define-prefix magit-pull () "Pull from another repository." :man-page "git-pull" @@ -78,7 +78,7 @@ (defun magit-pull-arguments () (transient-args 'magit-pull)) -;;;###autoload (autoload 'magit-pull-from-pushremote "magit-pull" nil t) +;;;###autoload(autoload 'magit-pull-from-pushremote "magit-pull" nil t) (transient-define-suffix magit-pull-from-pushremote (args) "Pull from the push-remote of the current branch. @@ -106,7 +106,7 @@ push-remote." (format "%s, replacing invalid" v)) ((format "%s, setting that" v))))) -;;;###autoload (autoload 'magit-pull-from-upstream "magit-pull" nil t) +;;;###autoload(autoload 'magit-pull-from-upstream "magit-pull" nil t) (transient-define-suffix magit-pull-from-upstream (args) "Pull from the upstream of the current branch. diff --git a/elpa/magit-20251103.1130/magit-push.el b/elpa/magit-20251217.1836/magit-push.el similarity index 97% rename from elpa/magit-20251103.1130/magit-push.el rename to elpa/magit-20251217.1836/magit-push.el index 3c8c806a..24c25cb6 100644 --- a/elpa/magit-20251103.1130/magit-push.el +++ b/elpa/magit-20251217.1836/magit-push.el @@ -30,7 +30,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-push "magit-push" nil t) +;;;###autoload(autoload 'magit-push "magit-push" nil t) (transient-define-prefix magit-push () "Push to another repository." :man-page "git-push" @@ -73,7 +73,7 @@ (magit-run-git-async "push" "-v" args remote (format "%s:%s%s" branch namespace target)))) -;;;###autoload (autoload 'magit-push-current-to-pushremote "magit-push" nil t) +;;;###autoload(autoload 'magit-push-current-to-pushremote "magit-push" nil t) (transient-define-suffix magit-push-current-to-pushremote (args) "Push the current branch to its push-remote. @@ -109,7 +109,7 @@ argument the push-remote can be changed before pushed to it." (format "%s, replacing invalid" v)) ((format "%s, setting that" v))))) -;;;###autoload (autoload 'magit-push-current-to-upstream "magit-push" nil t) +;;;###autoload(autoload 'magit-push-current-to-upstream "magit-push" nil t) (transient-define-suffix magit-push-current-to-upstream (args) "Push the current branch to its upstream branch. @@ -263,7 +263,7 @@ branch as default." (run-hooks 'magit-credential-hook) (magit-run-git-async "push" remote ref args)) -;;;###autoload (autoload 'magit-push-implicitly "magit-push" nil t) +;;;###autoload(autoload 'magit-push-implicitly "magit-push" nil t) (transient-define-suffix magit-push-implicitly (args) "Push somewhere without using an explicit refspec. @@ -341,7 +341,7 @@ what this command will do. To add it use something like: ("matching" (format "all matching to %s" (magit--propertize-face remote 'bold))))))))) -;;;###autoload (autoload 'magit-push-to-remote "magit-push" nil t) +;;;###autoload(autoload 'magit-push-to-remote "magit-push" nil t) (transient-define-suffix magit-push-to-remote (remote args) "Push to REMOTE without using an explicit refspec. The REMOTE is read in the minibuffer. diff --git a/elpa/magit-20251103.1130/magit-reflog.el b/elpa/magit-20251217.1836/magit-reflog.el similarity index 100% rename from elpa/magit-20251103.1130/magit-reflog.el rename to elpa/magit-20251217.1836/magit-reflog.el diff --git a/elpa/magit-20251103.1130/magit-refs.el b/elpa/magit-20251217.1836/magit-refs.el similarity index 99% rename from elpa/magit-20251103.1130/magit-refs.el rename to elpa/magit-20251217.1836/magit-refs.el index 8a53dba0..a3371552 100644 --- a/elpa/magit-20251103.1130/magit-refs.el +++ b/elpa/magit-20251217.1836/magit-refs.el @@ -329,7 +329,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point. ;;; Commands -;;;###autoload (autoload 'magit-show-refs "magit-refs" nil t) +;;;###autoload(autoload 'magit-show-refs "magit-refs" nil t) (transient-define-prefix magit-show-refs (&optional transient) "List and compare references in a dedicated buffer." :man-page "git-branch" diff --git a/elpa/magit-20251103.1130/magit-remote.el b/elpa/magit-20251217.1836/magit-remote.el similarity index 98% rename from elpa/magit-20251103.1130/magit-remote.el rename to elpa/magit-20251217.1836/magit-remote.el index afcaeea4..42d2fcd8 100644 --- a/elpa/magit-20251103.1130/magit-remote.el +++ b/elpa/magit-20251217.1836/magit-remote.el @@ -62,7 +62,7 @@ has to be used to view and change remote related variables." ;;; Commands -;;;###autoload (autoload 'magit-remote "magit-remote" nil t) +;;;###autoload(autoload 'magit-remote "magit-remote" nil t) (transient-define-prefix magit-remote (remote) "Add, configure or remove a remote." :man-page "git-remote" @@ -253,7 +253,7 @@ Delete the symbolic-ref \"refs/remotes//HEAD\"." (interactive (list (magit-read-remote "Unset HEAD for remote"))) (magit-run-git "remote" "set-head" remote "--delete")) -;;;###autoload (autoload 'magit-update-default-branch "magit-remote" nil t) +;;;###autoload(autoload 'magit-update-default-branch "magit-remote" nil t) (transient-define-suffix magit-update-default-branch () "Update name of the default branch after upstream changed it." :description "Update default branch" @@ -305,7 +305,7 @@ refspec." ;;; Configure -;;;###autoload (autoload 'magit-remote-configure "magit-remote" nil t) +;;;###autoload(autoload 'magit-remote-configure "magit-remote" nil t) (transient-define-prefix magit-remote-configure (remote) "Configure a remote." :man-page "git-remote" diff --git a/elpa/magit-20251103.1130/magit-repos.el b/elpa/magit-20251217.1836/magit-repos.el similarity index 100% rename from elpa/magit-20251103.1130/magit-repos.el rename to elpa/magit-20251217.1836/magit-repos.el diff --git a/elpa/magit-20251103.1130/magit-reset.el b/elpa/magit-20251217.1836/magit-reset.el similarity index 94% rename from elpa/magit-20251103.1130/magit-reset.el rename to elpa/magit-20251217.1836/magit-reset.el index 4e8af09c..6bb74208 100644 --- a/elpa/magit-20251103.1130/magit-reset.el +++ b/elpa/magit-20251217.1836/magit-reset.el @@ -30,7 +30,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-reset "magit" nil t) +;;;###autoload(autoload 'magit-reset "magit" nil t) (transient-define-prefix magit-reset () "Reset the `HEAD', index and/or worktree to a previous state." :man-page "git-reset" @@ -89,10 +89,10 @@ head this effectively unstages all changes. "Reset the worktree to COMMIT. Keep the `HEAD' and index as-is." (interactive (list (magit-read-branch-or-commit "Reset worktree to"))) - (magit-wip-commit-before-change nil " before reset") + (magit-run-before-change-functions nil "reset") (magit-with-temp-index commit nil (magit-call-git "checkout-index" "--all" "--force")) - (magit-wip-commit-after-apply nil " after reset") + (magit-run-after-apply-functions nil "reset") (magit-refresh)) ;;;###autoload @@ -127,10 +127,10 @@ or \"detached head\" will be substituted for %s." (git-commit-setup-font-lock) (git-commit-save-message))) (let ((cmd (if (and (equal commit "HEAD") (not arg)) "unstage" "reset"))) - (magit-wip-commit-before-change nil (concat " before " cmd)) + (magit-run-before-change-functions nil cmd) (magit-run-git "reset" arg commit "--" path) (when (equal cmd "unstage") - (magit-wip-commit-after-apply nil " after unstage")))) + (magit-run-after-apply-functions nil "unstage")))) ;;; _ (provide 'magit-reset) diff --git a/elpa/magit-20251103.1130/magit-sequence.el b/elpa/magit-20251217.1836/magit-sequence.el similarity index 97% rename from elpa/magit-20251103.1130/magit-sequence.el rename to elpa/magit-20251217.1836/magit-sequence.el index 97f15634..d3af3ad0 100644 --- a/elpa/magit-20251103.1130/magit-sequence.el +++ b/elpa/magit-20251217.1836/magit-sequence.el @@ -32,11 +32,14 @@ ;; For `magit-rebase--todo'. (declare-function git-rebase-current-line "git-rebase" (&optional batch)) -(eval-and-compile - (cl-pushnew 'action-type eieio--known-slot-names) + +(eval-and-compile ;declare slot names + (cl-pushnew 'abbrev eieio--known-slot-names) (cl-pushnew 'action eieio--known-slot-names) (cl-pushnew 'action-options eieio--known-slot-names) - (cl-pushnew 'target eieio--known-slot-names)) + (cl-pushnew 'action-type eieio--known-slot-names) + (cl-pushnew 'target eieio--known-slot-names) + (cl-pushnew 'trailer eieio--known-slot-names)) ;;; Options ;;;; Faces @@ -131,7 +134,7 @@ This discards all changes made since the sequence started." (defvar magit-perl-executable "perl" "The Perl executable.") -;;;###autoload (autoload 'magit-cherry-pick "magit-sequence" nil t) +;;;###autoload(autoload 'magit-cherry-pick "magit-sequence" nil t) (transient-define-prefix magit-cherry-pick () "Apply or transplant commits." :man-page "git-cherry-pick" @@ -365,7 +368,7 @@ the process manually." ;;; Revert -;;;###autoload (autoload 'magit-revert "magit-sequence" nil t) +;;;###autoload(autoload 'magit-revert "magit-sequence" nil t) (transient-define-prefix magit-revert () "Revert existing commits, with or without creating new commits." :man-page "git-revert" @@ -422,7 +425,7 @@ without prompting." ;;; Patch -;;;###autoload (autoload 'magit-am "magit-sequence" nil t) +;;;###autoload(autoload 'magit-am "magit-sequence" nil t) (transient-define-prefix magit-am () "Apply patches received by email." :man-page "git-am" @@ -516,7 +519,7 @@ This discards all changes made since the sequence started." ;;; Rebase -;;;###autoload (autoload 'magit-rebase "magit-sequence" nil t) +;;;###autoload(autoload 'magit-rebase "magit-sequence" nil t) (transient-define-prefix magit-rebase () "Transplant commits and/or modify existing commits." :man-page "git-rebase" @@ -584,7 +587,7 @@ This discards all changes made since the sequence started." (defun magit-git-rebase (target args) (magit-run-git-sequencer "rebase" args target)) -;;;###autoload (autoload 'magit-rebase-onto-pushremote "magit-sequence" nil t) +;;;###autoload(autoload 'magit-rebase-onto-pushremote "magit-sequence" nil t) (transient-define-suffix magit-rebase-onto-pushremote (args) "Rebase the current branch onto its push-remote branch. @@ -598,7 +601,7 @@ push-remote." (magit--select-push-remote "rebase onto that"))) (magit-git-rebase (concat remote "/" branch) args))) -;;;###autoload (autoload 'magit-rebase-onto-upstream "magit-sequence" nil t) +;;;###autoload(autoload 'magit-rebase-onto-upstream "magit-sequence" nil t) (transient-define-suffix magit-rebase-onto-upstream (args) "Rebase the current branch onto its upstream branch. @@ -664,19 +667,17 @@ START has to be selected from a list of recent commits." (concat "Type %p on a commit to rebase it " "and commits above it onto " newbase ","))))) -(defvar magit-rebase-interactive-include-selected t) - (defun magit-rebase-interactive-1 - (commit args message &optional editor delay-edit-confirm noassert confirm) + ( commit args message + &optional editor delay-edit-confirm noassert confirm exact) (declare (indent 2)) - (when commit - (unless (magit-rev-ancestor-p commit "HEAD") - (user-error "%s isn't an ancestor of HEAD" commit)) - (if (magit-commit-parents commit) - (when (or (not (eq this-command 'magit-rebase-interactive)) - magit-rebase-interactive-include-selected) - (setq commit (concat commit "^"))) - (setq args (cons "--root" args)))) + (cond ((not commit)) + ((not (magit-rev-ancestor-p commit "HEAD")) + (user-error "%s isn't an ancestor of HEAD" commit)) + ((not (magit-commit-parents commit)) + (setq args (cons "--root" args))) + ((not exact) + (setq commit (concat commit "^")))) (when (and commit (not noassert)) (setq commit (magit-rebase-interactive-assert commit delay-edit-confirm @@ -742,6 +743,8 @@ START has to be selected from a list of recent commits." ;; The "--root" argument is being used. since)) +(defvar magit-rebase-interactive-include-selected t) + ;;;###autoload (defun magit-rebase-interactive (commit args) "Start an interactive rebase sequence." @@ -749,7 +752,8 @@ START has to be selected from a list of recent commits." (magit-rebase-arguments))) (magit-rebase-interactive-1 commit args "Type %p on a commit to rebase it and all commits above it," - nil t)) + nil t nil nil + (not magit-rebase-interactive-include-selected))) ;;;###autoload (defun magit-rebase-autosquash (select args) @@ -765,7 +769,7 @@ argument, prompt for the first commit to potentially squash into." (magit-git-string "merge-base" upstream "HEAD")) (nconc (list "--autosquash" "--keep-empty") args) "Type %p on a commit to squash into it and then rebase as necessary," - "true" nil t)) + "true" nil t nil t)) ;;;###autoload (defun magit-rebase-edit-commit (commit args) diff --git a/elpa/magit-20251103.1130/magit-sparse-checkout.el b/elpa/magit-20251217.1836/magit-sparse-checkout.el similarity index 98% rename from elpa/magit-20251103.1130/magit-sparse-checkout.el rename to elpa/magit-20251217.1836/magit-sparse-checkout.el index 8fb9e59a..34bccf19 100644 --- a/elpa/magit-20251103.1130/magit-sparse-checkout.el +++ b/elpa/magit-20251217.1836/magit-sparse-checkout.el @@ -54,7 +54,7 @@ See the `git sparse-checkout' manpage for details about ;;; Commands -;;;###autoload (autoload 'magit-sparse-checkout "magit-sparse-checkout" nil t) +;;;###autoload(autoload 'magit-sparse-checkout "magit-sparse-checkout" nil t) (transient-define-prefix magit-sparse-checkout () "Create and manage sparse checkouts." :man-page "git-sparse-checkout" diff --git a/elpa/magit-20251103.1130/magit-stash.el b/elpa/magit-20251217.1836/magit-stash.el similarity index 99% rename from elpa/magit-20251103.1130/magit-stash.el rename to elpa/magit-20251217.1836/magit-stash.el index 456cb624..7a3e7dde 100644 --- a/elpa/magit-20251103.1130/magit-stash.el +++ b/elpa/magit-20251217.1836/magit-stash.el @@ -87,7 +87,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the author ;;; Commands -;;;###autoload (autoload 'magit-stash "magit-stash" nil t) +;;;###autoload(autoload 'magit-stash "magit-stash" nil t) (transient-define-prefix magit-stash () "Stash uncommitted changes." :man-page "git-stash" @@ -234,7 +234,7 @@ while two prefix arguments are equivalent to `--all'." (magit-stash-save (concat "WIP on " (magit-stash-summary)) index worktree untracked refresh t)) -;;;###autoload (autoload 'magit-stash-push "magit-stash" nil t) +;;;###autoload(autoload 'magit-stash-push "magit-stash" nil t) (transient-define-prefix magit-stash-push (&optional transient args) "Create stash using \"git stash push\". diff --git a/elpa/magit-20251103.1130/magit-status.el b/elpa/magit-20251217.1836/magit-status.el similarity index 99% rename from elpa/magit-20251103.1130/magit-status.el rename to elpa/magit-20251217.1836/magit-status.el index 0ac1169a..b9638644 100644 --- a/elpa/magit-20251103.1130/magit-status.el +++ b/elpa/magit-20251217.1836/magit-status.el @@ -28,6 +28,8 @@ (require 'magit) +(declare-function magit-dired-jump "magit-dired" (&optional other-window)) + ;;; Options (defgroup magit-status nil diff --git a/elpa/magit-20251103.1130/magit-submodule.el b/elpa/magit-20251217.1836/magit-submodule.el similarity index 98% rename from elpa/magit-20251103.1130/magit-submodule.el rename to elpa/magit-20251217.1836/magit-submodule.el index 0c0a4d6a..c3c6a88f 100644 --- a/elpa/magit-20251103.1130/magit-submodule.el +++ b/elpa/magit-20251217.1836/magit-submodule.el @@ -158,7 +158,7 @@ and also setting this variable to t will lead to tears." ;;; Popup -;;;###autoload (autoload 'magit-submodule "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule "magit-submodule" nil t) (transient-define-prefix magit-submodule () "Act on a submodule." :man-page "git-submodule" @@ -205,7 +205,7 @@ and also setting this variable to t will lead to tears." (propertize "|" 'face 'transient-inactive-argument)))) (cl-call-next-method obj)))) -;;;###autoload (autoload 'magit-submodule-add "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-add "magit-submodule" nil t) (transient-define-suffix magit-submodule-add (url &optional path name args) "Add the repository at URL as a module. @@ -262,7 +262,7 @@ it is nil, then PATH also becomes the name." (magit-git-lines "config" "--list" "-f" ".gitmodules")) (if prefer-short name path))))) -;;;###autoload (autoload 'magit-submodule-register "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-register "magit-submodule" nil t) (transient-define-suffix magit-submodule-register (modules) "Register MODULES. @@ -281,7 +281,7 @@ single module from the user." (magit-with-toplevel (magit-run-git-async "submodule" "init" "--" modules))) -;;;###autoload (autoload 'magit-submodule-populate "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-populate "magit-submodule" nil t) (transient-define-suffix magit-submodule-populate (modules args) "Create MODULES working directories, checking out the recorded commits. @@ -300,7 +300,7 @@ single module from the user." (magit-with-toplevel (magit-run-git-async "submodule" "update" "--init" args "--" modules))) -;;;###autoload (autoload 'magit-submodule-update "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-update "magit-submodule" nil t) (transient-define-suffix magit-submodule-update (modules args) "Update MODULES by checking out the recorded commits. @@ -323,7 +323,7 @@ single module from the user." (magit-with-toplevel (magit-run-git-async "submodule" "update" args "--" modules))) -;;;###autoload (autoload 'magit-submodule-synchronize "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-synchronize "magit-submodule" nil t) (transient-define-suffix magit-submodule-synchronize (modules args) "Synchronize url configuration of MODULES. @@ -339,7 +339,7 @@ single module from the user." (magit-with-toplevel (magit-run-git-async "submodule" "sync" args "--" modules))) -;;;###autoload (autoload 'magit-submodule-unpopulate "magit-submodule" nil t) +;;;###autoload(autoload 'magit-submodule-unpopulate "magit-submodule" nil t) (transient-define-suffix magit-submodule-unpopulate (modules args) "Remove working directories of MODULES. diff --git a/elpa/magit-20251103.1130/magit-subtree.el b/elpa/magit-20251217.1836/magit-subtree.el similarity index 97% rename from elpa/magit-20251103.1130/magit-subtree.el rename to elpa/magit-20251217.1836/magit-subtree.el index 5f2bf3c5..a94d0559 100644 --- a/elpa/magit-20251103.1130/magit-subtree.el +++ b/elpa/magit-20251217.1836/magit-subtree.el @@ -33,7 +33,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-subtree "magit-subtree" nil t) +;;;###autoload(autoload 'magit-subtree "magit-subtree" nil t) (transient-define-prefix magit-subtree () "Import or export subtrees." :man-page "git-subtree" @@ -41,7 +41,7 @@ ("i" "Import" magit-subtree-import) ("e" "Export" magit-subtree-export)]) -;;;###autoload (autoload 'magit-subtree-import "magit-subtree" nil t) +;;;###autoload(autoload 'magit-subtree-import "magit-subtree" nil t) (transient-define-prefix magit-subtree-import () "Import subtrees." :man-page "git-subtree" @@ -55,7 +55,7 @@ [("m" "Merge" magit-subtree-merge) ("f" "Pull" magit-subtree-pull)]]) -;;;###autoload (autoload 'magit-subtree-export "magit-subtree" nil t) +;;;###autoload(autoload 'magit-subtree-export "magit-subtree" nil t) (transient-define-prefix magit-subtree-export () "Export subtrees." :man-page "git-subtree" diff --git a/elpa/magit-20251103.1130/magit-tag.el b/elpa/magit-20251217.1836/magit-tag.el similarity index 93% rename from elpa/magit-20251103.1130/magit-tag.el rename to elpa/magit-20251217.1836/magit-tag.el index b73b29b7..8847d3bf 100644 --- a/elpa/magit-20251103.1130/magit-tag.el +++ b/elpa/magit-20251217.1836/magit-tag.el @@ -33,7 +33,7 @@ ;;; Commands -;;;###autoload (autoload 'magit-tag "magit" nil t) +;;;###autoload(autoload 'magit-tag "magit" nil t) (transient-define-prefix magit-tag () "Create or delete a tag." :man-page "git-tag" @@ -225,17 +225,16 @@ a tag qualifies as a release tag." (mapcar #'cdr (nreverse - (cl-sort (mapcan + (cl-sort (seq-keep (lambda (line) - (and (string-match " +" line) - (let ((tag (substring line 0 (match-beginning 0))) - (msg (substring line (match-end 0)))) - (and (string-match magit-release-tag-regexp tag) - (let ((ver (match-str 2 tag)) - (version-regexp-alist - magit-tag-version-regexp-alist)) - (list (list (version-to-list ver) - ver tag msg))))))) + (and-let* + ((_(string-match " +" line)) + (tag (substring line 0 (match-beginning 0))) + (msg (substring line (match-end 0))) + (_(string-match magit-release-tag-regexp tag)) + (ver (match-str 2 tag)) + (version-regexp-alist magit-tag-version-regexp-alist)) + (list (version-to-list ver) ver tag msg))) ;; Cannot rely on "--sort=-version:refname" because ;; that gets confused if the version prefix has changed. (magit-git-lines "tag" "-n")) diff --git a/elpa/magit-20251103.1130/magit-transient.el b/elpa/magit-20251217.1836/magit-transient.el similarity index 100% rename from elpa/magit-20251103.1130/magit-transient.el rename to elpa/magit-20251217.1836/magit-transient.el diff --git a/elpa/magit-20251103.1130/magit-wip.el b/elpa/magit-20251217.1836/magit-wip.el similarity index 62% rename from elpa/magit-20251103.1130/magit-wip.el rename to elpa/magit-20251217.1836/magit-wip.el index b42fdd36..51c64a13 100644 --- a/elpa/magit-20251103.1130/magit-wip.el +++ b/elpa/magit-20251217.1836/magit-wip.el @@ -57,10 +57,24 @@ never garbage collected. If nil and the current branch has new commits, then the wip ref is reset to the tip of the branch before creating a new wip commit. With this setting wip commits are eventually garbage -collected. This is currently the default." +collected. This is currently the default. + +If `immediately', then use `git-commit-post-finish-hook' to +create the merge commit. This is discouraged because it can +lead to a race condition, e.g., during rebases. + +If `githook', then use `magit-common-git-post-commit-hook' to +create the merge commit. This uses the experimental support for +calling Lisp hooks from Git hooks, which is disabled by default, +Customize `magit-overriding-githook-directory' to enable use of +Git hooks." :package-version '(magit . "2.90.0") :group 'magit-wip - :type 'boolean) + :type '(choice + (const :tag "Yes (safely, just in time)" t) + (const :tag "Yes (immediately, with race condition)" immediately) + (const :tag "Yes (using experimental Git hook support)" githook) + (const :tag "No" nil))) (defcustom magit-wip-namespace "refs/wip/" "Namespace used for work-in-progress refs. @@ -72,176 +86,67 @@ is used as `branch-ref'." :group 'magit-wip :type 'string) -;;; Modes +(defcustom magit-wip-debug nil + "Whether to record commands used to update wip refs. +If non-nil, log the used commands and their output in the process +buffer." + :package-version '(magit . "4.5.0") + :group 'magit-wip + :type 'boolean) + +;;; Mode -(defvar magit--wip-activation-cache nil) (defvar magit--wip-inhibit-autosave nil) ;;;###autoload (define-minor-mode magit-wip-mode - "Save uncommitted changes to work-in-progress refs. - -Whenever appropriate (i.e., when dataloss would be a possibility -otherwise) this mode causes uncommitted changes to be committed -to dedicated work-in-progress refs. - -For historic reasons this mode is implemented on top of four -other `magit-wip-*' modes, which can also be used individually, -if you want finer control over when the wip refs are updated; -but that is discouraged." + "Automatically save uncommitted changes to work-in-progress refs." :package-version '(magit . "2.90.0") :lighter magit-wip-mode-lighter :global t - (let ((arg (if magit-wip-mode 1 -1))) - (let ((magit--wip-activation-cache (list t))) - (magit-wip-after-save-mode arg)) - (magit-wip-after-apply-mode arg) - (magit-wip-before-change-mode arg) - (magit-wip-initial-backup-mode arg))) - -(define-minor-mode magit-wip-after-save-local-mode - "After saving, also commit to a worktree work-in-progress ref. - -After saving the current file-visiting buffer this mode also -commits the changes to the worktree work-in-progress ref for -the current branch. - -This mode should be enabled globally by turning on the globalized -variant `magit-wip-after-save-mode'." - :package-version '(magit . "2.1.0") - (if magit-wip-after-save-local-mode - (if (and buffer-file-name (magit-inside-worktree-p t)) - (add-hook 'after-save-hook #'magit-wip-commit-buffer-file t t) - (setq magit-wip-after-save-local-mode nil) - (user-error "Need a worktree and a file")) - (remove-hook 'after-save-hook #'magit-wip-commit-buffer-file t))) - -(defun magit-wip-after-save-local-mode-turn-on () - (when (cond-let - ((not buffer-file-name) - nil) - ((not magit--wip-activation-cache) - (and (magit-inside-worktree-p t) - (magit-file-tracked-p buffer-file-name))) - ([elt (assoc default-directory - magit--wip-activation-cache)] - (and-let ((top (cadr elt))) - (member (file-relative-name buffer-file-name top) - (cddr elt)))) - ([top (magit-toplevel)] - (let (files) - (if-let ((elt (assoc top magit--wip-activation-cache))) - (setq files (cddr elt)) - (setq files (let ((default-directory top)) - (magit-tracked-files))) - (push `(,top ,top ,@files) - magit--wip-activation-cache) - (unless (eq default-directory top) - (push `(,default-directory ,top ,@files) - magit--wip-activation-cache))) - (member (file-relative-name buffer-file-name) files))) - (t - (push (list default-directory nil) - magit--wip-activation-cache) - nil)) - (magit-wip-after-save-local-mode))) - -;;;###autoload -(define-globalized-minor-mode magit-wip-after-save-mode - magit-wip-after-save-local-mode magit-wip-after-save-local-mode-turn-on - :package-version '(magit . "2.1.0") - :group 'magit-wip) + (cond + (magit-wip-mode + (add-hook 'after-save-hook #'magit-wip-commit-buffer-file) + (add-hook 'magit-after-apply-functions #'magit-wip-commit) + (add-hook 'magit-before-change-functions #'magit-wip-commit) + (add-hook 'before-save-hook #'magit-wip-commit-initial-backup) + (add-hook 'magit-common-git-post-commit-functions #'magit-wip-post-commit) + (add-hook 'git-commit-post-finish-hook #'magit-wip-commit-post-editmsg)) + (t + (remove-hook 'after-save-hook #'magit-wip-commit-buffer-file) + (remove-hook 'magit-after-apply-functions #'magit-wip-commit) + (remove-hook 'magit-before-change-functions #'magit-wip-commit) + (remove-hook 'before-save-hook #'magit-wip-commit-initial-backup) + (remove-hook 'magit-common-git-post-commit-functions #'magit-wip-post-commit) + (remove-hook 'git-commit-post-finish-hook #'magit-wip-commit-post-editmsg)))) (defun magit-wip-commit-buffer-file (&optional msg) - "Commit visited file to a worktree work-in-progress ref. - -Also see `magit-wip-after-save-mode' which calls this function -automatically whenever a buffer visiting a tracked file is saved." - (interactive (list "wip-save %s after save")) - (when-let ((_(not magit--wip-inhibit-autosave)) - (ref (magit-wip-get-ref))) - (magit-with-toplevel - (let ((file (file-relative-name buffer-file-name))) - (magit-wip-commit-worktree - ref (list file) - (format (or msg "autosave %s after save") file)))))) - -;;;###autoload -(define-minor-mode magit-wip-after-apply-mode - "Commit to work-in-progress refs. - -After applying a change using any \"apply variant\" -command (apply, stage, unstage, discard, and reverse) commit the -affected files to the current wip refs. For each branch there -may be two wip refs; one contains snapshots of the files as found -in the worktree and the other contains snapshots of the entries -in the index." - :package-version '(magit . "2.1.0") - :group 'magit-wip - :global t) - -(defun magit-wip-commit-after-apply (&optional files msg) - (when magit-wip-after-apply-mode - (magit-wip-commit files msg))) - -;;;###autoload -(define-minor-mode magit-wip-before-change-mode - "Commit to work-in-progress refs before certain destructive changes. - -Before invoking a revert command or an \"apply variant\" -command (apply, stage, unstage, discard, and reverse) commit the -affected tracked files to the current wip refs. For each branch -there may be two wip refs; one contains snapshots of the files -as found in the worktree and the other contains snapshots of the -entries in the index. - -Only changes to files which could potentially be affected by the -command which is about to be called are committed." - :package-version '(magit . "2.1.0") - :group 'magit-wip - :global t) - -(defun magit-wip-commit-before-change (&optional files msg) - (when magit-wip-before-change-mode - (magit-with-toplevel - (magit-wip-commit files msg)))) - -(define-minor-mode magit-wip-initial-backup-mode - "Before saving a buffer for the first time, commit to a wip ref." - :package-version '(magit . "2.90.0") - :group 'magit-wip - :global t - (if magit-wip-initial-backup-mode - (add-hook 'before-save-hook #'magit-wip-commit-initial-backup) - (remove-hook 'before-save-hook #'magit-wip-commit-initial-backup))) - -(defun magit--any-wip-mode-enabled-p () - "Return non-nil if any global wip mode is enabled." - (or magit-wip-mode - magit-wip-after-save-mode - magit-wip-after-apply-mode - magit-wip-before-change-mode - magit-wip-initial-backup-mode)) + "Commit visited file to a worktree work-in-progress ref." + (interactive (list "save %s snapshot")) + (when (and (not magit--wip-inhibit-autosave) + buffer-file-name + (magit-inside-worktree-p t) + (magit-file-tracked-p buffer-file-name)) + (magit-wip-commit-worktree + (magit-wip-get-ref) + (list buffer-file-name) + (format (or msg "autosave %s after save") + (magit-file-relative-name buffer-file-name))))) + +(defun magit-run-after-apply-functions (files task) + (run-hook-with-args 'magit-after-apply-functions + (ensure-list files) + (format " after %s" task))) + +(defun magit-run-before-change-functions (files task) + (run-hook-with-args 'magit-before-change-functions + (ensure-list files) + (format " before %s" task))) (defvar-local magit-wip-buffer-backed-up nil) (put 'magit-wip-buffer-backed-up 'permanent-local t) -;;;###autoload (defun magit-wip-commit-initial-backup () - "Before saving, commit current file to a worktree wip ref. - -The user has to add this function to `before-save-hook'. - -Commit the current state of the visited file before saving the -current buffer to that file. This backs up the same version of -the file as `backup-buffer' would, but stores the backup in the -worktree wip ref, which is also used by the various Magit Wip -modes, instead of in a backup file as `backup-buffer' would. - -This function ignores the variables that affect `backup-buffer' -and can be used along-side that function, which is recommended -because this function only backs up files that are tracked in -a Git repository." (when (and (not magit-wip-buffer-backed-up) buffer-file-name (magit-inside-worktree-p t) @@ -250,6 +155,14 @@ a Git repository." (magit-wip-commit-buffer-file "autosave %s before save")) (setq magit-wip-buffer-backed-up t))) +(defun magit-wip-post-commit (&rest _) + (when (eq magit-wip-merge-branch 'githook) + (magit-wip-commit))) + +(defun magit-wip-commit-post-editmsg () + (when (eq magit-wip-merge-branch 'immediately) + (magit-wip-commit))) + ;;; Core (defun magit-wip-commit (&optional files msg) @@ -287,24 +200,34 @@ 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" + (magit-wip--git "update-index" "--add" "--remove" "--ignore-skip-worktree-entries" "--" files) (magit-with-toplevel - (magit-call-git "add" "-u" "."))) + (magit-wip--git "add" "-u" "."))) (magit-git-string "write-tree")))) (magit-wip-update-wipref ref wipref tree parent files msg "worktree")))) +(defun magit-wip--git (&rest args) + (if magit-wip-debug + (let ((default-process-coding-system (magit--process-coding-system))) + (apply #'magit-call-process + (magit-git-executable) + (magit-process-git-arguments args))) + (apply #'magit-process-file + (magit-git-executable) nil nil nil + (magit-process-git-arguments args)))) + (defun magit-wip-update-wipref (ref wipref tree parent files msg start-msg) (cond ((and (not (equal parent wipref)) (or (not magit-wip-merge-branch) (not (magit-rev-verify wipref)))) (setq start-msg (concat "start autosaving " start-msg)) - (magit-update-ref wipref start-msg - (magit-git-string "commit-tree" "--no-gpg-sign" - "-p" parent "-m" start-msg - (concat parent "^{tree}"))) + (magit-wip--update-ref wipref start-msg + (magit-git-string "commit-tree" "--no-gpg-sign" + "-p" parent "-m" start-msg + (concat parent "^{tree}"))) (setq parent wipref)) ((and magit-wip-merge-branch (or (not (magit-rev-ancestor-p ref wipref)) @@ -314,11 +237,11 @@ commit message." "^2") ref)))) (setq start-msg (format "merge %s into %s" ref start-msg)) - (magit-update-ref wipref start-msg - (magit-git-string "commit-tree" "--no-gpg-sign" - "-p" wipref "-p" ref - "-m" start-msg - (concat ref "^{tree}"))) + (magit-wip--update-ref wipref start-msg + (magit-git-string "commit-tree" "--no-gpg-sign" + "-p" wipref "-p" ref + "-m" start-msg + (concat ref "^{tree}"))) (setq parent wipref))) (when (magit-git-failure "diff-tree" "--quiet" parent tree "--" files) (unless (and msg (not (= (aref msg 0) ?\s))) @@ -330,9 +253,15 @@ commit message." (file-relative-name (car files) (magit-toplevel))))) msg)))) - (magit-update-ref wipref msg - (magit-git-string "commit-tree" "--no-gpg-sign" - "-p" parent "-m" msg tree)))) + (magit-wip--update-ref wipref msg + (magit-git-string "commit-tree" "--no-gpg-sign" + "-p" parent "-m" msg tree)))) + +(defun magit-wip--update-ref (ref message rev) + (let ((magit--refresh-cache nil)) + (unless (zerop (magit-wip--git "update-ref" "--create-reflog" + "-m" message ref rev)) + (error "Cannot update %s with %s" ref rev)))) (defun magit-wip-get-ref () (let ((ref (or (magit-git-string "symbolic-ref" "HEAD") "HEAD"))) @@ -360,11 +289,6 @@ commit message." (concat "refs/heads/" branch)) "HEAD"))) -(defun magit-wip-maybe-add-commit-hook () - (when (and magit-wip-merge-branch - (magit--any-wip-mode-enabled-p)) - (add-hook 'git-commit-post-finish-hook #'magit-wip-commit nil t))) - ;;; Log (defun magit-wip-log-index (args files) diff --git a/elpa/magit-20251103.1130/magit-worktree.el b/elpa/magit-20251217.1836/magit-worktree.el similarity index 99% rename from elpa/magit-20251103.1130/magit-worktree.el rename to elpa/magit-20251217.1836/magit-worktree.el index 085f99b7..4f6859c5 100644 --- a/elpa/magit-20251103.1130/magit-worktree.el +++ b/elpa/magit-20251217.1836/magit-worktree.el @@ -125,7 +125,7 @@ just \"PREFIX_\". Always forward PROMPT as-is." ;;; Commands -;;;###autoload (autoload 'magit-worktree "magit-worktree" nil t) +;;;###autoload(autoload 'magit-worktree "magit-worktree" nil t) (transient-define-prefix magit-worktree () "Act on a worktree." :man-page "git-worktree" diff --git a/elpa/magit-20251103.1130/magit.el b/elpa/magit-20251217.1836/magit.el similarity index 97% rename from elpa/magit-20251103.1130/magit.el rename to elpa/magit-20251217.1836/magit.el index 189672b3..16afef3c 100644 --- a/elpa/magit-20251103.1130/magit.el +++ b/elpa/magit-20251217.1836/magit.el @@ -17,8 +17,8 @@ ;; Homepage: https://github.com/magit/magit ;; Keywords: git tools vc -;; Package-Version: 20251103.1130 -;; Package-Revision: 84c5c8c8c610 +;; Package-Version: 20251217.1836 +;; Package-Revision: 655bc502a3bd ;; Package-Requires: ( ;; (emacs "28.1") ;; (compat "30.1") @@ -325,7 +325,7 @@ already been run." ;;; Dispatch Popup -;;;###autoload (autoload 'magit-dispatch "magit" nil t) +;;;###autoload(autoload 'magit-dispatch "magit" nil t) (transient-define-prefix magit-dispatch () "Invoke a Magit command from a list of available commands." :info-manual "(magit)Top" @@ -416,7 +416,7 @@ This affects `magit-git-command', `magit-git-command-topdir', (defvar magit-git-command-history nil) -;;;###autoload (autoload 'magit-run "magit" nil t) +;;;###autoload(autoload 'magit-run "magit" nil t) (transient-define-prefix magit-run () "Run git or another command, or launch a graphical utility." [["Run git subcommand" @@ -520,7 +520,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 (mapcan + (let* ((keys (seq-keep (lambda (cert) (and (or (not predicate) (funcall predicate cert)) @@ -534,11 +534,10 @@ is run in the top-level directory of the current working tree." (if (stringp id-str) id-str (epg-decode-dn id-obj)))))) - (list - (propertize fpr 'display - (concat (substring fpr 0 (- (length id))) - (propertize id 'face 'highlight) - " " author)))))) + (propertize fpr 'display + (concat (substring fpr 0 (- (length id))) + (propertize id 'face 'highlight) + " " author))))) (epg-list-keys (epg-make-context epa-protocol) nil t))) (choice (or (and (not current-prefix-arg) (or (and (length= keys 1) (car keys)) @@ -774,11 +773,12 @@ For X11 something like ~/.xinitrc should work.\n" (require 'magit-stash) (require 'magit-blame) (require 'magit-submodule) - ;; The `provide' form may be missing so we have to - ;; try harder to ensure this is loaded exactly once. - (unless (or (featurep 'magit-autoloads) + (unless (or noninteractive + ;; The `provide' form may be missing, so we have to + ;; try harder to ensure this is loaded exactly once. + (featurep 'magit-autoloads) (autoloadp (symbol-function 'magit-patch)) - (load "magit-autoloads" t)) + (load "magit-autoloads" t t)) (require 'magit-patch) (require 'magit-subtree) (require 'magit-ediff) diff --git a/elpa/magit-20251103.1130/magit.info b/elpa/magit-20251217.1836/magit.info similarity index 96% rename from elpa/magit-20251103.1130/magit.info rename to elpa/magit-20251217.1836/magit.info index b10a4a58..65a61663 100644 --- a/elpa/magit-20251103.1130/magit.info +++ b/elpa/magit-20251217.1836/magit.info @@ -571,17 +571,17 @@ buffers whose major-modes derive from ‘magit-mode’. ‘magit-display-buffer-noselect’ is ‘nil’. It also runs the hooks mentioned below. - If optional DISPLAY-FUNCTION is non-nil, then that is used to + If optional DISPLAY-FUNCTION is non-‘nil’, then that is used to display the buffer. Usually that is ‘nil’ and the function specified by ‘magit-display-buffer-function’ is used. -- Variable: magit-display-buffer-noselect - When this is non-nil, then ‘magit-display-buffer’ only displays the - buffer but forgoes also selecting the window. This variable should - not be set globally, it is only intended to be let-bound, by code - that automatically updates "the other window". This is used for - example when the revision buffer is updated when you move inside - the log buffer. + When this is non-‘nil’, then ‘magit-display-buffer’ only displays + the buffer but forgoes also selecting the window. This variable + should not be set globally, it is only intended to be let-bound, by + code that automatically updates "the other window". This is used + for example when the revision buffer is updated when you move + inside the log buffer. -- User Option: magit-display-buffer-function The function specified here is called by ‘magit-display-buffer’ @@ -703,18 +703,18 @@ buffers whose major-modes derive from ‘magit-mode’. • ‘%t’ The top-level directory of the working tree of the repository, - or if ‘magit-uniquify-buffer-names’ is non-nil an abbreviation - of that. + or if ‘magit-uniquify-buffer-names’ is non-‘nil’ an + abbreviation of that. • ‘%x’ - If ‘magit-uniquify-buffer-names’ is nil "*", otherwise the + If ‘magit-uniquify-buffer-names’ is ‘nil’ "*", otherwise the empty string. Due to limitations of the ‘uniquify’ package, buffer names must end with the path. The value should always contain ‘%m’ or ‘%M’, ‘%v’ or ‘%V’, and - ‘%t’. If ‘magit-uniquify-buffer-names’ is non-nil, then the value - must end with ‘%t’ or ‘%t%x’. See issue #2841. + ‘%t’. If ‘magit-uniquify-buffer-names’ is non-‘nil’, then the + value must end with ‘%t’ or ‘%t%x’. See issue #2841. -- User Option: magit-uniquify-buffer-names This option controls whether the names of Magit buffers are @@ -745,9 +745,9 @@ buffers whose major-modes derive from ‘magit-mode’. The function used to actually bury or kill the current buffer. ‘magit-mode-bury-buffer’ calls this function with one argument. If - the argument is non-nil, then the function has to kill the current - buffer. Otherwise it has to bury it alive. The default value - currently is ‘magit-mode-quit-window’. + the argument is non-‘nil’, then the function has to kill the + current buffer. Otherwise it has to bury it alive. The default + value currently is ‘magit-mode-quit-window’. -- Function: magit-restore-window-configuration kill-buffer Bury or kill the current buffer using ‘quit-window’, which is @@ -804,7 +804,7 @@ to the repository outside of Magit. being tracked in the current repository. The file-visiting buffers are always reverted, even if - ‘magit-revert-buffers’ is nil. + ‘magit-revert-buffers’ is ‘nil’. -- User Option: magit-refresh-buffer-hook This hook is run in each Magit buffer that was refreshed during the @@ -812,13 +812,13 @@ to the repository outside of Magit. buffer. -- User Option: magit-refresh-status-buffer - When this option is non-nil, then the status buffer is + When this option is non-‘nil’, then the status buffer is automatically refreshed after running git for side-effects, in addition to the current Magit buffer, which is always refreshed automatically. - Only set this to nil after exhausting all other options to improve - performance. + Only set this to ‘nil’ after exhausting all other options to + improve performance. -- Function: magit-after-save-refresh-status This function is intended to be added to ‘after-save-hook’. After @@ -844,7 +844,7 @@ explicitly. This option controls whether file-visiting buffers are saved before certain events. - If this is non-nil then all modified file-visiting buffers + If this is non-‘nil’ then all modified file-visiting buffers belonging to the current repository may be saved before running commands, before creating new Magit buffers, and before explicitly refreshing such buffers. If this is ‘dontask’ then this is done @@ -881,14 +881,15 @@ the visiting buffer before you could continue making changes. -- User Option: magit-auto-revert-immediately This option controls whether Magit reverts buffers immediately. - If this is non-nil and either ‘global-auto-revert-mode’ or + If this is non-‘nil’ and either ‘global-auto-revert-mode’ or ‘magit-auto-revert-mode’ is enabled, then Magit immediately reverts buffers by explicitly calling ‘auto-revert-buffers’ after running Git for side-effects. - If ‘auto-revert-use-notify’ is non-nil (and file notifications are - actually supported), then ‘magit-auto-revert-immediately’ does not - have to be non-nil, because the reverts happen immediately anyway. + If ‘auto-revert-use-notify’ is non-‘nil’ (and file notifications + are actually supported), then ‘magit-auto-revert-immediately’ does + not have to be non-‘nil’, because the reverts happen immediately + anyway. If ‘magit-auto-revert-immediately’ and ‘auto-revert-use-notify’ are both ‘nil’, then reverts happen after ‘auto-revert-interval’ @@ -931,7 +932,7 @@ the visiting buffer before you could continue making changes. on the local mode ‘auto-revert-mode’ themselves, are best served by setting the value to ‘magit-auto-revert-repository-buffer-p’. - However the default is nil, so as not to disturb users who do use + However the default is ‘nil’, so as not to disturb users who do use the local mode directly. If you experience delays when running Magit commands, then you should consider using one of the predicates provided by Magit - especially if you also use Tramp. @@ -1223,7 +1224,7 @@ certain sections can also be overwritten using the hook -- User Option: magit-section-cache-visibility This option controls for which sections the previous visibility state should be restored if a section disappears and later appears - again. The value is a boolean or a list of section types. If t, + again. The value is a boolean or a list of section types. If ‘t’, then the visibility of all sections is cached. Otherwise this is only done for sections whose type matches one of the listed types. @@ -1244,15 +1245,19 @@ certain sections can also be overwritten using the hook Usually this should only be used to set the initial visibility but not during refreshes. If ‘magit-insert-section--oldroot’ is - non-nil, then the buffer is being refreshed and these functions + non-‘nil’, then the buffer is being refreshed and these functions should immediately return ‘nil’. - -- User Option: magit-section-visibility-indicator + -- User Option: magit-section-visibility-indicators This option controls whether and how to indicate that a section can be expanded/collapsed. - If nil, then no visibility indicators are shown. Otherwise the - value has to have one of these two forms: + If ‘nil’, then don’t show any indicators. Otherwise the value has + to be a list with two elements. The first controls the indicators + used in graphical frames, the second the indicators in terminal + frames. For graphical frames all of the following forms are valid, + while terminal frames do not have fringes and thus do not support + the first form. • ‘(EXPANDABLE-BITMAP . COLLAPSIBLE-BITMAP)’ @@ -1263,8 +1268,13 @@ certain sections can also be overwritten using the hook To provide extra padding around the indicator, set ‘left-fringe-width’ in ‘magit-mode-hook’, e.g.: - (add-hook 'magit-mode-hook (lambda () - (setq left-fringe-width 20))) + (add-hook 'magit-mode-hook + (lambda () (setq left-fringe-width 20))) + + • ‘(EXPANDABLE-CHAR . COLLAPSIBLE-CHAR)’ + + In this case every section that can be expanded or collapsed + gets an indicator in the left margin. • ‘(STRING . BOOLEAN)’ @@ -1297,27 +1307,27 @@ this manual along with the appropriate "section inserter functions". Add the function FUNCTION to the value of section hook HOOK. Add FUNCTION at the beginning of the hook list unless optional - APPEND is non-nil, in which case FUNCTION is added at the end. If - FUNCTION already is a member then move it to the new location. + APPEND is non-‘nil’, in which case FUNCTION is added at the end. + If FUNCTION already is a member then move it to the new location. - If optional AT is non-nil and a member of the hook list, then add + If optional AT is non-‘nil’ and a member of the hook list, then add FUNCTION next to that instead. Add before or after AT, or replace AT with FUNCTION depending on APPEND. If APPEND is the symbol - ‘replace’, then replace AT with FUNCTION. For any other non-nil - value place FUNCTION right after AT. If nil, then place FUNCTION + ‘replace’, then replace AT with FUNCTION. For any other non-‘nil’ + value place FUNCTION right after AT. If ‘nil’, then place FUNCTION right before AT. If FUNCTION already is a member of the list but AT is not, then leave FUNCTION where ever it already is. - If optional LOCAL is non-nil, then modify the hook’s buffer-local + If optional LOCAL is non-‘nil’, then modify the hook’s buffer-local value rather than its global value. This makes the hook local by copying the default value. That copy is then modified. - HOOK should be a symbol. If HOOK is void, it is first set to nil. - HOOK’s value must not be a single hook function. FUNCTION should - be a function that takes no arguments and inserts one or multiple - sections at point, moving point forward. FUNCTION may choose not - to insert its section(s), when doing so would not make sense. It - should not be abused for other side-effects. + HOOK should be a symbol. If HOOK is void, it is first set to + ‘nil’. HOOK’s value must not be a single hook function. FUNCTION + should be a function that takes no arguments and inserts one or + multiple sections at point, moving point forward. FUNCTION may + choose not to insert its section(s), when doing so would not make + sense. It should not be abused for other side-effects. To remove a function from a section hook, use ‘remove-hook’. @@ -1760,8 +1770,8 @@ or without confirmation. • If the command uses ‘magit-completing-read’ multiple times, then PROMPT can be used to only affect one of these uses. PROMPT, if - non-nil, is a regular expression that is used to match against the - PROMPT argument passed to ‘magit-completing-read’. + non-‘nil’, is a regular expression that is used to match against + the PROMPT argument passed to ‘magit-completing-read’. • DEFAULT specifies how to use the default. If it is ‘t’, then the DEFAULT argument passed to ‘magit-completing-read’ is used without @@ -1907,7 +1917,7 @@ then you are done too. then ‘nil’ is returned instead of an empty string. • If REQUIRE-MATCH is ‘any’, then do not require a match but do - require non-empty input (or non-nil DEFAULT, since that is + require non-empty input (or non-‘nil’ DEFAULT, since that is substituted for empty input). • If REQUIRE-MATCH is non-‘nil’ and the users exits without a @@ -2351,9 +2361,9 @@ such hooks and how to customize them. -- Function: magit-insert-stashes &optional ref heading Insert the ‘stashes’ section showing reflog for "refs/stash". If - optional REF is non-nil show reflog for that instead. If optional - HEADING is non-nil use that as section heading instead of - "Stashes:". + optional REF is non-‘nil’ show reflog for that instead. If + optional HEADING is non-‘nil’ use that as section heading instead + of "Stashes:". -- Function: magit-insert-unpulled-from-upstream Insert section showing commits that haven’t been pulled from the @@ -2563,8 +2573,8 @@ variable. This option controls whether ‘magit-insert-modules’ wraps inserted sections in an additional section. - If this is non-nil, then only a single top-level section is - inserted. If it is nil, then all sections listed in + If this is non-‘nil’, then only a single top-level section is + inserted. If it is ‘nil’, then all sections listed in ‘magit-module-sections-hook’ become top-level sections. -- Function: magit-insert-modules-overview @@ -2606,7 +2616,7 @@ variable. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -2648,8 +2658,9 @@ File: magit.info, Node: Repository List, Next: Logging, Prev: Status Buffer, of the column. FORMAT is a function that is called with one argument, the repository identification (usually its basename), and with ‘default-directory’ bound to the toplevel of its working tree. - It has to return a string to be inserted or nil. PROPS is an alist - that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’. + It has to return a string to be inserted or ‘nil’. PROPS is an + alist that supports the keys ‘:right-align’, ‘:pad-right’ and + ‘:sort’. The ‘:sort’ function has a weird interface described in the docstring of ‘tabulated-list--get-sort’. Alternatively ‘<’ and @@ -2975,7 +2986,7 @@ regular log buffers that would be ‘magit-log-margin’. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -3056,7 +3067,7 @@ buffers: The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -3096,7 +3107,7 @@ Also see *note (gitman)git-reflog::. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -3137,7 +3148,7 @@ for multiple "upstreams" at once. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -3409,7 +3420,7 @@ they are available here too. Determining the correct width can be expensive if it requires opening large and/or many files, so the widths are cached in the - variable ‘magit-diff--tab-width-cache’. Set that to nil to + variable ‘magit-diff--tab-width-cache’. Set that to ‘nil’ to invalidate the cache. • ‘nil’ Never adjust tab width. Use ‘tab-width’s value from the @@ -3430,7 +3441,7 @@ they are available here too. See ‘magit-diff-highlight-trailing’, ‘magit-diff-highlight-indentation’. The symbol ‘t’ means in all - diffs, ‘status’ means only in the status buffer, and nil means + diffs, ‘status’ means only in the status buffer, and ‘nil’ means nowhere. • ‘nil’ Never highlight whitespace errors. @@ -3448,12 +3459,12 @@ they are available here too. -- User Option: magit-diff-highlight-trailing Whether to highlight whitespace at the end of a line in diffs. - Used only when ‘magit-diff-paint-whitespace’ is non-nil. + Used only when ‘magit-diff-paint-whitespace’ is non-‘nil’. -- User Option: magit-diff-highlight-indentation This option controls whether to highlight the indentation in case it used the "wrong" indentation style. Indentation is only - highlighted if ‘magit-diff-paint-whitespace’ is also non-nil. + highlighted if ‘magit-diff-paint-whitespace’ is also non-‘nil’. The value is an alist of the form ‘((REGEXP . INDENT)...)’. The path to the current repository is matched against each element in @@ -3543,12 +3554,12 @@ they are available here too. author’s image. The top half of the image is inserted right after the matched text, the bottom half on the next line in the same column. The cdr specifies where to insert the committer’s image, - accordingly. Either the car or the cdr may be nil." + accordingly. Either the car or the cdr may be ‘nil’." -- User Option: magit-revision-use-hash-sections Whether to turn hashes inside the commit message into sections. - If non-nil, then hashes inside the commit message are turned into + If non-‘nil’, then hashes inside the commit message are turned into ‘commit’ sections. There is a trade off to be made between performance and reliability: @@ -3560,8 +3571,8 @@ they are available here too. long and which contain at least one number as well as at least one letter. - If nil, then no hashes are turned into sections, but you can still - visit the commit at point using "RET". + If ‘nil’, then no hashes are turned into sections, but you can + still visit the commit at point using "RET". The diffs shown in the revision buffer may be automatically restricted to a subset of the changed files. If the revision buffer is @@ -3573,15 +3584,15 @@ file restriction as that log buffer (also see the command Whether showing a commit from a log buffer honors the log’s file filter when the log arguments include ‘--follow’. - When this option is nil, displaying a commit from a log ignores the - log’s file filter if the log arguments include ‘--follow’. Doing - so avoids showing an empty diff in revision buffers for commits - before a rename event. In such cases, the ‘--patch’ argument of - the log transient can be used to show the file-restricted diffs - inline. + When this option is ‘nil’, displaying a commit from a log ignores + the log’s file filter if the log arguments include ‘--follow’. + Doing so avoids showing an empty diff in revision buffers for + commits before a rename event. In such cases, the ‘--patch’ + argument of the log transient can be used to show the + file-restricted diffs inline. - Set this option to non-nil to keep the log’s file restriction even - if ‘--follow’ is present in the log arguments. + Set this option to non-‘nil’ to keep the log’s file restriction + even if ‘--follow’ is present in the log arguments. If the revision buffer is not displayed from a log buffer, the file restriction is determined as usual (see *note Transient Arguments and @@ -3700,7 +3711,7 @@ information on how to use Ediff itself, see *note (ediff)Top::. -- User Option: magit-ediff-dwim-show-on-hunks This option controls what command ‘magit-ediff-dwim’ calls when - point is on uncommitted hunks. When nil, always run + point is on uncommitted hunks. When ‘nil’, always run ‘magit-ediff-stage’. Otherwise, use ‘magit-ediff-show-staged’ and ‘magit-ediff-show-unstaged’ to show staged and unstaged changes, respectively. @@ -3769,12 +3780,12 @@ the other references are compared. Whether to pad all commit counts on all sides in Magit-Refs mode buffers. - If this is nil, then some commit counts are displayed right next to - one of the branches that appear next to the count, without any + If this is ‘nil’, then some commit counts are displayed right next + to one of the branches that appear next to the count, without any space in between. This might look bad if the branch name faces look too similar to ‘magit-dimmed’. - If this is non-nil, then spaces are placed on both sides of all + If this is non-‘nil’, then spaces are placed on both sides of all commit counts. -- User Option: magit-refs-show-remote-prefix @@ -3815,7 +3826,7 @@ the other references are compared. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -3868,9 +3879,9 @@ you should also change the others to keep things aligned. The following refs are displayed (subject to ‘magit-refs-sections-hook’). All keys are tried in order until one matches. Then its value is - used and subsequent elements are ignored. If the value is non-nil, - then the reference is displayed, otherwise it is not. If no - element matches, then the reference is displayed. + used and subsequent elements are ignored. If the value is + non-‘nil’, then the reference is displayed, otherwise it is not. + If no element matches, then the reference is displayed. A key can either be a regular expression that the refname has to match, or a function that takes the refname as only argument and @@ -4594,7 +4605,7 @@ apply variants are described in the next section. 2. Visit the ‘HEAD’ commit and navigate to the change that should not have been included in that commit. 3. Type ‘u’ (‘magit-unstage’) to reverse it in the index. This - assumes that ‘magit-unstage-committed’ is non-nil. + assumes that ‘magit-unstage-committed’ is non-‘nil’. 4. Type ‘c e’ to extend ‘HEAD’ with the staged changes, including those that were already staged before. 5. Optionally stage the remaining changes using ‘s’ or ‘S’ and @@ -4952,8 +4963,8 @@ Options used by commit commands -- User Option: magit-commit-squash-confirm Whether the commit targeted by squash and fixup has to be - confirmed. When non-nil then the commit at point (if any) is - used as default choice. Otherwise it has to be confirmed. + confirmed. When non-‘nil’ then the commit at point (if any) + is used as default choice. Otherwise it has to be confirmed. This option only affects ‘magit-commit-squash’ and ‘magit-commit-fixup’. The "instant" variants always require confirmation because making an error while using those is @@ -5061,21 +5072,21 @@ Using the Revision Stack The entries on the stack have the format ‘(HASH TOPLEVEL)’ and this option has the format ‘(POINT-FORMAT EOB-FORMAT INDEX-REGEXP)’, all - of which may be nil or a string (though either one of EOB-FORMAT or - POINT-FORMAT should be a string, and if INDEX-REGEXP is non-nil, - then the two formats should be too). + of which may be ‘nil’ or a string (though either one of EOB-FORMAT + or POINT-FORMAT should be a string, and if INDEX-REGEXP is + non-‘nil’, then the two formats should be too). First INDEX-REGEXP is used to find the previously inserted entry, by searching backward from point. The first submatch must match the index number. That number is incremented by one, and becomes the index number of the entry to be inserted. If you don’t want to - number the inserted revisions, then use nil for INDEX-REGEXP. + number the inserted revisions, then use ‘nil’ for INDEX-REGEXP. - If INDEX-REGEXP is non-nil then both POINT-FORMAT and EOB-FORMAT + If INDEX-REGEXP is non-‘nil’ then both POINT-FORMAT and EOB-FORMAT should contain \"%N\", which is replaced with the number that was determined in the previous step. - Both formats, if non-nil and after removing %N, are then expanded + Both formats, if non-‘nil’ and after removing %N, are then expanded using ‘git show --format=FORMAT ...’ inside TOPLEVEL. The expansion of POINT-FORMAT is inserted at point, and the @@ -5203,14 +5214,14 @@ who has to waste some time telling you to fix your commits. List of functions called to query before performing commit. The commit message buffer is current while the functions are - called. If any of them returns nil, then the commit is not + called. If any of them returns ‘nil’, then the commit is not performed and the buffer is not killed. The user should then fix the issue and try again. - The functions are called with one argument. If it is non-nil then - that indicates that the user used a prefix argument to force + The functions are called with one argument. If it is non-‘nil’ + then that indicates that the user used a prefix argument to force finishing the session despite issues. Functions should usually - honor this wish and return non-nil. + honor this wish and return non-‘nil’. By default the only member is ‘git-commit-check-style-conventions’. @@ -5381,9 +5392,9 @@ them. Those features are available from separate transient commands. upstream of the starting-point may be used as the upstream of the new branch, instead of the starting-point itself. - If optional FROM is non-nil, then the source branch is reset to + If optional FROM is non-‘nil’, then the source branch is reset to ‘FROM~’, instead of to the last commit it shares with its upstream. - Interactively, FROM is only ever non-nil, if the region selects + Interactively, FROM is only ever non-‘nil’, if the region selects some commits, and among those commits, FROM is the commit that is the fewest commits ahead of the source branch. @@ -6638,7 +6649,7 @@ Also see *note (gitman)git-stash::. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. - • If INIT is non-nil, then the margin is shown initially. + • If INIT is non-‘nil’, then the margin is shown initially. • STYLE controls how to format the author or committer date. It can be one of ‘age’ (to show the age of the commit), ‘age-abbreviated’ (to abbreviate the time unit to a @@ -7233,8 +7244,9 @@ Sections::. of the column. FORMAT is a function that is called with one argument, the repository identification (usually its basename), and with ‘default-directory’ bound to the toplevel of its working tree. - It has to return a string to be inserted or nil. PROPS is an alist - that supports the keys ‘:right-align’, ‘:pad-right’ and ‘:sort’. + It has to return a string to be inserted or ‘nil’. PROPS is an + alist that supports the keys ‘:right-align’, ‘:pad-right’ and + ‘:sort’. The ‘:sort’ function has a weird interface described in the docstring of ‘tabulated-list--get-sort’. Alternatively ‘<’ and @@ -7268,7 +7280,7 @@ modules. ‘o a’ (‘magit-submodule-add’) This commands adds the repository at URL as a module. Optional PATH is the path to the module relative to the root of the - super-project. If it is nil then the path is determined based on + super-project. If it is ‘nil’ then the path is determined based on URL. ‘o r’ (‘magit-submodule-register’) @@ -7390,6 +7402,11 @@ Also see *note (gitman)git-worktree::. If the worktree at point is the one whose status is already being displayed in the current buffer, then show it in Dired instead. + If you want the status buffer to list worktrees, add the function +‘magit-insert-worktrees’ to ‘magit-status-sections-hook’ as described in +*note Status Sections::. If there is only one worktree, this function +inserts nothing. +  File: magit.info, Node: Sparse checkouts, Next: Bundle, Prev: Worktree, Up: Miscellaneous @@ -7558,11 +7575,6 @@ different wip refs for subsequent changes. Setting this variable directly does not take effect; either use the Custom interface to do so or call the respective mode function. - For historic reasons this mode is implemented on top of four other - ‘magit-wip-*’ modes, which can also be used individually, if you - want finer control over when the wip refs are updated; but that is - discouraged. See *note Legacy Wip Modes::. - To view the log for a branch and its wip refs use the commands ‘magit-wip-log’ and ‘magit-wip-log-current’. You should use ‘--graph’ when using these commands. @@ -7628,15 +7640,19 @@ files are being committed. This option controls whether the current branch is merged into the wip refs after a new commit was created on the branch. - If non-nil and the current branch has new commits, then it is + If non-‘nil’ and the current branch has new commits, then it is merged into the wip ref before creating a new wip commit. This makes it easier to inspect wip history and the wip commits are never garbage collected. - If nil and the current branch has new commits, then the wip ref is - reset to the tip of the branch before creating a new wip commit. + If ‘nil’ and the current branch has new commits, then the wip ref + is reset to the tip of the branch before creating a new wip commit. With this setting wip commits are eventually garbage collected. + If ‘immediately’, then use ‘git-commit-post-finish-hook’ to create + the merge commit. This is discouraged because it can lead to a + race condition, e.g., during rebases. + When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like this: @@ -7677,66 +7693,6 @@ commit does not change the fork-point of the working tree wip ref. The fork-points are not adjusted until there actually is a change that should be committed to the respective wip ref. -8.9.2 Legacy Wip Modes ----------------------- - -It is recommended that you use the mode ‘magit-wip-mode’ (which see) and -ignore the existence of the following modes, which are preserved for -historic reasons. - - Setting the following variables directly does not take effect; either -use the Custom interface to do so or call the respective mode functions. - - -- User Option: magit-wip-after-save-mode - When this mode is enabled, then saving a buffer that visits a file - tracked in a Git repository causes its current state to be - committed to the working tree wip ref for the current branch. - - -- User Option: magit-wip-after-apply-mode - When this mode is enabled, then applying (i.e., staging, unstaging, - discarding, reversing, and regularly applying) a change to a file - tracked in a Git repository causes its current state to be - committed to the index and/or working tree wip refs for the current - branch. - - If you only ever edit files using Emacs and only ever interact with -Git using Magit, then the above two modes should be enough to protect -each and every change from accidental loss. In practice nobody does -that. Two additional modes exists that do commit to the wip refs before -making changes that could cause the loss of earlier changes. - - -- User Option: magit-wip-before-change-mode - When this mode is enabled, then certain commands commit the - existing changes to the files they are about to make changes to. - - -- User Option: magit-wip-initial-backup-mode - When this mode is enabled, then the current version of a file is - committed to the worktree wip ref before the buffer visiting that - file is saved for the first time since the buffer was created. - - This backs up the same version of the file that ‘backup-buffer’ - would save. While ‘backup-buffer’ uses a backup file, this mode - uses the same worktree wip ref as used by the other Magit Wip - modes. Like ‘backup-buffer’, it only does this once; unless you - kill the buffer and visit the file again only one backup will be - created per Emacs session. - - This mode ignores the variables that affect ‘backup-buffer’ and can - be used along-side that function, which is recommended because it - only backs up files that are tracked in a Git repository. - - -- User Option: magit-wip-after-save-local-mode-lighter - Mode-line lighter for ‘magit-wip-after-save-local-mode’. - - -- User Option: magit-wip-after-apply-mode-lighter - Mode-line lighter for ‘magit-wip-after-apply-mode’. - - -- User Option: magit-wip-before-change-mode-lighter - Mode-line lighter for ‘magit-wip-before-change-mode’. - - -- User Option: magit-wip-initial-backup-mode-lighter - Mode-line lighter for ‘magit-wip-initial-backup-mode’. -  File: magit.info, Node: Commands for Buffers Visiting Files, Next: Minor Mode for Buffers Visiting Blobs, Prev: Wip Modes, Up: Miscellaneous @@ -8444,7 +8400,7 @@ side-effects, but that should be avoided. Executes git with ARGS and returns its null-separated output as a list. Empty items anywhere in the output are omitted. - If the value of option ‘magit-git-debug’ is non-nil and git exits + If the value of option ‘magit-git-debug’ is non-‘nil’ and git exits with a non-zero exit status, then warn about that in the echo area and add a section containing git’s standard error in the current repository’s process buffer. @@ -8551,7 +8507,7 @@ asynchronous functions return the process object. current when this function was called (if it is a Magit buffer and still alive), as well as the respective Magit status buffer. Unmodified buffers visiting files that are tracked in the current - repository are reverted if ‘magit-revert-buffers’ is non-nil. + repository are reverted if ‘magit-revert-buffers’ is non-‘nil’. -- Function: magit-run-git-with-editor &rest args Export GIT_EDITOR and start Git. Also prepare for refresh and @@ -8567,7 +8523,7 @@ asynchronous functions return the process object. -- Function: magit-start-git input &rest args Start Git, prepare for refresh, and return the process object. - If INPUT is non-nil, it has to be a buffer or the name of an + If INPUT is non-‘nil’, it has to be a buffer or the name of an existing buffer. The buffer content becomes the processes standard input. @@ -8580,13 +8536,13 @@ asynchronous functions return the process object. current when this function was called (if it is a Magit buffer and still alive), as well as the respective Magit status buffer. Unmodified buffers visiting files that are tracked in the current - repository are reverted if ‘magit-revert-buffers’ is non-nil. + repository are reverted if ‘magit-revert-buffers’ is non-‘nil’. -- Function: magit-start-process &rest args Start PROGRAM, prepare for refresh, and return the process object. - If optional argument INPUT is non-nil, it has to be a buffer or the - name of an existing buffer. The buffer content becomes the + If optional argument INPUT is non-‘nil’, it has to be a buffer or + the name of an existing buffer. The buffer content becomes the processes standard input. The process is started using ‘start-file-process’ and then setup to @@ -8601,15 +8557,16 @@ asynchronous functions return the process object. it is a Magit buffer and still alive), as well as the respective Magit status buffer. Unmodified buffers visiting files that are tracked in the current repository are reverted if - ‘magit-revert-buffers’ is non-nil. + ‘magit-revert-buffers’ is non-‘nil’. -- Variable: magit-this-process The child process which is about to start. This can be used to change the filter and sentinel. -- Variable: magit-process-raise-error - When this is non-nil, then ‘magit-process-sentinel’ raises an error - if git exits with a non-zero exit status. For debugging purposes. + When this is non-‘nil’, then ‘magit-process-sentinel’ raises an + error if git exits with a non-zero exit status. For debugging + purposes.  File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Calling Git, Up: Plumbing @@ -8633,12 +8590,13 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal Optional VALUE is the value of the section, usually a string that is required when acting on the section. - When optional HIDE is non-nil collapse the section body by default, - i.e., when first creating the section, but not when refreshing the - buffer. Otherwise, expand it by default. This can be overwritten - using ‘magit-section-set-visibility-hook’. When a section is - recreated during a refresh, then the visibility of predecessor is - inherited and HIDE is ignored (but the hook is still honored). + When optional HIDE is non-‘nil’ collapse the section body by + default, i.e., when first creating the section, but not when + refreshing the buffer. Otherwise, expand it by default. This can + be overwritten using ‘magit-section-set-visibility-hook’. When a + section is recreated during a refresh, then the visibility of + predecessor is inherited and HIDE is ignored (but the hook is still + honored). BODY is any number of forms that actually insert the section’s heading and body. Optional NAME, if specified, has to be a symbol, @@ -8676,7 +8634,7 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal The ‘content’ property of the section struct is the end of the heading (which lasts from ‘start’ to ‘content’) and the beginning of the body (which lasts from ‘content’ to ‘end’). If the value of - ‘content’ is nil, then the section has no heading and its body + ‘content’ is ‘nil’, then the section has no heading and its body cannot be collapsed. If a section does have a heading then its height must be exactly one line, including a trailing newline character. This isn’t enforced; you are responsible for getting it @@ -8705,10 +8663,10 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal selection, then return a list of all selected sections. This is the case when the region begins in the heading of a section and ends in the heading of the same section or in that of a sibling - section. If optional MULTIPLE is non-nil, then the region cannot + section. If optional MULTIPLE is non-‘nil’, then the region cannot begin and end in the same section. - When the selection is not valid, then return nil. In this case, + When the selection is not valid, then return ‘nil’. In this case, most commands that can act on the selected sections will instead act on the section at point. @@ -8719,9 +8677,9 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal region looks like it usually does, then that’s not a valid selection as far as this function is concerned. - If optional CONDITION is non-nil, then the selection not only has + If optional CONDITION is non-‘nil’, then the selection not only has to be valid; all selected sections additionally have to match - CONDITION, or nil is returned. See ‘magit-section-match’ for the + CONDITION, or ‘nil’ is returned. See ‘magit-section-match’ for the forms CONDITION can take. -- Function: magit-region-values &optional condition multiple @@ -8787,9 +8745,10 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal -- Function: magit-section-value-if condition &optional section If the section at point matches CONDITION, then return its value. - If optional SECTION is non-nil then test whether that matches - instead. If there is no section at point and SECTION is nil, then - return nil. If the section does not match, then return nil. + If optional SECTION is non-‘nil’ then test whether that matches + instead. If there is no section at point and SECTION is ‘nil’, + then return ‘nil’. If the section does not match, then return + ‘nil’. See ‘magit-section-match’ for the forms CONDITION can take. @@ -8801,10 +8760,10 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal first match are evaluated sequentially and the value of the last form is returned. Inside BODY the symbol ‘it’ is bound to the section at point. If no clause succeeds or if there is no section - at point return nil. + at point return ‘nil’. See ‘magit-section-match’ for the forms CONDITION can take. - Additionally a CONDITION of t is allowed in the final clause and + Additionally a CONDITION of ‘t’ is allowed in the final clause and matches if no other CONDITION match, even if there is no section at point. @@ -8824,14 +8783,14 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal ‘type’ slot of the corresponding ‘magit-section’ struct) but takes additional information into account. When the SECTION isn’t related to diffs and the buffer containing it also isn’t a - diff-only buffer, then return nil. + diff-only buffer, then return ‘nil’. Currently the type can also be one of ‘tracked’ and ‘untracked’, but these values are not handled explicitly in every place they - should be. A possible fix could be to just return nil here. + should be. A possible fix could be to just return ‘nil’ here. The section has to be a ‘diff’ or ‘hunk’ section, or a section - whose children are of type ‘diff’. If optional SECTION is nil, + whose children are of type ‘diff’. If optional SECTION is ‘nil’, return the diff type for the current section. In buffers whose major mode is ‘magit-diff-mode’ SECTION is ignored and the type is determined using other means. In ‘magit-revision-mode’ buffers the @@ -8845,17 +8804,18 @@ File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Cal ‘list’. Do not confuse this with the diff "type", as returned by ‘magit-diff-type’. - If optional SECTION is non-nil, then return the scope of that, + If optional SECTION is non-‘nil’, then return the scope of that, ignoring the sections selected by the region. Otherwise return the scope of the current section, or if the region is active and selects a valid group of diff related sections, the type of these sections, i.e., ‘hunks’ or ‘files’. If SECTION (or if the current - section that is nil) is a ‘hunk’ section and the region starts and - ends inside the body of a that section, then the type is ‘region’. + section that is ‘nil’) is a ‘hunk’ section and the region starts + and ends inside the body of a that section, then the type is + ‘region’. - If optional STRICT is non-nil then return nil if the diff type of - the section at point is ‘untracked’ or the section at point is not - actually a ‘diff’ but a ‘diffstat’ section. + If optional STRICT is non-‘nil’ then return ‘nil’ if the diff type + of the section at point is ‘untracked’ or the section at point is + not actually a ‘diff’ but a ‘diffstat’ section.  File: magit.info, Node: Refreshing Buffers, Next: Conventions, Prev: Section Plumbing, Up: Plumbing @@ -9377,7 +9337,7 @@ as the defaults for future popups. When switching to Transient menus, this functionality is now available via ‘C-x C-s’ instead; the ‘C-x’ prefix has other options as well when using Transient, which will be displayed when it is typed. -See +See for more details.  @@ -9503,7 +9463,7 @@ Appendix C Keystroke Index * 2: Sections. (line 173) * 3: Sections. (line 173) * 4: Sections. (line 173) -* 5: Repository List. (line 115) +* 5: Repository List. (line 116) * :: Running Git. (line 97) * =: Logging. (line 155) * >: Sparse checkouts. (line 17) @@ -9763,7 +9723,7 @@ Appendix C Keystroke Index * E u: Ediffing. (line 91) * E w: Ediffing. (line 97) * E z: Ediffing. (line 103) -* f: Repository List. (line 111) +* f: Repository List. (line 112) * f <1>: Rebasing. (line 179) * F: Rebasing. (line 184) * f <2>: Fetching. (line 10) @@ -9782,7 +9742,7 @@ Appendix C Keystroke Index * F u: Pulling. (line 21) * g: Modes and Buffers. (line 265) * G: Modes and Buffers. (line 273) -* H: Sections. (line 341) +* H: Sections. (line 350) * I: Creating Repository. (line 7) * j: Logging. (line 127) * j <1>: Diffing. (line 218) @@ -9812,7 +9772,7 @@ Appendix C Keystroke Index * L s: Logging. (line 84) * l u: Logging. (line 41) * L w: Logging. (line 90) -* m: Repository List. (line 105) +* m: Repository List. (line 106) * m <1>: Merging. (line 10) * M: Remotes. (line 17) * m a: Merging. (line 42) @@ -9852,24 +9812,24 @@ Appendix C Keystroke Index * n <2>: Rebasing. (line 150) * n <3>: Minor Mode for Buffers Visiting Blobs. (line 17) -* o: Submodules. (line 55) +* o: Submodules. (line 56) * O: Subtree. (line 9) -* o a: Submodules. (line 68) -* o d: Submodules. (line 93) +* o a: Submodules. (line 69) +* o d: Submodules. (line 94) * O e: Subtree. (line 37) * O e p: Subtree. (line 48) * O e s: Subtree. (line 52) -* o f: Submodules. (line 99) +* o f: Submodules. (line 100) * O i: Subtree. (line 13) * O i a: Subtree. (line 24) * O i c: Subtree. (line 28) * O i f: Subtree. (line 34) * O i m: Subtree. (line 31) -* o l: Submodules. (line 96) -* o p: Submodules. (line 80) -* o r: Submodules. (line 74) -* o s: Submodules. (line 88) -* o u: Submodules. (line 84) +* o l: Submodules. (line 97) +* o p: Submodules. (line 81) +* o r: Submodules. (line 75) +* o s: Submodules. (line 89) +* o u: Submodules. (line 85) * p: Sections. (line 33) * p <1>: Blaming. (line 124) * P: Blaming. (line 127) @@ -9906,7 +9866,7 @@ Appendix C Keystroke Index * r s <1>: Rebasing. (line 108) * r u: Rebasing. (line 35) * r w: Rebasing. (line 92) -* RET: Repository List. (line 102) +* RET: Repository List. (line 103) * RET <1>: References Buffer. (line 159) * RET <2>: Visiting Files and Blobs. (line 41) @@ -9937,7 +9897,7 @@ Appendix C Keystroke Index * t t: Tagging. (line 14) * T T: Notes. (line 14) * TAB: Sections. (line 144) -* u: Repository List. (line 108) +* u: Repository List. (line 109) * u <1>: Staging and Unstaging. (line 42) * U: Staging and Unstaging. @@ -9969,7 +9929,7 @@ Appendix C Keystroke Index * X m: Resetting. (line 15) * X s: Resetting. (line 19) * X w: Resetting. (line 39) -* X w <1>: Wip Modes. (line 64) +* X w <1>: Wip Modes. (line 59) * Y: Logging. (line 382) * y: References Buffer. (line 7) * y <1>: Rebasing. (line 215) @@ -10050,7 +10010,7 @@ Appendix D Function and Command Index * git-rebase-squash: Rebasing. (line 165) * git-rebase-squish: Rebasing. (line 170) * git-rebase-undo: Rebasing. (line 218) -* magit-add-section-hook: Sections. (line 301) +* magit-add-section-hook: Sections. (line 310) * magit-after-save-refresh-status: Modes and Buffers. (line 294) * magit-am: Maildir Patches. (line 9) * magit-am-abort: Maildir Patches. (line 38) @@ -10138,7 +10098,7 @@ Appendix D Function and Command Index (line 20) * magit-call-git: Calling Git. (line 138) * magit-call-process: Calling Git. (line 141) -* magit-cancel-section: Section Plumbing. (line 72) +* magit-cancel-section: Section Plumbing. (line 73) * magit-checkout: Branching. (line 97) * magit-cherry: Logging. (line 382) * magit-cherry-apply: Cherry Picking. (line 23) @@ -10176,14 +10136,14 @@ Appendix D Function and Command Index (line 359) * magit-copy-buffer-revision: Common Commands. (line 39) * magit-copy-section-value: Common Commands. (line 22) -* magit-current-section: Section Plumbing. (line 84) +* magit-current-section: Section Plumbing. (line 85) * magit-cycle-margin-style: Logging. (line 274) * magit-debug-git-executable: Running Git. (line 191) * magit-debug-git-executable <1>: Debugging Tools. (line 69) -* magit-define-section-jumper: Section Plumbing. (line 77) -* magit-describe-section: Sections. (line 341) -* magit-describe-section-briefly: Sections. (line 344) -* magit-describe-section-briefly <1>: Section Plumbing. (line 123) +* magit-define-section-jumper: Section Plumbing. (line 78) +* magit-describe-section: Sections. (line 350) +* magit-describe-section-briefly: Sections. (line 353) +* magit-describe-section-briefly <1>: Section Plumbing. (line 124) * magit-diff: Diffing. (line 22) * magit-diff <1>: Commands for Buffers Visiting Files. (line 52) @@ -10204,7 +10164,7 @@ Appendix D Function and Command Index * magit-diff-refresh: Diffing. (line 105) * magit-diff-refresh <1>: Diffing. (line 110) * magit-diff-save-default-arguments: Diffing. (line 120) -* magit-diff-scope: Section Plumbing. (line 226) +* magit-diff-scope: Section Plumbing. (line 228) * magit-diff-set-default-arguments: Diffing. (line 114) * magit-diff-show-or-scroll-down: Logging. (line 146) * magit-diff-show-or-scroll-down <1>: Blaming. (line 103) @@ -10215,7 +10175,7 @@ Appendix D Function and Command Index * magit-diff-toggle-file-filter: Diffing. (line 138) * magit-diff-toggle-refine-hunk: Diffing. (line 127) * magit-diff-trace-definition: Diffing. (line 190) -* magit-diff-type: Section Plumbing. (line 204) +* magit-diff-type: Section Plumbing. (line 206) * magit-diff-unstaged: Diffing. (line 72) * magit-diff-visit-file: Visiting Files and Blobs. (line 41) @@ -10272,7 +10232,7 @@ Appendix D Function and Command Index * magit-fetch-from-pushremote: Fetching. (line 15) * magit-fetch-from-upstream: Fetching. (line 22) * magit-fetch-modules: Fetching. (line 48) -* magit-fetch-modules <1>: Submodules. (line 99) +* magit-fetch-modules <1>: Submodules. (line 100) * magit-fetch-other: Fetching. (line 34) * magit-fetch-refspec: Fetching. (line 41) * magit-file-checkout: Resetting. (line 44) @@ -10308,7 +10268,7 @@ Appendix D Function and Command Index (line 24) * magit-generate-buffer-name-default-function: Modes and Buffers. (line 141) -* magit-get-section: Section Plumbing. (line 130) +* magit-get-section: Section Plumbing. (line 131) * magit-git: Calling Git. (line 156) * magit-git-command: Running Git. (line 97) * magit-git-command-topdir: Running Git. (line 89) @@ -10339,7 +10299,7 @@ Appendix D Function and Command Index * magit-insert-diff-filter-header: Status Buffer. (line 309) * magit-insert-error-header: Status Buffer. (line 300) * magit-insert-head-branch-header: Status Buffer. (line 312) -* magit-insert-heading: Section Plumbing. (line 44) +* magit-insert-heading: Section Plumbing. (line 45) * magit-insert-ignored-files: Status Buffer. (line 237) * magit-insert-local-branches: References Buffer. (line 244) * magit-insert-merge-log: Status Buffer. (line 120) @@ -10381,7 +10341,7 @@ Appendix D Function and Command Index * magit-jump-to-diffstat-or-diff: Diffing. (line 218) * magit-list-repositories: Repository List. (line 6) * magit-list-submodules: Submodules. (line 18) -* magit-list-submodules <1>: Submodules. (line 96) +* magit-list-submodules <1>: Submodules. (line 97) * magit-log: Logging. (line 28) * magit-log <1>: Commands for Buffers Visiting Files. (line 52) @@ -10491,8 +10451,8 @@ Appendix D Function and Command Index * magit-refresh: Modes and Buffers. (line 265) * magit-refresh-all: Modes and Buffers. (line 273) * magit-refs-set-show-commit-count: References Buffer. (line 34) -* magit-region-sections: Section Plumbing. (line 87) -* magit-region-values: Section Plumbing. (line 113) +* magit-region-sections: Section Plumbing. (line 88) +* magit-region-values: Section Plumbing. (line 114) * magit-remote: Remotes. (line 17) * magit-remote-add: Remotes. (line 51) * magit-remote-configure: Remotes. (line 35) @@ -10501,28 +10461,28 @@ Appendix D Function and Command Index * magit-remote-remove: Remotes. (line 63) * magit-remote-rename: Remotes. (line 55) * magit-remote-set-url: Remotes. (line 59) -* magit-repolist-column-branch: Repository List. (line 51) -* magit-repolist-column-branches: Repository List. (line 58) -* magit-repolist-column-flag: Repository List. (line 64) -* magit-repolist-column-flags: Repository List. (line 76) -* magit-repolist-column-ident: Repository List. (line 40) -* magit-repolist-column-path: Repository List. (line 44) -* magit-repolist-column-stashes: Repository List. (line 61) +* magit-repolist-column-branch: Repository List. (line 52) +* magit-repolist-column-branches: Repository List. (line 59) +* magit-repolist-column-flag: Repository List. (line 65) +* magit-repolist-column-flags: Repository List. (line 77) +* magit-repolist-column-ident: Repository List. (line 41) +* magit-repolist-column-path: Repository List. (line 45) +* magit-repolist-column-stashes: Repository List. (line 62) * magit-repolist-column-unpulled-from-pushremote: Repository List. - (line 87) + (line 88) * magit-repolist-column-unpulled-from-upstream: Repository List. - (line 83) + (line 84) * magit-repolist-column-unpushed-to-pushremote: Repository List. - (line 95) + (line 96) * magit-repolist-column-unpushed-to-upstream: Repository List. - (line 91) -* magit-repolist-column-upstream: Repository List. (line 54) -* magit-repolist-column-version: Repository List. (line 47) -* magit-repolist-fetch: Repository List. (line 111) -* magit-repolist-find-file-other-frame: Repository List. (line 115) -* magit-repolist-mark: Repository List. (line 105) -* magit-repolist-status: Repository List. (line 102) -* magit-repolist-unmark: Repository List. (line 108) + (line 92) +* magit-repolist-column-upstream: Repository List. (line 55) +* magit-repolist-column-version: Repository List. (line 48) +* magit-repolist-fetch: Repository List. (line 112) +* magit-repolist-find-file-other-frame: Repository List. (line 116) +* magit-repolist-mark: Repository List. (line 106) +* magit-repolist-status: Repository List. (line 103) +* magit-repolist-unmark: Repository List. (line 109) * magit-reset-hard: Resetting. (line 24) * magit-reset-index: Staging and Unstaging. (line 78) @@ -10532,7 +10492,7 @@ Appendix D Function and Command Index * magit-reset-quickly: Resetting. (line 9) * magit-reset-soft: Resetting. (line 19) * magit-reset-worktree: Resetting. (line 39) -* magit-reset-worktree <1>: Wip Modes. (line 64) +* magit-reset-worktree <1>: Wip Modes. (line 59) * magit-restore-window-configuration: Modes and Buffers. (line 223) * magit-reverse: Applying. (line 47) * magit-reverse-in-index: Staging and Unstaging. @@ -10552,7 +10512,7 @@ Appendix D Function and Command Index * magit-save-window-configuration: Modes and Buffers. (line 112) * magit-section-backward: Sections. (line 33) * magit-section-backward-siblings: Sections. (line 41) -* magit-section-case: Section Plumbing. (line 182) +* magit-section-case: Section Plumbing. (line 184) * magit-section-cycle: Sections. (line 148) * magit-section-cycle-diffs: Sections. (line 163) * magit-section-cycle-global: Sections. (line 167) @@ -10560,8 +10520,8 @@ Appendix D Function and Command Index * magit-section-forward-siblings: Sections. (line 46) * magit-section-hide: Sections. (line 189) * magit-section-hide-children: Sections. (line 201) -* magit-section-ident: Section Plumbing. (line 126) -* magit-section-match: Section Plumbing. (line 134) +* magit-section-ident: Section Plumbing. (line 127) +* magit-section-match: Section Plumbing. (line 135) * magit-section-set-window-start: Sections. (line 76) * magit-section-show: Sections. (line 186) * magit-section-show-children: Sections. (line 196) @@ -10577,7 +10537,7 @@ Appendix D Function and Command Index * magit-section-toggle: Sections. (line 144) * magit-section-toggle-children: Sections. (line 204) * magit-section-up: Sections. (line 50) -* magit-section-value-if: Section Plumbing. (line 173) +* magit-section-value-if: Section Plumbing. (line 174) * magit-sequence-abort: Cherry Picking. (line 91) * magit-sequence-abort <1>: Cherry Picking. (line 126) * magit-sequence-continue: Cherry Picking. (line 85) @@ -10642,13 +10602,13 @@ Appendix D Function and Command Index * magit-status-maybe-update-revision-buffer: Sections. (line 101) * magit-status-maybe-update-stash-buffer: Sections. (line 106) * magit-status-quick: Status Buffer. (line 70) -* magit-submodule: Submodules. (line 55) -* magit-submodule-add: Submodules. (line 68) -* magit-submodule-populate: Submodules. (line 80) -* magit-submodule-register: Submodules. (line 74) -* magit-submodule-synchronize: Submodules. (line 88) -* magit-submodule-unpopulate: Submodules. (line 93) -* magit-submodule-update: Submodules. (line 84) +* magit-submodule: Submodules. (line 56) +* magit-submodule-add: Submodules. (line 69) +* magit-submodule-populate: Submodules. (line 81) +* magit-submodule-register: Submodules. (line 75) +* magit-submodule-synchronize: Submodules. (line 89) +* magit-submodule-unpopulate: Submodules. (line 94) +* magit-submodule-update: Submodules. (line 85) * magit-subtree: Subtree. (line 9) * magit-subtree-add: Subtree. (line 24) * magit-subtree-add-commit: Subtree. (line 28) @@ -10694,9 +10654,9 @@ Appendix D Function and Command Index * magit-version: Running Git. (line 195) * magit-version <1>: Debugging Tools. (line 11) * magit-visit-ref: References Buffer. (line 159) -* magit-wip-commit: Wip Modes. (line 85) -* magit-wip-log: Wip Modes. (line 47) -* magit-wip-log-current: Wip Modes. (line 55) +* magit-wip-commit: Wip Modes. (line 80) +* magit-wip-log: Wip Modes. (line 42) +* magit-wip-log-current: Wip Modes. (line 50) * magit-worktree: Worktree. (line 9) * magit-worktree-branch: Worktree. (line 16) * magit-worktree-checkout: Worktree. (line 13) @@ -10721,12 +10681,12 @@ Appendix E Variable Index [index] * Menu: -* auto-revert-buffer-list-filter: Modes and Buffers. (line 395) -* auto-revert-interval: Modes and Buffers. (line 391) -* auto-revert-mode: Modes and Buffers. (line 379) -* auto-revert-stop-on-user-input: Modes and Buffers. (line 387) -* auto-revert-use-notify: Modes and Buffers. (line 368) -* auto-revert-verbose: Modes and Buffers. (line 416) +* auto-revert-buffer-list-filter: Modes and Buffers. (line 396) +* auto-revert-interval: Modes and Buffers. (line 392) +* auto-revert-mode: Modes and Buffers. (line 380) +* auto-revert-stop-on-user-input: Modes and Buffers. (line 388) +* auto-revert-use-notify: Modes and Buffers. (line 369) +* auto-revert-verbose: Modes and Buffers. (line 417) * branch.autoSetupMerge: Branching. (line 394) * branch.autoSetupRebase: Branching. (line 408) * branch.NAME.description: Branching. (line 365) @@ -10748,7 +10708,7 @@ Appendix E Variable Index * global-auto-revert-mode: Modes and Buffers. (line 343) * magit-auto-revert-immediately: Modes and Buffers. (line 352) * magit-auto-revert-mode: Modes and Buffers. (line 339) -* magit-auto-revert-tracked-only: Modes and Buffers. (line 373) +* magit-auto-revert-tracked-only: Modes and Buffers. (line 374) * magit-bisect-show-graph: Bisecting. (line 57) * magit-blame-disable-modes: Blaming. (line 165) * magit-blame-echo-style: Blaming. (line 151) @@ -10862,14 +10822,14 @@ Appendix E Variable Index * magit-revision-insert-related-refs: Diffing. (line 366) * magit-revision-show-gravatars: Diffing. (line 375) * magit-revision-use-hash-sections: Diffing. (line 391) -* magit-root-section: Section Plumbing. (line 197) +* magit-root-section: Section Plumbing. (line 199) * magit-save-repository-buffers: Modes and Buffers. (line 314) * magit-section-cache-visibility: Sections. (line 229) * magit-section-initial-visibility-alist: Sections. (line 213) * magit-section-movement-hook: Sections. (line 63) * magit-section-set-visibility-hook: Sections. (line 239) -* magit-section-show-child-count: Sections. (line 366) -* magit-section-visibility-indicator: Sections. (line 256) +* magit-section-show-child-count: Sections. (line 375) +* magit-section-visibility-indicators: Sections. (line 256) * magit-shell-command-verbose-prompt: Running Git. (line 115) * magit-stashes-margin: Stashing. (line 119) * magit-status-file-list-limit: Status Buffer. (line 224) @@ -10884,18 +10844,10 @@ Appendix E Variable Index (line 52) * magit-update-other-window-delay: Sections. (line 121) * magit-visit-ref-behavior: References Buffer. (line 168) -* magit-wip-after-apply-mode: Wip Modes. (line 172) -* magit-wip-after-apply-mode-lighter: Wip Modes. (line 208) -* magit-wip-after-save-local-mode-lighter: Wip Modes. (line 205) -* magit-wip-after-save-mode: Wip Modes. (line 167) -* magit-wip-before-change-mode: Wip Modes. (line 185) -* magit-wip-before-change-mode-lighter: Wip Modes. (line 211) -* magit-wip-initial-backup-mode: Wip Modes. (line 189) -* magit-wip-initial-backup-mode-lighter: Wip Modes. (line 214) -* magit-wip-merge-branch: Wip Modes. (line 104) +* magit-wip-merge-branch: Wip Modes. (line 99) * magit-wip-mode: Wip Modes. (line 30) -* magit-wip-mode-lighter: Wip Modes. (line 98) -* magit-wip-namespace: Wip Modes. (line 91) +* magit-wip-mode-lighter: Wip Modes. (line 93) +* magit-wip-namespace: Wip Modes. (line 86) * notes.displayRef: Notes. (line 57) * pull.rebase: Branching. (line 373) * remote.NAME.fetch: Remotes. (line 108) @@ -10918,174 +10870,173 @@ Node: Getting Started14173 Node: Interface Concepts19984 Node: Modes and Buffers20363 Ref: Switching Buffers21865 -Ref: Naming Buffers26511 -Ref: Quitting Windows29468 -Ref: Automatic Refreshing of Magit Buffers31265 -Ref: Automatic Saving of File-Visiting Buffers33981 -Ref: Automatic Reverting of File-Visiting Buffers34972 -Ref: Risk of Reverting Automatically39764 -Node: Sections42035 -Ref: Section Movement42840 -Ref: Section Visibility48212 -Ref: Section Hooks54790 -Ref: Section Types and Values57079 -Ref: Section Options58380 -Node: Transient Commands58759 -Node: Transient Arguments and Buffer Variables60235 -Node: Completion Confirmation and the Selection67252 -Ref: Action Confirmation67513 -Ref: Completion and Confirmation75886 -Ref: The Selection78917 -Ref: The hunk-internal region81656 -Ref: Support for Completion Frameworks82580 -Ref: Additional Completion Options86649 -Node: Mouse Support87099 -Node: Running Git87675 -Ref: Viewing Git Output87795 -Ref: Git Process Status89701 -Ref: Running Git Manually90799 -Ref: Git Executable93372 -Ref: Global Git Arguments96261 -Node: Inspecting96976 -Node: Status Buffer98133 -Ref: Status Sections102265 -Ref: Status File List Sections105723 -Ref: Status Log Sections108297 -Ref: Status Header Sections109647 -Ref: Status Module Sections112140 -Ref: Status Options114512 -Node: Repository List115781 -Node: Logging120559 -Ref: Refreshing Logs123294 -Ref: Log Buffer124638 -Ref: Log Margin129365 -Ref: Select from Log132422 -Ref: Reflog134540 -Ref: Cherries136087 -Node: Diffing137859 -Ref: Refreshing Diffs141810 -Ref: Commands Available in Diffs145404 -Ref: Diff Options147801 -Ref: Revision Buffer153785 -Node: Ediffing157026 -Node: References Buffer163076 -Ref: References Sections173636 -Node: Bisecting174421 -Node: Visiting Files and Blobs176732 -Ref: General-Purpose Visit Commands177174 -Ref: Visiting Files and Blobs from a Diff177992 -Node: Blaming183246 -Node: Manipulating190234 -Node: Creating Repository190576 -Node: Cloning Repository191113 -Node: Staging and Unstaging197554 -Ref: Staging from File-Visiting Buffers201478 -Node: Applying202493 -Node: Committing204566 -Ref: Initiating a Commit205193 -Ref: Creating a new commit205505 -Ref: Editing the last commit205615 -Ref: Editing any reachable commit207594 -Ref: Editing any reachable commit and rebasing immediately212007 -Ref: Options used by commit commands213655 -Ref: Used by all or most commit commands213727 -Ref: Used by all squash and fixup commands215958 -Ref: Used by specific commit commands216506 -Ref: Editing Commit Messages216830 -Ref: Using the Revision Stack219384 -Ref: Commit Pseudo Headers222316 -Ref: Commit Mode and Hooks223468 -Ref: Commit Message Conventions226181 -Node: Branching228053 -Ref: The Two Remotes228174 -Ref: Branch Commands230743 -Ref: Branch Git Variables243481 -Ref: Auxiliary Branch Commands248728 -Node: Merging249745 -Node: Resolving Conflicts253905 -Node: Rebasing259279 -Ref: Editing Rebase Sequences264239 -Ref: Information About In-Progress Rebase269472 -Ref: Rebasing-Footnote-1278472 -Node: Cherry Picking279068 -Ref: Reverting283378 -Node: Resetting284738 -Node: Stashing286564 -Node: Transferring292805 -Node: Remotes293027 -Ref: Remote Commands293124 -Ref: Remote Git Variables297076 -Node: Fetching298260 -Node: Pulling300743 -Node: Pushing301769 -Node: Plain Patches306060 -Node: Maildir Patches307531 -Node: Miscellaneous309010 -Node: Tagging309356 -Node: Notes311249 -Node: Submodules313584 -Ref: Listing Submodules313745 -Ref: Submodule Transient315801 -Node: Subtree318154 -Node: Worktree320085 -Node: Sparse checkouts321161 -Node: Bundle323937 -Node: Common Commands324312 -Node: Wip Modes326940 -Ref: Wip Graph331786 -Ref: Legacy Wip Modes334020 -Node: Commands for Buffers Visiting Files336828 -Node: Minor Mode for Buffers Visiting Blobs345169 -Node: Customizing346332 -Node: Per-Repository Configuration347928 -Node: Essential Settings350182 -Ref: Safety350471 -Ref: Performance352152 -Ref: Log Performance354945 -Ref: Diff Performance356250 -Ref: Refs Buffer Performance357591 -Ref: Committing Performance358166 -Ref: Microsoft Windows Performance359148 -Ref: MacOS Performance360237 -Ref: Global Bindings361122 -Ref: Essential Settings-Footnote-1363297 -Node: Plumbing363379 -Node: Calling Git364208 -Ref: Getting a Value from Git365667 -Ref: Calling Git for Effect369293 -Node: Section Plumbing375197 -Ref: Creating Sections375349 -Ref: Section Selection379150 -Ref: Matching Sections380825 -Node: Refreshing Buffers386651 -Node: Conventions389795 -Ref: Theming Faces389959 -Node: FAQ398004 -Node: FAQ - How to ...?398442 -Ref: How to pronounce Magit?398575 -Ref: How to show git's output?399269 -Ref: How to install the gitman info manual?399894 -Ref: How to show diffs for gpg-encrypted files?400705 -Ref: How does branching and pushing work?401114 -Ref: Should I disable VC?401278 -Node: FAQ - Issues and Errors401763 -Ref: Magit is slow401908 -Ref: I changed several thousand files at once and now Magit is unusable402054 -Ref: I am having problems committing402593 -Ref: I am using MS Windows and cannot push with Magit402858 -Ref: I am using macOS and SOMETHING works in shell but not in Magit403258 -Ref: Expanding a file to show the diff causes it to disappear403849 -Ref: Point is wrong in the COMMIT_EDITMSG buffer404199 -Ref: The mode-line information isn't always up-to-date405023 -Ref: A branch and tag sharing the same name breaks SOMETHING405862 -Ref: My Git hooks work on the command-line but not inside Magit406510 -Ref: git-commit-mode isn't used when committing from the command-line407102 -Ref: Point ends up inside invisible text when jumping to a file-visiting buffer409100 -Ref: I am no longer able to save popup defaults409692 -Node: Debugging Tools410489 -Node: Keystroke Index414428 -Node: Function and Command Index452524 -Node: Variable Index504096 +Ref: Naming Buffers26523 +Ref: Quitting Windows29498 +Ref: Automatic Refreshing of Magit Buffers31301 +Ref: Automatic Saving of File-Visiting Buffers34035 +Ref: Automatic Reverting of File-Visiting Buffers35032 +Ref: Risk of Reverting Automatically39853 +Node: Sections42124 +Ref: Section Movement42929 +Ref: Section Visibility48301 +Ref: Section Hooks55317 +Ref: Section Types and Values57642 +Ref: Section Options58943 +Node: Transient Commands59322 +Node: Transient Arguments and Buffer Variables60798 +Node: Completion Confirmation and the Selection67815 +Ref: Action Confirmation68076 +Ref: Completion and Confirmation76449 +Ref: The Selection79486 +Ref: The hunk-internal region82225 +Ref: Support for Completion Frameworks83149 +Ref: Additional Completion Options87224 +Node: Mouse Support87674 +Node: Running Git88250 +Ref: Viewing Git Output88370 +Ref: Git Process Status90276 +Ref: Running Git Manually91374 +Ref: Git Executable93947 +Ref: Global Git Arguments96836 +Node: Inspecting97551 +Node: Status Buffer98708 +Ref: Status Sections102840 +Ref: Status File List Sections106310 +Ref: Status Log Sections108884 +Ref: Status Header Sections110234 +Ref: Status Module Sections112727 +Ref: Status Options115111 +Node: Repository List116386 +Node: Logging121175 +Ref: Refreshing Logs123910 +Ref: Log Buffer125254 +Ref: Log Margin129981 +Ref: Select from Log133044 +Ref: Reflog135168 +Ref: Cherries136721 +Node: Diffing138499 +Ref: Refreshing Diffs142450 +Ref: Commands Available in Diffs146044 +Ref: Diff Options148441 +Ref: Revision Buffer154449 +Node: Ediffing157719 +Node: References Buffer163775 +Ref: References Sections174358 +Node: Bisecting175143 +Node: Visiting Files and Blobs177454 +Ref: General-Purpose Visit Commands177896 +Ref: Visiting Files and Blobs from a Diff178714 +Node: Blaming183968 +Node: Manipulating190956 +Node: Creating Repository191298 +Node: Cloning Repository191835 +Node: Staging and Unstaging198276 +Ref: Staging from File-Visiting Buffers202206 +Node: Applying203221 +Node: Committing205294 +Ref: Initiating a Commit205921 +Ref: Creating a new commit206233 +Ref: Editing the last commit206343 +Ref: Editing any reachable commit208322 +Ref: Editing any reachable commit and rebasing immediately212735 +Ref: Options used by commit commands214383 +Ref: Used by all or most commit commands214455 +Ref: Used by all squash and fixup commands216686 +Ref: Used by specific commit commands217240 +Ref: Editing Commit Messages217564 +Ref: Using the Revision Stack220118 +Ref: Commit Pseudo Headers223080 +Ref: Commit Mode and Hooks224232 +Ref: Commit Message Conventions226945 +Node: Branching228835 +Ref: The Two Remotes228956 +Ref: Branch Commands231525 +Ref: Branch Git Variables244275 +Ref: Auxiliary Branch Commands249522 +Node: Merging250539 +Node: Resolving Conflicts254699 +Node: Rebasing260073 +Ref: Editing Rebase Sequences265033 +Ref: Information About In-Progress Rebase270266 +Ref: Rebasing-Footnote-1279266 +Node: Cherry Picking279862 +Ref: Reverting284172 +Node: Resetting285532 +Node: Stashing287358 +Node: Transferring293605 +Node: Remotes293827 +Ref: Remote Commands293924 +Ref: Remote Git Variables297876 +Node: Fetching299060 +Node: Pulling301543 +Node: Pushing302569 +Node: Plain Patches306860 +Node: Maildir Patches308331 +Node: Miscellaneous309810 +Node: Tagging310156 +Node: Notes312049 +Node: Submodules314384 +Ref: Listing Submodules314545 +Ref: Submodule Transient316612 +Node: Subtree318971 +Node: Worktree320902 +Node: Sparse checkouts322217 +Node: Bundle324993 +Node: Common Commands325368 +Node: Wip Modes327996 +Ref: Wip Graph332574 +Node: Commands for Buffers Visiting Files335013 +Node: Minor Mode for Buffers Visiting Blobs343354 +Node: Customizing344517 +Node: Per-Repository Configuration346113 +Node: Essential Settings348367 +Ref: Safety348656 +Ref: Performance350337 +Ref: Log Performance353130 +Ref: Diff Performance354435 +Ref: Refs Buffer Performance355776 +Ref: Committing Performance356351 +Ref: Microsoft Windows Performance357333 +Ref: MacOS Performance358422 +Ref: Global Bindings359307 +Ref: Essential Settings-Footnote-1361482 +Node: Plumbing361564 +Node: Calling Git362393 +Ref: Getting a Value from Git363852 +Ref: Calling Git for Effect367484 +Node: Section Plumbing373429 +Ref: Creating Sections373581 +Ref: Section Selection377399 +Ref: Matching Sections379098 +Node: Refreshing Buffers385012 +Node: Conventions388156 +Ref: Theming Faces388320 +Node: FAQ396365 +Node: FAQ - How to ...?396803 +Ref: How to pronounce Magit?396936 +Ref: How to show git's output?397630 +Ref: How to install the gitman info manual?398255 +Ref: How to show diffs for gpg-encrypted files?399066 +Ref: How does branching and pushing work?399475 +Ref: Should I disable VC?399639 +Node: FAQ - Issues and Errors400124 +Ref: Magit is slow400269 +Ref: I changed several thousand files at once and now Magit is unusable400415 +Ref: I am having problems committing400954 +Ref: I am using MS Windows and cannot push with Magit401219 +Ref: I am using macOS and SOMETHING works in shell but not in Magit401619 +Ref: Expanding a file to show the diff causes it to disappear402210 +Ref: Point is wrong in the COMMIT_EDITMSG buffer402560 +Ref: The mode-line information isn't always up-to-date403384 +Ref: A branch and tag sharing the same name breaks SOMETHING404223 +Ref: My Git hooks work on the command-line but not inside Magit404871 +Ref: git-commit-mode isn't used when committing from the command-line405463 +Ref: Point ends up inside invisible text when jumping to a file-visiting buffer407461 +Ref: I am no longer able to save popup defaults408053 +Node: Debugging Tools408848 +Node: Keystroke Index412787 +Node: Function and Command Index450883 +Node: Variable Index502455  End Tag Table diff --git a/elpa/magit-section-20251027.1634/dir b/elpa/magit-section-20251220.917/dir similarity index 100% rename from elpa/magit-section-20251027.1634/dir rename to elpa/magit-section-20251220.917/dir diff --git a/elpa/magit-section-20251027.1634/magit-section-autoloads.el b/elpa/magit-section-20251220.917/magit-section-autoloads.el similarity index 100% rename from elpa/magit-section-20251027.1634/magit-section-autoloads.el rename to elpa/magit-section-20251220.917/magit-section-autoloads.el diff --git a/elpa/magit-section-20251027.1634/magit-section-pkg.el b/elpa/magit-section-20251220.917/magit-section-pkg.el similarity index 76% rename from elpa/magit-section-20251027.1634/magit-section-pkg.el rename to elpa/magit-section-20251220.917/magit-section-pkg.el index ff472196..d23fa1fa 100644 --- a/elpa/magit-section-20251027.1634/magit-section-pkg.el +++ b/elpa/magit-section-20251220.917/magit-section-pkg.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "magit-section" "20251027.1634" +(define-package "magit-section" "20251220.917" "Sections for read-only buffers." '((emacs "28.1") (compat "30.1") @@ -7,8 +7,8 @@ (llama "1.0") (seq "2.24")) :url "https://github.com/magit/magit" - :commit "c58fc97c0ae53647148a3b490765d0a02fcb00ce" - :revdesc "c58fc97c0ae5" + :commit "649b4c972151c0ee495876c0d4c8c13787614886" + :revdesc "649b4c972151" :keywords '("tools") :authors '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev"))) diff --git a/elpa/magit-section-20251027.1634/magit-section.el b/elpa/magit-section-20251220.917/magit-section.el similarity index 97% rename from elpa/magit-section-20251027.1634/magit-section.el rename to elpa/magit-section-20251220.917/magit-section.el index 90b1f366..48fae5f2 100644 --- a/elpa/magit-section-20251027.1634/magit-section.el +++ b/elpa/magit-section-20251220.917/magit-section.el @@ -8,8 +8,8 @@ ;; Homepage: https://github.com/magit/magit ;; Keywords: tools -;; Package-Version: 20251027.1634 -;; Package-Revision: c58fc97c0ae5 +;; Package-Version: 20251220.917 +;; Package-Revision: 649b4c972151 ;; Package-Requires: ( ;; (emacs "28.1") ;; (compat "30.1") @@ -105,6 +105,9 @@ similar defect.") (define-obsolete-variable-alias 'magit-keep-region-overlay 'magit-section-keep-region-overlay "Magit-Section 4.0.0") +(make-obsolete-variable 'magit-section-visibility-indicator + 'magit-section-visibility-indicators "Magit-Section 4.5.0") + ;;; Hooks (defvar magit-section-movement-hook nil @@ -194,15 +197,17 @@ entries of this alist." (const show) function))) -(defcustom magit-section-visibility-indicator - (if (window-system) - '(magit-fringe-bitmap> . magit-fringe-bitmapv) - (cons (if (char-displayable-p ?…) "…" "...") - t)) +(defcustom magit-section-visibility-indicators + `((magit-fringe-bitmap> . magit-fringe-bitmapv) + (,(if (char-displayable-p ?…) "…" "...") . t)) "Whether and how to indicate that a section can be expanded/collapsed. -If nil, then don't show any indicators. -Otherwise the value has to have one of these three forms: +If nil, then don't show any indicators. Otherwise the value has to +be a list with two elements. The first controls the indicators used +in graphical frames, the second the indicators in terminal frames. +For graphical frames all of the following forms are valid, while +terminal frames do not have fringes and thus do not support the first +form. \(EXPANDABLE-BITMAP . COLLAPSIBLE-BITMAP) @@ -228,7 +233,9 @@ Otherwise the value has to have one of these three forms: doing so is kinda ugly." :package-version '(magit-section . "3.0.0") :group 'magit-section - :type '(choice (const :tag "No indicators" nil) + :type '(choice + (const :tag "No indicators" nil) + (list (choice :tag "In graphical frames" (cons :tag "Use +- fringe indicators" :format "%{%t%}%v\n" (const :format " " magit-fringe-bitmap+) @@ -251,7 +258,16 @@ Otherwise the value has to have one of these three forms: (string :tag "Ellipsis" "…") (choice :tag "Use face kludge" (const :tag "Yes (potentially slow)" t) - (const :tag "No (kinda ugly)" nil))))) + (const :tag "No (kinda ugly)" nil)))) + (choice :tag "In terminal frames" + (cons :tag "Use margin indicators" + (character :tag "Expandable char" ?+) + (character :tag "Collapsible char" ?-)) + (cons :tag "Use ellipses at end of headings" + (string :tag "Ellipsis" "…") + (choice :tag "Use face kludge" + (const :tag "Yes (potentially slow)" t) + (const :tag "No (kinda ugly)" nil))))))) (defcustom magit-section-keep-region-overlay nil "Whether to keep the region overlay when there is a valid selection. @@ -376,7 +392,7 @@ but that ship has sailed, thus this option." "Face used for the left margin. Currently this is only used for section visibility indicators, and only -when `magit-section-visibility-indicator' is configured to show them in +when `magit-section-visibility-indicators' is configured to show them in the margin. Due to limitations of how the margin works in Emacs, this is only used @@ -1975,10 +1991,9 @@ When `magit-section-preserve-visibility' is nil, return nil." (cl-defun magit-section-cache-visibility (&optional (section magit-insert-section--current)) "Cache SECTION's current visibility." - (setf (compat-call alist-get - (magit-section-ident section) - magit-section-visibility-cache - nil nil #'equal) + (setf (alist-get (magit-section-ident section) + magit-section-visibility-cache + nil nil #'equal) (if (oref section hidden) 'hide 'show))) (cl-defun magit-section-maybe-cache-visibility @@ -1988,18 +2003,24 @@ When `magit-section-preserve-visibility' is nil, return nil." magit-section-cache-visibility)) (magit-section-cache-visibility section))) +(defun magit-section-visibility-indicator () + (if (window-system) + (car magit-section-visibility-indicators) + (cadr magit-section-visibility-indicators))) + (defun magit-section-maybe-update-visibility-indicator (section) - (when (and magit-section-visibility-indicator - (magit-section-content-p section)) + (when-let* ((indicator (magit-section-visibility-indicator)) + (_(magit-section-content-p section))) (let* ((beg (oref section start)) (eoh (magit--eol-position beg)) - (indicator (if (oref section hidden) - (car magit-section-visibility-indicator) - (cdr magit-section-visibility-indicator))) - (kind (cl-typecase (car magit-section-visibility-indicator) + (kind (cl-typecase (car indicator) (symbol 'fringe) (character 'margin) - (string 'ellipsis)))) + (string 'ellipsis))) + (indicator (if (or (oref section hidden) + (eq kind 'ellipsis)) + (car indicator) + (cdr indicator)))) (pcase kind ((or 'fringe 'margin) (let ((ov (magit--overlay-at beg 'magit-vis-indicator kind))) @@ -2035,7 +2056,8 @@ When `magit-section-preserve-visibility' is nil, return nil." ;; This is needed because we hide the body instead of "the body ;; except the final newline and additionally the newline before ;; the body"; otherwise we could use `buffer-invisibility-spec'. - (when (stringp (car-safe magit-section-visibility-indicator)) + (when-let* ((indicator (car (magit-section-visibility-indicator))) + (_(stringp indicator))) (let* ((sections (append magit--ellipses-sections (setq magit--ellipses-sections (or (magit-region-sections) @@ -2057,7 +2079,7 @@ When `magit-section-preserve-visibility' is nil, return nil." (overlay-put ov 'after-string (propertize - (car magit-section-visibility-indicator) 'font-lock-face + indicator 'font-lock-face (let ((pos (overlay-start ov))) (delq nil (nconc (mapcar (##overlay-get % 'font-lock-face) (overlays-at pos)) @@ -2065,7 +2087,7 @@ When `magit-section-preserve-visibility' is nil, return nil." pos 'font-lock-face)))))))))))) (defun magit-section-maybe-remove-visibility-indicator (section) - (when (and magit-section-visibility-indicator + (when (and (magit-section-visibility-indicator) (= (oref section content) (oref section end))) (dolist (o (overlays-in (oref section start) diff --git a/elpa/magit-section-20251027.1634/magit-section.info b/elpa/magit-section-20251220.917/magit-section.info similarity index 85% rename from elpa/magit-section-20251027.1634/magit-section.info rename to elpa/magit-section-20251220.917/magit-section.info index 139d3227..78544699 100644 --- a/elpa/magit-section-20251027.1634/magit-section.info +++ b/elpa/magit-section-20251220.917/magit-section.info @@ -99,12 +99,13 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev appropriate package prefix. This works due to some undocumented kludges, which are not available to other packages. - When optional HIDE is non-nil collapse the section body by default, - i.e., when first creating the section, but not when refreshing the - buffer. Else expand it by default. This can be overwritten using - ‘magit-section-set-visibility-hook’. When a section is recreated - during a refresh, then the visibility of predecessor is inherited - and HIDE is ignored (but the hook is still honored). + When optional HIDE is non-‘nil’ collapse the section body by + default, i.e., when first creating the section, but not when + refreshing the buffer. Else expand it by default. This can be + overwritten using ‘magit-section-set-visibility-hook’. When a + section is recreated during a refresh, then the visibility of + predecessor is inherited and HIDE is ignored (but the hook is still + honored). BODY is any number of forms that actually insert the section’s heading and body. Optional NAME, if specified, has to be a symbol, @@ -131,10 +132,10 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev at ‘point’. The section should only contain a single line when this function is used like this. - When called with arguments ARGS, which have to be strings, or nil, - then insert those strings at point. The section should not contain - any text before this happens and afterwards it should again only - contain a single line. If the ‘face’ property is set anywhere + When called with arguments ARGS, which have to be strings, or + ‘nil’, then insert those strings at point. The section should not + contain any text before this happens and afterwards it should again + only contain a single line. If the ‘face’ property is set anywhere inside any of these strings, then insert all of them unchanged. Otherwise use the ‘magit-section-heading’ face for all inserted text. @@ -142,19 +143,19 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev The ‘content’ property of the section object is the end of the heading (which lasts from ‘start’ to ‘content’) and the beginning of the the body (which lasts from ‘content’ to ‘end’). If the - value of ‘content’ is nil, then the section has no heading and its - body cannot be collapsed. If a section does have a heading, then - its height must be exactly one line, including a trailing newline - character. This isn’t enforced, you are responsible for getting it - right. The only exception is that this function does insert a - newline character if necessary. + value of ‘content’ is ‘nil’, then the section has no heading and + its body cannot be collapsed. If a section does have a heading, + then its height must be exactly one line, including a trailing + newline character. This isn’t enforced, you are responsible for + getting it right. The only exception is that this function does + insert a newline character if necessary. If provided, optional CHILD-COUNT must evaluate to an integer or - boolean. If t, then the count is determined once the children have - been inserted, using ‘magit-insert-child-count’ (which see). For - historic reasons, if the heading ends with ":", the count is + boolean. If ‘t’, then the count is determined once the children + have been inserted, using ‘magit-insert-child-count’ (which see). + For historic reasons, if the heading ends with ":", the count is substituted for that, at this time as well. If - ‘magit-section-show-child-count’ is nil, no counts are inserted + ‘magit-section-show-child-count’ is ‘nil’, no counts are inserted -- Macro: magit-insert-section-body &rest body Use BODY to insert the section body, once the section is expanded. @@ -203,17 +204,18 @@ Function magit-section-at &optional position -- Function: magit-get-section ident &optional root Return the section identified by IDENT. IDENT has to be a list as - returned by ‘magit-section-ident’. If optional ROOT is non-nil, + returned by ‘magit-section-ident’. If optional ROOT is non-‘nil’, then search in that section tree instead of in the one whose root ‘magit-root-section’ is. -- Function: magit-section-lineage section &optional raw - Return the lineage of SECTION. If optional RAW is non-nil, return - a list of section objects, beginning with SECTION, otherwise return - a list of section types. + Return the lineage of SECTION. If optional RAW is non-‘nil’, + return a list of section objects, beginning with SECTION, otherwise + return a list of section types. -- Function: magit-section-content-p section - Return non-nil if SECTION has content or an unused washer function. + Return non-‘nil’ if SECTION has content or an unused washer + function. The next two functions are replacements for the Emacs functions that have the same name except for the ‘magit-’ prefix. Like @@ -246,10 +248,10 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: -- Function: magit-section-match condition &optional (section (magit-current-section)) - Return t if SECTION matches CONDITION. + Return ‘t’ if SECTION matches CONDITION. SECTION defaults to the section at point. If SECTION is not - specified and there also is no section at point, then return nil. + specified and there also is no section at point, then return ‘nil’. CONDITION can take the following forms: @@ -279,9 +281,10 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: -- Function: magit-section-value-if condition &optional section If the section at point matches CONDITION, then return its value. - If optional SECTION is non-nil then test whether that matches - instead. If there is no section at point and SECTION is nil, then - return nil. If the section does not match, then return nil. + If optional SECTION is non-‘nil’ then test whether that matches + instead. If there is no section at point and SECTION is ‘nil’, + then return ‘nil’. If the section does not match, then return + ‘nil’. See ‘magit-section-match’ for the forms CONDITION can take. @@ -293,10 +296,10 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: first match are evaluated sequentially and the value of the last form is returned. Inside BODY the symbol ‘it’ is bound to the section at point. If no clause succeeds or if there is no section - at point, return nil. + at point, return ‘nil’. See ‘magit-section-match’ for the forms CONDITION can take. - Additionally a CONDITION of t is allowed in the final clause, and + Additionally a CONDITION of ‘t’ is allowed in the final clause, and matches if no other CONDITION match, even if there is no section at point. @@ -306,8 +309,8 @@ Tag Table: Node: Top808 Node: Introduction2109 Node: Creating Sections2879 -Node: Core Functions7812 -Node: Matching Functions10964 +Node: Core Functions7846 +Node: Matching Functions11021  End Tag Table -- 2.47.3