From 5a8c729bce3ee5681e2906bae2c954375388da6f Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Mon, 17 Jan 2022 11:57:28 +0100 Subject: [PATCH] update magit Signed-off-by: Andreas Gerler --- bba.org | 8 +- custom.el | 10 +- elpa/magit-20210802.1524/magit.info | 201 - elpa/magit-20210802.1524/magit.info-2 | 3759 ------------ .../AUTHORS.md | 8 + .../LICENSE | 0 .../dir | 0 .../git-rebase.el | 33 +- .../magit-apply.el | 78 +- .../magit-autoloads.el | 113 +- .../magit-autorevert.el | 2 +- .../magit-bisect.el | 14 +- .../magit-blame.el | 16 +- .../magit-bookmark.el | 2 +- .../magit-branch.el | 27 +- elpa/magit-20220116.1908/magit-bundle.el | 135 + .../magit-clone.el | 14 +- .../magit-commit.el | 38 +- .../magit-core.el | 5 +- .../magit-diff.el | 69 +- .../magit-ediff.el | 2 +- .../magit-extras.el | 67 +- .../magit-fetch.el | 60 +- .../magit-files.el | 6 +- .../magit-git.el | 109 +- .../magit-gitignore.el | 8 +- .../magit-imenu.el | 35 +- .../magit-log.el | 49 +- .../magit-margin.el | 2 +- .../magit-merge.el | 6 +- .../magit-mode.el | 90 +- .../magit-notes.el | 2 +- .../magit-obsolete.el | 2 +- .../magit-patch.el | 11 +- .../magit-pkg.el | 14 +- .../magit-process.el | 19 +- .../magit-pull.el | 4 +- .../magit-push.el | 6 +- .../magit-reflog.el | 6 +- .../magit-refs.el | 15 +- .../magit-remote.el | 23 +- .../magit-repos.el | 22 +- .../magit-reset.el | 2 +- .../magit-sequence.el | 43 +- .../magit-stash.el | 18 +- .../magit-status.el | 61 +- .../magit-submodule.el | 19 +- .../magit-subtree.el | 2 +- .../magit-tag.el | 2 +- .../magit-transient.el | 2 +- .../magit-utils.el | 46 +- .../magit-wip.el | 59 +- .../magit-worktree.el | 11 +- .../magit.el | 89 +- .../magit.info} | 5269 +++++++++++++---- .../dir | 0 .../magit-section-autoloads.el | 0 .../magit-section-pkg.el | 6 +- .../magit-section.el | 67 +- .../magit-section.info | 33 +- 60 files changed, 5388 insertions(+), 5431 deletions(-) delete mode 100644 elpa/magit-20210802.1524/magit.info delete mode 100644 elpa/magit-20210802.1524/magit.info-2 rename elpa/{magit-20210802.1524 => magit-20220116.1908}/AUTHORS.md (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/LICENSE (100%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/dir (100%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/git-rebase.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-apply.el (92%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-autoloads.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-autorevert.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-bisect.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-blame.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-bookmark.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-branch.el (98%) create mode 100644 elpa/magit-20220116.1908/magit-bundle.el rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-clone.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-commit.el (94%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-core.el (95%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-diff.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-ediff.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-extras.el (91%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-fetch.el (78%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-files.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-git.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-gitignore.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-imenu.el (88%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-log.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-margin.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-merge.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-mode.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-notes.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-obsolete.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-patch.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-pkg.el (54%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-process.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-pull.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-push.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-reflog.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-refs.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-remote.el (93%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-repos.el (94%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-reset.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-sequence.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-stash.el (98%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-status.el (94%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-submodule.el (97%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-subtree.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-tag.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-transient.el (99%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-utils.el (96%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-wip.el (89%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit-worktree.el (95%) rename elpa/{magit-20210802.1524 => magit-20220116.1908}/magit.el (88%) rename elpa/{magit-20210802.1524/magit.info-1 => magit-20220116.1908/magit.info} (56%) rename elpa/{magit-section-20210801.1004 => magit-section-20220101.841}/dir (100%) rename elpa/{magit-section-20210801.1004 => magit-section-20220101.841}/magit-section-autoloads.el (100%) rename elpa/{magit-section-20210801.1004 => magit-section-20220101.841}/magit-section-pkg.el (59%) rename elpa/{magit-section-20210801.1004 => magit-section-20220101.841}/magit-section.el (97%) rename elpa/{magit-section-20210801.1004 => magit-section-20220101.841}/magit-section.info (96%) diff --git a/bba.org b/bba.org index feeb5c46..d7157b94 100644 --- a/bba.org +++ b/bba.org @@ -302,11 +302,7 @@ Keep track of your important stuff! (package-initialize) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) - ) - (progn - (add-to-list 'load-path "~/.emacs.d/elpa/cl-lib-0.5") - (add-to-list 'load-path "~/.emacs.d/elpa/magit-1.2.0") - )) + )) #+END_SRC * calendar @@ -4323,7 +4319,7 @@ function to convert groups of spaces to hard tabs. ) ) (define-key global-map "\M-g\M-b" 'magit-branch-manager) - (define-key global-map "\M-gb" 'magit-blame-popup) + (define-key global-map "\M-gb" 'magit-blame) (define-key global-map "\C-cm" 'magit-status) (global-set-key (kbd "C-c s-m") 'magit-list-repositories) diff --git a/custom.el b/custom.el index 0110f4d3..03c3c9c9 100644 --- a/custom.el +++ b/custom.el @@ -20,13 +20,13 @@ '(grep-template "grep -i -nH -e ") '(helm-comint-mode-list '(comint-mode slime-repl-mode sql-interactive-mode)) '(history-length 1000) - '(magit-commit-arguments (quote ("--signoff" "--gpg-sign=43BA01102D205F88"))) + '(magit-commit-arguments '("--signoff" "--gpg-sign=43BA01102D205F88")) '(magit-commit-signoff t) - '(magit-git-global-arguments (quote ("--no-pager"))) - '(magit-log-arguments (quote ("--graph" "--decorate" "-n256"))) - '(magit-log-margin (quote (t "%Y-%m-%d %H:%M " magit-log-margin-width t 18))) + '(magit-git-global-arguments '("--no-pager")) + '(magit-log-arguments '("--graph" "--decorate" "-n256")) + '(magit-log-margin '(t "%Y-%m-%d %H:%M " magit-log-margin-width t 18)) '(magit-pull-arguments nil) - '(magit-repo-dirs (quote ("~/git"))) + '(magit-repo-dirs '("~/git")) '(org-agenda-files (quote ("~/workorg/work.org" "~/org/notes.org" "~/org/emacs.org" "~/org/it.org" "~/org/refile.org" "~/org/workhours.org"))) diff --git a/elpa/magit-20210802.1524/magit.info b/elpa/magit-20210802.1524/magit.info deleted file mode 100644 index 3e48d878..00000000 --- a/elpa/magit-20210802.1524/magit.info +++ /dev/null @@ -1,201 +0,0 @@ -This is magit.info, produced by makeinfo version 6.7 from magit.texi. - - Copyright (C) 2015-2021 Jonas Bernoulli - - You can redistribute this document and/or modify it under the terms - of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) - any later version. - - This document is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Magit: (magit). Using Git from Emacs with Magit. -END-INFO-DIR-ENTRY - - -Indirect: -magit.info-1: 754 -magit.info-2: 302197 - -Tag Table: -(Indirect) -Node: Top754 -Node: Introduction6588 -Node: Installation11311 -Node: Installing from Melpa11641 -Node: Installing from the Git Repository12714 -Node: Post-Installation Tasks15446 -Node: Getting Started16731 -Node: Interface Concepts21971 -Node: Modes and Buffers22332 -Node: Switching Buffers24081 -Node: Naming Buffers28832 -Node: Quitting Windows32139 -Node: Automatic Refreshing of Magit Buffers33885 -Node: Automatic Saving of File-Visiting Buffers36779 -Node: Automatic Reverting of File-Visiting Buffers37964 -Node: Risk of Reverting Automatically42959 -Node: Sections45341 -Node: Section Movement46267 -Node: Section Visibility51177 -Node: Section Hooks57254 -Node: Section Types and Values59661 -Node: Section Options60964 -Node: Transient Commands61436 -Node: Transient Arguments and Buffer Variables62673 -Node: Completion Confirmation and the Selection69691 -Node: Action Confirmation70135 -Node: Completion and Confirmation77988 -Node: The Selection81174 -Node: The hunk-internal region84073 -Node: Support for Completion Frameworks85162 -Node: Additional Completion Options90069 -Node: Running Git90668 -Node: Viewing Git Output90941 -Node: Git Process Status92074 -Node: Running Git Manually93039 -Node: Git Executable95509 -Node: Global Git Arguments98511 -Node: Inspecting99317 -Node: Status Buffer100474 -Node: Status Sections104464 -Node: Status Header Sections110016 -Node: Status Module Sections112646 -Node: Status Options115151 -Node: Repository List116620 -Node: Logging119962 -Node: Refreshing Logs122523 -Node: Log Buffer123969 -Node: Log Margin128222 -Node: Select from Log131401 -Node: Reflog133626 -Node: Cherries135283 -Node: Diffing137131 -Node: Refreshing Diffs140210 -Node: Commands Available in Diffs143789 -Node: Diff Options146325 -Node: Revision Buffer151806 -Node: Ediffing155136 -Node: References Buffer158784 -Node: References Sections169304 -Node: Bisecting170165 -Node: Visiting Files and Blobs172517 -Node: General-Purpose Visit Commands172987 -Node: Visiting Files and Blobs from a Diff173943 -Node: Blaming177402 -Node: Manipulating183743 -Node: Creating Repository184085 -Node: Cloning Repository184640 -Node: Staging and Unstaging190045 -Node: Staging from File-Visiting Buffers194128 -Node: Applying195296 -Node: Committing197189 -Node: Initiating a Commit197772 -Node: Editing Commit Messages201707 -Node: Using the Revision Stack204510 -Node: Commit Pseudo Headers207561 -Node: Commit Mode and Hooks208897 -Node: Commit Message Conventions211835 -Node: Branching213963 -Node: The Two Remotes214189 -Node: Branch Commands216842 -Node: Branch Git Variables229553 -Node: Auxiliary Branch Commands234944 -Node: Merging236062 -Node: Resolving Conflicts240070 -Node: Rebasing245071 -Node: Editing Rebase Sequences249930 -Node: Information About In-Progress Rebase254258 -Ref: Information About In-Progress Rebase-Footnote-1263140 -Node: Cherry Picking263736 -Node: Reverting268067 -Node: Resetting269516 -Node: Stashing271382 -Node: Transferring276083 -Node: Remotes276305 -Node: Remote Commands276457 -Node: Remote Git Variables280538 -Node: Fetching281817 -Node: Pulling284304 -Node: Pushing285350 -Node: Plain Patches289688 -Node: Maildir Patches291179 -Node: Miscellaneous292693 -Node: Tagging293007 -Node: Notes294925 -Node: Submodules297297 -Node: Listing Submodules297515 -Node: Submodule Transient298921 -Node: Subtree302197 -Node: Worktree304173 -Node: Common Commands305278 -Node: Wip Modes307401 -Node: Wip Graph312332 -Node: Legacy Wip Modes314646 -Node: Commands for Buffers Visiting Files317541 -Node: Minor Mode for Buffers Visiting Blobs323163 -Node: Customizing323974 -Node: Per-Repository Configuration325570 -Node: Essential Settings327825 -Node: Safety328170 -Node: Performance329931 -Ref: Log Performance332960 -Ref: Diff Performance334270 -Ref: Refs Buffer Performance335611 -Ref: Committing Performance336186 -Node: Microsoft Windows Performance337099 -Node: MacOS Performance338290 -Ref: MacOS Performance-Footnote-1338995 -Node: Default Bindings339077 -Node: Plumbing341319 -Node: Calling Git342148 -Node: Getting a Value from Git343673 -Node: Calling Git for Effect347414 -Node: Section Plumbing353320 -Node: Creating Sections353548 -Node: Section Selection357448 -Node: Matching Sections359247 -Node: Refreshing Buffers365220 -Node: Conventions368368 -Node: Theming Faces368560 -Node: FAQ376675 -Node: FAQ - How to ...?377117 -Node: How to pronounce Magit?377530 -Node: How to show git's output?378332 -Node: How to install the gitman info manual?379118 -Node: How to show diffs for gpg-encrypted files?380088 -Node: How does branching and pushing work?380684 -Node: Can Magit be used as ediff-version-control-package?381047 -Node: Should I disable VC?383065 -Node: FAQ - Issues and Errors383683 -Node: Magit is slow384684 -Node: I changed several thousand files at once and now Magit is unusable384898 -Node: I am having problems committing385627 -Node: I am using MS Windows and cannot push with Magit386108 -Node: I am using OS X and SOMETHING works in shell but not in Magit386725 -Node: Expanding a file to show the diff causes it to disappear387556 -Node: Point is wrong in the COMMIT_EDITMSG buffer388137 -Node: The mode-line information isn't always up-to-date389183 -Node: A branch and tag sharing the same name breaks SOMETHING390246 -Node: My Git hooks work on the command-line but not inside Magit391132 -Node: git-commit-mode isn't used when committing from the command-line391978 -Node: Point ends up inside invisible text when jumping to a file-visiting buffer394249 -Node: I am unable to stage when using Tramp from MS Windows395109 -Node: I am no longer able to save popup defaults396016 -Node: Debugging Tools396976 -Node: Keystroke Index399155 -Node: Command Index433334 -Node: Function Index470546 -Node: Variable Index486959 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/magit-20210802.1524/magit.info-2 b/elpa/magit-20210802.1524/magit.info-2 deleted file mode 100644 index 6be0ba52..00000000 --- a/elpa/magit-20210802.1524/magit.info-2 +++ /dev/null @@ -1,3759 +0,0 @@ -This is magit.info, produced by makeinfo version 6.7 from magit.texi. - - Copyright (C) 2015-2021 Jonas Bernoulli - - You can redistribute this document and/or modify it under the terms - of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) - any later version. - - This document is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Magit: (magit). Using Git from Emacs with Magit. -END-INFO-DIR-ENTRY - - -File: magit.info, Node: Subtree, Next: Worktree, Prev: Submodules, Up: Miscellaneous - -8.4 Subtree -=========== - -Also see *note (gitman)git-subtree::. - -‘O’ (‘magit-subtree’) - - This transient prefix command binds the two sub-transients; one for - importing a subtree and one for exporting a subtree. - -‘O i’ (‘magit-subtree-import’) - - This transient prefix command binds the following suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. - - The suffixes of this command import subtrees. - - If the ‘--prefix’ argument is set, then the suffix commands use - that prefix without prompting the user. If it is unset, then they - read the prefix in the minibuffer. - -‘O i a’ (‘magit-subtree-add’) - - This command adds COMMIT from REPOSITORY as a new subtree at - PREFIX. - -‘O i c’ (‘magit-subtree-add-commit’) - - This command add COMMIT as a new subtree at PREFIX. - -‘O i m’ (‘magit-subtree-merge’) - - This command merges COMMIT into the PREFIX subtree. - -‘O i f’ (‘magit-subtree-pull’) - - This command pulls COMMIT from REPOSITORY into the PREFIX subtree. - -‘O e’ (‘magit-subtree-export’) - - This transient prefix command binds the following suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. - - The suffixes of this command export subtrees. - - If the ‘--prefix’ argument is set, then the suffix commands use - that prefix without prompting the user. If it is unset, then they - read the prefix in the minibuffer. - -‘O e p’ (‘magit-subtree-push’) - - This command extract the history of the subtree PREFIX and pushes - it to REF on REPOSITORY. - -‘O e s’ (‘magit-subtree-split’) - - This command extracts the history of the subtree PREFIX. - - -File: magit.info, Node: Worktree, Next: Common Commands, Prev: Subtree, Up: Miscellaneous - -8.5 Worktree -============ - -Also see *note (gitman)git-worktree::. - -‘%’ (‘magit-worktree’) - - This transient prefix command binds the following suffix commands - and displays them in a temporary buffer until a suffix is invoked. - -‘% b’ (‘magit-worktree-checkout’) - - Checkout BRANCH in a new worktree at PATH. - -‘% c’ (‘magit-worktree-branch’) - - Create a new BRANCH and check it out in a new worktree at PATH. - -‘% m’ (‘magit-worktree-move’) - - Move an existing worktree to a new PATH. - -‘% k’ (‘magit-worktree-delete’) - - Delete a worktree, defaulting to the worktree at point. The - primary worktree cannot be deleted. - -‘% g’ (‘magit-worktree-status’) - - Show the status for the worktree at point. - - If there is no worktree at point, then read one in the minibuffer. - If the worktree at point is the one whose status is already being - displayed in the current buffer, then show it in Dired instead. - - -File: magit.info, Node: Common Commands, Next: Wip Modes, Prev: Worktree, Up: Miscellaneous - -8.6 Common Commands -=================== - -These are some of the commands that can be used in all buffers whose -major-modes derive from ‘magit-mode’. There are other common commands -beside the ones below, but these didn’t fit well anywhere else. - -‘C-w’ (‘magit-copy-section-value’) - - This command saves the value of the current section to the - ‘kill-ring’, and, provided that the current section is a commit, - branch, or tag section, it also pushes the (referenced) revision to - the ‘magit-revision-stack’. - - When the current section is a branch or a tag, and a prefix - argument is used, then it saves the revision at its tip to the - ‘kill-ring’ instead of the reference name. - - When the region is active, this command saves that to the - ‘kill-ring’, like ‘kill-ring-save’ would, instead of behaving as - described above. If a prefix argument is used and the region is - within a hunk, then it strips the diff marker column and keeps only - either the added or removed lines, depending on the sign of the - prefix argument. - -‘M-w’ (‘magit-copy-buffer-revision’) - - This command saves the revision being displayed in the current - buffer to the ‘kill-ring’ and also pushes it to the - ‘magit-revision-stack’. It is mainly intended for use in - ‘magit-revision-mode’ buffers, the only buffers where it is always - unambiguous exactly which revision should be saved. - - Most other Magit buffers usually show more than one revision, in - some way or another, so this command has to select one of them, and - that choice might not always be the one you think would have been - the best pick. - - Outside of Magit ‘M-w’ and ‘C-w’ are usually bound to -‘kill-ring-save’ and ‘kill-region’, and these commands would also be -useful in Magit buffers. Therefore when the region is active, then both -of these commands behave like ‘kill-ring-save’ instead of as described -above. - - -File: magit.info, Node: Wip Modes, Next: Commands for Buffers Visiting Files, Prev: Common Commands, Up: Miscellaneous - -8.7 Wip Modes -============= - -Git keeps *committed* changes around long enough for users to recover -changes they have accidentally deleted. It does so by not garbage -collecting any committed but no longer referenced objects for a certain -period of time, by default 30 days. - - But Git does *not* keep track of *uncommitted* changes in the working -tree and not even the index (the staging area). Because Magit makes it -so convenient to modify uncommitted changes, it also makes it easy to -shoot yourself in the foot in the process. - - For that reason Magit provides a global mode that saves *tracked* -files to work-in-progress references after or before certain actions. -(At present untracked files are never saved and for technical reasons -nothing is saved before the first commit has been created). - - Two separate work-in-progress references are used to track the state -of the index and of the working tree: ‘refs/wip/index/’ and -‘refs/wip/wtree/’, where ‘’ is the full ref of the -current branch, e.g. ‘refs/heads/master’. When the ‘HEAD’ is detached -then ‘HEAD’ is used in place of ‘’. - - Checking out another branch (or detaching ‘HEAD’) causes the use of -different wip refs for subsequent changes. - - -- User Option: magit-wip-mode - - When this mode is enabled, then uncommitted changes are committed - to dedicated work-in-progress refs whenever appropriate (i.e. when - dataloss would be a possibility otherwise). - - 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. - - -- Command: magit-wip-log - - This command shows the log for a branch and its wip refs. With a - negative prefix argument only the worktree wip ref is shown. - - The absolute numeric value of the prefix argument controls how many - "branches" of each wip ref are shown. This is only relevant if the - value of ‘magit-wip-merge-branch’ is ‘nil’. - - -- Command: magit-wip-log-current - - This command shows the log for the current branch and its wip refs. - With a negative prefix argument only the worktree wip ref is shown. - - The absolute numeric value of the prefix argument controls how many - "branches" of each wip ref are shown. This is only relevant if the - value of ‘magit-wip-merge-branch’ is ‘nil’. - -‘X w’ (‘magit-reset-worktree’) - - This command resets the working tree to some commit read from the - user and defaulting to the commit at point, while keeping the - ‘HEAD’ and index as-is. - - This can be used to restore files to the state committed to a wip - ref. Note that this will discard any unstaged changes that might - have existed before invoking this command (but of course only after - committing that to the working tree wip ref). - - Note that even if you enable ‘magit-wip-mode’ this won’t give you -perfect protection. The most likely scenario for losing changes despite -the use of ‘magit-wip-mode’ is making a change outside Emacs and then -destroying it also outside Emacs. In some such a scenario, Magit, being -an Emacs package, didn’t get the opportunity to keep you from shooting -yourself in the foot. - - When you are unsure whether Magit did commit a change to the wip -refs, then you can explicitly request that all changes to all tracked -files are being committed. - -‘M-x magit-wip-commit’ (‘magit-wip-commit’) - - This command commits all changes to all tracked files to the index - and working tree work-in-progress refs. Like the modes described - above, it does not commit untracked files, but it does check all - tracked files for changes. Use this command when you suspect that - the modes might have overlooked a change made outside Emacs/Magit. - - -- User Option: magit-wip-namespace - - The namespace used for work-in-progress refs. It has to end with a - slash. The wip refs are named ‘index/’ and - ‘wtree/’. When snapshots are created while - the ‘HEAD’ is detached then ‘HEAD’ is used in place of - ‘’. - - -- User Option: magit-wip-mode-lighter - - Mode-line lighter for ‘magit-wip--mode’. - -* Menu: - -* Wip Graph:: -* Legacy Wip Modes:: - - -File: magit.info, Node: Wip Graph, Next: Legacy Wip Modes, Up: Wip Modes - -8.7.1 Wip Graph ---------------- - - -- User Option: magit-wip-merge-branch - - 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 - 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. - With this setting wip commits are eventually garbage collected. - - When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like -this: - - *--*--*--*--*--* refs/wip/index/refs/heads/master - / / / - A-----B-----C refs/heads/master - - When ‘magit-wip-merge-branch’ is ‘nil’, then creating a commit on the -real branch and then making a change causes the wip refs to be recreated -to fork from the new commit. But the old commits on the wip refs are -not lost. They are still available from the reflog. To make it easier -to see when the fork point of a wip ref was changed, an additional -commit with the message "restart autosaving" is created on it (‘xxO’ -commits below are such boundary commits). - - Starting with - - BI0---BI1 refs/wip/index/refs/heads/master - / - A---B refs/heads/master - \ - BW0---BW1 refs/wip/wtree/refs/heads/master - - and committing the staged changes and editing and saving a file would -result in - - BI0---BI1 refs/wip/index/refs/heads/master - / - A---B---C refs/heads/master - \ \ - \ CW0---CW1 refs/wip/wtree/refs/heads/master - \ - BW0---BW1 refs/wip/wtree/refs/heads/master@{2} - - The fork-point of the index wip ref is not changed until some change -is being staged. Likewise just checking out a branch or creating a -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. - - -File: magit.info, Node: Legacy Wip Modes, Prev: Wip Graph, Up: Wip Modes - -8.7.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 - -8.8 Commands for Buffers Visiting Files -======================================= - -Magit defines a few global key bindings unless the user sets -‘magit-define-global-key-bindings’ to ‘nil’. This includes binding ‘C-c -M-g’ to ‘magit-file-dispatch’. ‘C-c g’ would be a much better binding -but the ‘C-c ’ namespace is reserved for users, meaning that -packages are not allowed to use it. If you want to use ‘C-c g’, then -you have to add that binding yourself. Also see *note Default -Bindings:: and *note (elisp)Key Binding Conventions::. - - If you want a better binding, you have to add it yourself: - - (global-set-key (kbd "C-c g") 'magit-file-dispatch) - - The key bindings shown below assume that you have not improved the -binding for ‘magit-file-dispatch’. - -‘C-c M-g’ (‘magit-file-dispatch’) - - This transient prefix command binds the following suffix commands - and displays them in a temporary buffer until a suffix is invoked. - - When invoked in a buffer that does not visit a file, then it falls - back to regular ‘magit-dispatch’. - -‘C-c M-g s’ (‘magit-stage-file’) - - Stage all changes to the file being visited in the current buffer. - -‘C-c M-g u’ (‘magit-unstage-file’) - - Unstage all changes to the file being visited in the current - buffer. - -‘C-c M-g c’ (‘magit-commit’) - - This transient prefix command binds the following suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. See *note Initiating a - Commit::. - -‘C-c M-g D’ (‘magit-diff’) - - This transient prefix command binds several diff suffix commands - and infix arguments and displays them in a temporary buffer until a - suffix is invoked. See *note Diffing::. - - This is the same command that ‘d’ is bound to in Magit buffers. If - this command is invoked from a file-visiting buffer, then the - initial value of the option (‘--’) that limits the diff to certain - file(s) is set to the visited file. - -‘C-c M-g d’ (‘magit-diff-buffer-file’) - - This command shows the diff for the file of blob that the current - buffer visits. - - -- User Option: magit-diff-buffer-file-locked - - This option controls whether ‘magit-diff-buffer-file’ uses a - dedicated buffer. See *note Modes and Buffers::. - -‘C-c M-g L’ (‘magit-log’) - - This transient prefix command binds several log suffix commands and - infix arguments and displays them in a temporary buffer until a - suffix is invoked. See *note Logging::. - - This is the same command that ‘l’ is bound to in Magit buffers. If - this command is invoked from a file-visiting buffer, then the - initial value of the option (‘--’) that limits the log to certain - file(s) is set to the visited file. - -‘C-c M-g l’ (‘magit-log-buffer-file’) - - This command shows the log for the file of blob that the current - buffer visits. Renames are followed when a prefix argument is used - or when ‘--follow’ is an active log argument. When the region is - active, the log is restricted to the selected line range. - -‘C-c M-g t’ (‘magit-log-trace-definition’) - - This command shows the log for the definition at point. - - -- User Option: magit-log-buffer-file-locked - - This option controls whether ‘magit-log-buffer-file’ uses a - dedicated buffer. See *note Modes and Buffers::. - -‘C-c M-g B’ (‘magit-blame’) - - This transient prefix command binds all blaming suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. - - For more information about this and the following commands also see - *note Blaming::. - - In addition to the ‘magit-blame’ sub-transient, the dispatch -transient also binds several blaming suffix commands directly. See -*note Blaming:: for information about those commands and bindings. - -‘C-c M-g e’ (‘magit-edit-line-commit’) - - This command makes the commit editable that added the current line. - - With a prefix argument it makes the commit editable that removes - the line, if any. The commit is determined using ‘git blame’ and - made editable using ‘git rebase --interactive’ if it is reachable - from ‘HEAD’, or by checking out the commit (or a branch that points - at it) otherwise. - -‘C-c M-g p’ (‘magit-blob-previous’) - - Visit the previous blob which modified the current file. - - There are a few additional commands that operate on a single file but -are not enabled in the file transient command by default: - - -- Command: magit-file-rename - - This command renames a file read from the user. - - -- Command: magit-file-delete - - This command deletes a file read from the user. - - -- Command: magit-file-untrack - - This command untracks a file read from the user. - - -- Command: magit-file-checkout - - This command updates a file in the working tree and index to the - contents from a revision. Both the revision and file are read from - the user. - - To enable them invoke the transient (‘C-c M-g’), enter "edit mode" -(‘C-x l’), set the "transient level" (‘C-x l’ again), enter ‘5’, and -leave edit mode (‘C-g’). Also see *note (transient)Enabling and -Disabling Suffixes::. - - -File: magit.info, Node: Minor Mode for Buffers Visiting Blobs, Prev: Commands for Buffers Visiting Files, Up: Miscellaneous - -8.9 Minor Mode for Buffers Visiting Blobs -========================================= - -The ‘magit-blob-mode’ enables certain Magit features in blob-visiting -buffers. Such buffers can be created using ‘magit-find-file’ and some -of the commands mentioned below, which also take care of turning on this -minor mode. Currently this mode only establishes a few key bindings, -but this might be extended. - -‘p’ (‘magit-blob-previous’) - - Visit the previous blob which modified the current file. - -‘n’ (‘magit-blob-next’) - - Visit the next blob which modified the current file. - -‘q’ (‘magit-kill-this-buffer’) - - Kill the current buffer. - - -File: magit.info, Node: Customizing, Next: Plumbing, Prev: Miscellaneous, Up: Top - -9 Customizing -************* - -Both Git and Emacs are highly customizable. Magit is both a Git -porcelain as well as an Emacs package, so it makes sense to customize it -using both Git variables as well as Emacs options. However this -flexibility doesn’t come without problems, including but not limited to -the following. - - • Some Git variables automatically have an effect in Magit without - requiring any explicit support. Sometimes that is desirable - in - other cases, it breaks Magit. - - When a certain Git setting breaks Magit but you want to keep using - that setting on the command line, then that can be accomplished by - overriding the value for Magit only by appending something like - ‘("-c" "some.variable=compatible-value")’ to - ‘magit-git-global-arguments’. - - • Certain settings like ‘fetch.prune=true’ are respected by Magit - commands (because they simply call the respective Git command) but - their value is not reflected in the respective transient buffers. - In this case the ‘--prune’ argument in ‘magit-fetch’ might be - active or inactive, but that doesn’t keep the Git variable from - being honored by the suffix commands anyway. So pruning might - happen despite the ‘--prune’ arguments being displayed in a way - that seems to indicate that no pruning will happen. - - I intend to address these and similar issues in a future release. - -* Menu: - -* Per-Repository Configuration:: -* Essential Settings:: - - -File: magit.info, Node: Per-Repository Configuration, Next: Essential Settings, Up: Customizing - -9.1 Per-Repository Configuration -================================ - -Magit can be configured on a per-repository level using both Git -variables as well as Emacs options. - - To set a Git variable for one repository only, simply set it in -‘/path/to/repo/.git/config’ instead of ‘$HOME/.gitconfig’ or -‘/etc/gitconfig’. See *note (gitman)git-config::. - - Similarly, Emacs options can be set for one repository only by -editing ‘/path/to/repo/.dir-locals.el’. See *note (emacs)Directory -Variables::. For example to disable automatic refreshes of -file-visiting buffers in just one huge repository use this: - - • ‘/path/to/huge/repo/.dir-locals.el’ - - ((nil . ((magit-refresh-buffers . nil)))) - - It might only be costly to insert certain information into Magit -buffers for repositories that are exceptionally large, in which case you -can disable the respective section inserters just for that repository: - - • ‘/path/to/tag/invested/repo/.dir-locals.el’ - - ((magit-status-mode - . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header))))) - - -- Function: magit-disable-section-inserter fn - - This function disables the section inserter FN in the current - repository. It is only intended for use in ‘.dir-locals.el’ and - ‘.dir-locals-2.el’. - - If you want to apply the same settings to several, but not all, -repositories then keeping the repository-local config files in sync -would quickly become annoying. To avoid that you can create config -files for certain classes of repositories (e.g. "huge repositories") -and then include those files in the per-repository config files. For -example: - - • ‘/path/to/huge/repo/.git/config’ - - [include] - path = /path/to/huge-gitconfig - - • ‘/path/to/huge-gitconfig’ - - [status] - showUntrackedFiles = no - - • ‘$HOME/.emacs.d/init.el’ - - (dir-locals-set-class-variables 'huge-git-repository - '((nil . ((magit-refresh-buffers . nil))))) - - (dir-locals-set-directory-class - "/path/to/huge/repo/" 'huge-git-repository) - - -File: magit.info, Node: Essential Settings, Prev: Per-Repository Configuration, Up: Customizing - -9.2 Essential Settings -====================== - -The next two sections list and discuss several variables that many users -might want to customize, for safety and/or performance reasons. - -* Menu: - -* Safety:: -* Performance:: -* Default Bindings:: - - -File: magit.info, Node: Safety, Next: Performance, Up: Essential Settings - -9.2.1 Safety ------------- - -This section discusses various variables that you might want to change -(or *not* change) for safety reasons. - - Git keeps *committed* changes around long enough for users to recover -changes they have accidentally been deleted. It does not do the same -for *uncommitted* changes in the working tree and not even the index -(the staging area). Because Magit makes it so easy to modify -uncommitted changes, it also makes it easy to shoot yourself in the foot -in the process. For that reason Magit provides three global modes that -save *tracked* files to work-in-progress references after or before -certain actions. See *note Wip Modes::. - - These modes are not enabled by default because of performance -concerns. Instead a lot of potentially destructive commands require -confirmation every time they are used. In many cases this can be -disabled by adding a symbol to ‘magit-no-confirm’ (see *note Completion -and Confirmation::). If you enable the various wip modes then you -should add ‘safe-with-wip’ to this list. - - Similarly it isn’t necessary to require confirmation before moving a -file to the system trash - if you trashed a file by mistake then you can -recover it from there. Option ‘magit-delete-by-moving-to-trash’ -controls whether the system trash is used, which is the case by default. -Nevertheless, ‘trash’ isn’t a member of ‘magit-no-confirm’ - you might -want to change that. - - By default buffers visiting files are automatically reverted when the -visited file changes on disk. This isn’t as risky as it might seem, but -to make an informed decision you should see *note Risk of Reverting -Automatically::. - - -File: magit.info, Node: Performance, Next: Default Bindings, Prev: Safety, Up: Essential Settings - -9.2.2 Performance ------------------ - -After Magit has run ‘git’ for side-effects, it also refreshes the -current Magit buffer and the respective status buffer. This is -necessary because otherwise outdated information might be displayed -without the user noticing. Magit buffers are updated by recreating -their content from scratch, which makes updating simpler and less -error-prone, but also more costly. Keeping it simple and just -re-creating everything from scratch is an old design decision and -departing from that will require major refactoring. - - I plan to do that in time for the next major release. I also intend -to create logs and diffs asynchronously, which should also help a lot -but also requires major refactoring. - - Meanwhile you can tell Magit to only automatically refresh the -current Magit buffer, but not the status buffer. If you do that, then -the status buffer is only refreshed automatically if it is the current -buffer. - - (setq magit-refresh-status-buffer nil) - - You should also check whether any third-party packages have added -anything to ‘magit-refresh-buffer-hook’, ‘magit-status-refresh-hook’, -‘magit-pre-refresh-hook’, and ‘magit-post-refresh-hook’. If so, then -check whether those additions impact performance significantly. - - Magit can be told to refresh buffers verbosely using ‘M-x -magit-toggle-verbose-refresh’. Enabling this helps figuring out which -sections are bottlenecks. The additional output can be found in the -‘*Messages*’ buffer. - - Magit also reverts buffers for visited files located inside the -current repository when the visited file changes on disk. That is -implemented on top of ‘auto-revert-mode’ from the built-in library -‘autorevert’. To figure out whether that impacts performance, check -whether performance is significantly worse, when many buffers exist -and/or when some buffers visit files using TRAMP. If so, then this -should help. - - (setq auto-revert-buffer-list-filter - 'magit-auto-revert-repository-buffer-p) - - For alternative approaches see *note Automatic Reverting of -File-Visiting Buffers::. - - If you have enabled any features that are disabled by default, then -you should check whether they impact performance significantly. It’s -likely that they were not enabled by default because it is known that -they reduce performance at least in large repositories. - - If performance is only slow inside certain unusually large -repositories, then you might want to disable certain features on a -per-repository or per-repository-class basis only. See *note -Per-Repository Configuration::. For example it takes a long time to -determine the next and current tag in repository with exceptional -numbers of tags. It would therefore be a good idea to disable -‘magit-insert-tags-headers’, as explained at the mentioned node. - -* Menu: - -* Microsoft Windows Performance:: -* MacOS Performance:: - -Log Performance -............... - -When showing logs, Magit limits the number of commits initially shown in -the hope that this avoids unnecessary work. When using ‘--graph’ is -used, then this unfortunately does not have the desired effect for large -histories. Junio, Git’s maintainer, said on the git mailing list -(): "‘--graph’ wants to -compute the whole history and the max-count only affects the output -phase after ‘--graph’ does its computation". - - In other words, it’s not that Git is slow at outputting the -differences, or that Magit is slow at parsing the output - the problem -is that Git first goes outside and has a smoke. - - We actually work around this issue by limiting the number of commits -not only by using ‘-’ but by also using a range. But unfortunately -that’s not always possible. - - When more than a few thousand commits are shown, then the use of -‘--graph’ can slow things down. - - Using ‘--color --graph’ is even slower. Magit uses code that is part -of Emacs to turn control characters into faces. That code is pretty -slow and this is quite noticeable when showing a log with many branches -and merges. For that reason ‘--color’ is not enabled by default -anymore. Consider leaving it at that. - -Diff Performance -................ - -If diffs are slow, then consider turning off some optional diff features -by setting all or some of the following variables to ‘nil’: -‘magit-diff-highlight-indentation’, ‘magit-diff-highlight-trailing’, -‘magit-diff-paint-whitespace’, ‘magit-diff-highlight-hunk-body’, and -‘magit-diff-refine-hunk’. - - When showing a commit instead of some arbitrary diff, then some -additional information is displayed. Calculating this information can -be quite expensive given certain circumstances. If looking at a commit -using ‘magit-revision-mode’ takes considerably more time than looking at -the same commit in ‘magit-diff-mode’, then consider setting -‘magit-revision-insert-related-refs’ to ‘nil’. - - When you are often confronted with diffs that contain deleted files, -then you might want to enable the ‘--irreversible-delete’ argument. If -you do that then diffs still show that a file was deleted but without -also showing the complete deleted content of the file. This argument is -not available by default, see *note (transient)Enabling and Disabling -Suffixes::. Once you have done that you should enable it and save that -setting, see *note (transient)Saving Values::. You should do this in -both the diff (‘d’) and the diff refresh (‘D’) transient popups. - -Refs Buffer Performance -....................... - -When refreshing the "references buffer" is slow, then that’s usually -because several hundred refs are being displayed. The best way to -address that is to display fewer refs, obviously. - - If you are not, or only mildly, interested in seeing the list of -tags, then start by not displaying them: - - (remove-hook 'magit-refs-sections-hook 'magit-insert-tags) - - Then you should also make sure that the listed remote branches -actually all exist. You can do so by pruning branches which no longer -exist using ‘f-pa’. - -Committing Performance -...................... - -When you initiate a commit, then Magit by default automatically shows a -diff of the changes you are about to commit. For large commits this can -take a long time, which is especially distracting when you are -committing large amounts of generated data which you don’t actually -intend to inspect before committing. This behavior can be turned off -using: - - (remove-hook 'server-switch-hook 'magit-commit-diff) - - Then you can type ‘C-c C-d’ to show the diff when you actually want -to see it, but only then. Alternatively you can leave the hook alone -and just type ‘C-g’ in those cases when it takes too long to generate -the diff. If you do that, then you will end up with a broken diff -buffer, but doing it this way has the advantage that you usually get to -see the diff, which is useful because it increases the odds that you -spot potential issues. - - -File: magit.info, Node: Microsoft Windows Performance, Next: MacOS Performance, Up: Performance - -Microsoft Windows Performance -............................. - -In order to update the status buffer, ‘git’ has to be run a few dozen -times. That is problematic on Microsoft Windows, because that operating -system is exceptionally slow at starting processes. Sadly this is an -issue that can only be fixed by Microsoft itself, and they don’t appear -to be particularly interested in doing so. - - Beside the subprocess issue, there are also other Windows-specific -performance issues. Some of these have workarounds. The maintainers of -"Git for Windows" try to improve performance on Windows. Always use the -latest release in order to benefit from the latest performance tweaks. -Magit too tries to work around some Windows-specific issues. - - According to some sources, setting the following Git variables can -also help. - - git config --global core.preloadindex true # default since v2.1 - git config --global core.fscache true # default since v2.8 - git config --global gc.auto 256 - - You should also check whether an anti-virus program is affecting -performance. - - -File: magit.info, Node: MacOS Performance, Prev: Microsoft Windows Performance, Up: Performance - -MacOS Performance -................. - -Before Emacs 26.1 child processes were created using ‘fork’ on macOS. -That needlessly copied GUI resources, which is expensive. The result -was that forking took about 30 times as long on Darwin than on Linux, -and because Magit starts many ‘git’ processes that made quite a -difference. - - So make sure that you are using at least Emacs 26.1, in which case -the faster ‘vfork’ will be used. (The creation of child processes still -takes about twice as long on Darwin compared to Linux.) See (1) for -more information. - - ---------- Footnotes ---------- - - (1) - - - -File: magit.info, Node: Default Bindings, Prev: Performance, Up: Essential Settings - -9.2.3 Default Bindings ----------------------- - - -- User Option: magit-define-global-key-bindings - - This option controls whether some Magit commands are automatically - bound in the global keymap even before Magit is used for the first - time in the current session. - - If this variable is non-nil, which it is by default, then the - following bindings may be added to the global keymap. - - ‘C-x g’ ‘magit-status’ - ‘C-x M-g’ ‘magit-dispatch’ - ‘C-c M-g’ ‘magit-file-dispatch’ - - These bindings may be added when ‘after-init-hook’ is run. Each - binding is added if and only if at that time no other key is bound - to the same command and no other command is bound to the same key. - In other words we try to avoid adding bindings that are - unnecessary, as well as bindings that conflict with other bindings. - - Adding the above bindings is delayed until ‘after-init-hook’ is - called to allow users to set the variable anywhere in their init - file (without having to make sure to do so before ‘magit’ is loaded - or autoloaded) and to increase the likelihood that all the - potentially conflicting user bindings have already been added. - - To set this variable use either ‘setq’ or the Custom interface. Do - not use the function ‘customize-set-variable’ because doing that - would cause Magit to be loaded immediately when that form is - evaluated (this differs from ‘custom-set-variables’, which doesn’t - load the libraries that define the customized variables). - - Setting this variable to nil has no effect if that is done after - the key bindings have already been added. - - We recommend that you bind ‘C-c g’ instead of ‘C-c M-g’ to - ‘magit-file-dispatch’. The former is a much better binding but the - ‘C-c ’ namespace is strictly reserved for users; preventing - Magit from using it by default. - - (global-set-key (kbd "C-c g") 'magit-file-dispatch) - - Also see *note Commands for Buffers Visiting Files:: and *note - (elisp)Key Binding Conventions::. - - -File: magit.info, Node: Plumbing, Next: FAQ, Prev: Customizing, Up: Top - -10 Plumbing -*********** - -The following sections describe how to use several of Magit’s core -abstractions to extend Magit itself or implement a separate extension. - - A few of the low-level features used by Magit have been factored out -into separate libraries/packages, so that they can be used by other -packages, without having to depend on Magit. See *note -(with-editor)Top:: for information about ‘with-editor’. ‘transient’ -doesn’t have a manual yet. - - If you are trying to find an unused key that you can bind to a -command provided by your own Magit extension, then checkout -. - -* Menu: - -* Calling Git:: -* Section Plumbing:: -* Refreshing Buffers:: -* Conventions:: - - -File: magit.info, Node: Calling Git, Next: Section Plumbing, Up: Plumbing - -10.1 Calling Git -================ - -Magit provides many specialized functions for calling Git. All of these -functions are defined in either ‘magit-git.el’ or ‘magit-process.el’ and -have one of the prefixes ‘magit-run-’, ‘magit-call-’, ‘magit-start-’, or -‘magit-git-’ (which is also used for other things). - - All of these functions accept an indefinite number of arguments, -which are strings that specify command line arguments for Git (or in -some cases an arbitrary executable). These arguments are flattened -before being passed on to the executable; so instead of strings they can -also be lists of strings and arguments that are ‘nil’ are silently -dropped. Some of these functions also require a single mandatory -argument before these command line arguments. - - Roughly speaking, these functions run Git either to get some value or -for side-effects. The functions that return a value are useful to -collect the information necessary to populate a Magit buffer, while the -others are used to implement Magit commands. - - The functions in the value-only group always run synchronously, and -they never trigger a refresh. The function in the side-effect group can -be further divided into subgroups depending on whether they run Git -synchronously or asynchronously, and depending on whether they trigger a -refresh when the executable has finished. - -* Menu: - -* Getting a Value from Git:: -* Calling Git for Effect:: - - -File: magit.info, Node: Getting a Value from Git, Next: Calling Git for Effect, Up: Calling Git - -10.1.1 Getting a Value from Git -------------------------------- - -These functions run Git in order to get a value, an exit status, or -output. Of course you could also use them to run Git commands that have -side-effects, but that should be avoided. - - -- Function: magit-git-exit-code &rest args - - Executes git with ARGS and returns its exit code. - - -- Function: magit-git-success &rest args - - Executes git with ARGS and returns ‘t’ if the exit code is ‘0’, - ‘nil’ otherwise. - - -- Function: magit-git-failure &rest args - - Executes git with ARGS and returns ‘t’ if the exit code is ‘1’, - ‘nil’ otherwise. - - -- Function: magit-git-true &rest args - - Executes git with ARGS and returns ‘t’ if the first line printed by - git is the string "true", ‘nil’ otherwise. - - -- Function: magit-git-false &rest args - - Executes git with ARGS and returns ‘t’ if the first line printed by - git is the string "false", ‘nil’ otherwise. - - -- Function: magit-git-insert &rest args - - Executes git with ARGS and inserts its output at point. - - -- Function: magit-git-string &rest args - - Executes git with ARGS and returns the first line of its output. - If there is no output or if it begins with a newline character, - then this returns ‘nil’. - - -- Function: magit-git-lines &rest args - - Executes git with ARGS and returns its output as a list of lines. - Empty lines anywhere in the output are omitted. - - -- Function: magit-git-items &rest args - - 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 - 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. - - -- Function: magit-process-git destination &rest args - - Calls Git synchronously in a separate process, returning its exit - code. DESTINATION specifies how to handle the output, like for - ‘call-process’, except that file handlers are supported. Enables - Cygwin’s "noglob" option during the call and ensures unix eol - conversion. - - -- Function: magit-process-file process &optional infile buffer display - &rest args - - Processes files synchronously in a separate process. Identical to - ‘process-file’ but temporarily enables Cygwin’s "noglob" option - during the call and ensures unix eol conversion. - - If an error occurs when using one of the above functions, then that -is usually due to a bug, i.e. using an argument which is not actually -supported. Such errors are usually not reported, but when they occur we -need to be able to debug them. - - -- User Option: magit-git-debug - - Whether to report errors that occur when using ‘magit-git-insert’, - ‘magit-git-string’, ‘magit-git-lines’, or ‘magit-git-items’. This - does not actually raise an error. Instead a message is shown in - the echo area, and git’s standard error is insert into a new - section in the current repository’s process buffer. - - -- Function: magit-git-str &rest args - - This is a variant of ‘magit-git-string’ that ignores the option - ‘magit-git-debug’. It is mainly intended to be used while handling - errors in functions that do respect that option. Using such a - function while handing an error could cause yet another error and - therefore lead to an infinite recursion. You probably won’t ever - need to use this function. - - -File: magit.info, Node: Calling Git for Effect, Prev: Getting a Value from Git, Up: Calling Git - -10.1.2 Calling Git for Effect ------------------------------ - -These functions are used to run git to produce some effect. Most Magit -commands that actually run git do so by using such a function. - - Because we do not need to consume git’s output when using these -functions, their output is instead logged into a per-repository buffer, -which can be shown using ‘$’ from a Magit buffer or ‘M-x magit-process’ -elsewhere. - - These functions can have an effect in two distinct ways. Firstly, -running git may change something, i.e. create or push a new commit. -Secondly, that change may require that Magit buffers are refreshed to -reflect the changed state of the repository. But refreshing isn’t -always desirable, so only some of these functions do perform such a -refresh after git has returned. - - Sometimes it is useful to run git asynchronously. For example, when -the user has just initiated a push, then there is no reason to make her -wait until that has completed. In other cases it makes sense to wait -for git to complete before letting the user do something else. For -example after staging a change it is useful to wait until after the -refresh because that also automatically moves to the next change. - - -- Function: magit-call-git &rest args - - Calls git synchronously with ARGS. - - -- Function: magit-call-process program &rest args - - Calls PROGRAM synchronously with ARGS. - - -- Function: magit-run-git &rest args - - Calls git synchronously with ARGS and then refreshes. - - -- Function: magit-run-git-with-input &rest args - - Calls git synchronously with ARGS and sends it the content of the - current buffer on standard input. - - If the current buffer’s ‘default-directory’ is on a remote - filesystem, this function actually runs git asynchronously. But - then it waits for the process to return, so the function itself is - synchronous. - - -- Function: magit-git &rest args - - Calls git synchronously with ARGS for side-effects only. This - function does not refresh the buffer. - - -- Function: magit-git-wash washer &rest args - - Execute Git with ARGS, inserting washed output at point. Actually - first insert the raw output at point. If there is no output call - ‘magit-cancel-section’. Otherwise temporarily narrow the buffer to - the inserted text, move to its beginning, and then call function - WASHER with ARGS as its sole argument. - - And now for the asynchronous variants. - - -- Function: magit-run-git-async &rest args - - Start Git, prepare for refresh, and return the process object. - ARGS is flattened and then used as arguments to Git. - - Display the command line arguments in the echo area. - - After Git returns some buffers are refreshed: the buffer that was - 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. - - -- Function: magit-run-git-with-editor &rest args - - Export GIT_EDITOR and start Git. Also prepare for refresh and - return the process object. ARGS is flattened and then used as - arguments to Git. - - Display the command line arguments in the echo area. - - After Git returns some buffers are refreshed: the buffer that was - current when this function was called (if it is a Magit buffer and - still alive), as well as the respective Magit status buffer. - - -- 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 - existing buffer. The buffer content becomes the processes standard - input. - - Option ‘magit-git-executable’ specifies the Git executable and - option ‘magit-git-global-arguments’ specifies constant arguments. - The remaining arguments ARGS specify arguments to Git. They are - flattened before use. - - After Git returns, some buffers are refreshed: the buffer that was - 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. - - -- 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 - processes standard input. - - The process is started using ‘start-file-process’ and then setup to - use the sentinel ‘magit-process-sentinel’ and the filter - ‘magit-process-filter’. Information required by these functions is - stored in the process object. When this function returns the - process has not started to run yet so it is possible to override - the sentinel and filter. - - After the process returns, ‘magit-process-sentinel’ refreshes the - buffer that was current when ‘magit-start-process’ 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. - - -- 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. - - -File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Calling Git, Up: Plumbing - -10.2 Section Plumbing -===================== - -* Menu: - -* Creating Sections:: -* Section Selection:: -* Matching Sections:: - - -File: magit.info, Node: Creating Sections, Next: Section Selection, Up: Section Plumbing - -10.2.1 Creating Sections ------------------------- - - -- Macro: magit-insert-section &rest args - - Insert a section at point. - - TYPE is the section type, a symbol. Many commands that act on the - current section behave differently depending on that type. Also if - a variable ‘magit-TYPE-section-map’ exists, then use that as the - text-property ‘keymap’ of all text belonging to the section (but - this may be overwritten in subsections). TYPE can also have the - form ‘(eval FORM)’ in which case FORM is evaluated at runtime. - - 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). - - BODY is any number of forms that actually insert the section’s - heading and body. Optional NAME, if specified, has to be a symbol, - which is then bound to the struct of the section being inserted. - - Before BODY is evaluated the ‘start’ of the section object is set - to the value of ‘point’ and after BODY was evaluated its ‘end’ is - set to the new value of ‘point’; BODY is responsible for moving - ‘point’ forward. - - If it turns out inside BODY that the section is empty, then - ‘magit-cancel-section’ can be used to abort and remove all traces - of the partially inserted section. This can happen when creating a - section by washing Git’s output and Git didn’t actually output - anything this time around. - - -- Function: magit-insert-heading &rest args - - Insert the heading for the section currently being inserted. - - This function should only be used inside ‘magit-insert-section’. - - When called without any arguments, then just set the ‘content’ slot - of the object representing the section being inserted to a marker - 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, 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. - - 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 - 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. - - -- Function: magit-cancel-section - - Cancel the section currently being inserted. This exits the - innermost call to ‘magit-insert-section’ and removes all traces of - what has already happened inside that call. - - -- Function: magit-define-section-jumper sym title &optional value - - Define an interactive function to go to section SYM. TITLE is the - displayed title of the section. - - -File: magit.info, Node: Section Selection, Next: Matching Sections, Prev: Creating Sections, Up: Section Plumbing - -10.2.2 Section Selection ------------------------- - - -- Function: magit-current-section - - Return the section at point. - - -- Function: magit-region-sections &optional condition multiple - - Return a list of the selected sections. - - When the region is active and constitutes a valid section - 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 - begin and end in the same section. - - 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. - - When the region looks like it would in any other buffer then the - selection is invalid. When the selection is valid then the region - uses the ‘magit-section-highlight’ face. This does not apply to - diffs where things get a bit more complicated, but even here if the - 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 - to be valid; all selected sections additionally have to match - CONDITION, or nil is returned. See ‘magit-section-match’ for the - forms CONDITION can take. - - -- Function: magit-region-values &optional condition multiple - - Return a list of the values of the selected sections. - - Return the values that themselves would be returned by - ‘magit-region-sections’ (which see). - - -File: magit.info, Node: Matching Sections, Prev: Section Selection, Up: Section Plumbing - -10.2.3 Matching Sections ------------------------- - -‘M-x magit-describe-section-briefly’ (‘magit-describe-section-briefly’) - - Show information about the section at point. This command is - intended for debugging purposes. - - -- Function: magit-section-ident section - - Return an unique identifier for SECTION. The return value has the - form ‘((TYPE . VALUE)...)’. - - -- 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’. - - -- Function: magit-section-match condition &optional section - - 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’. - - CONDITION can take the following forms: - • ‘(CONDITION...)’ - - matches if any of the CONDITIONs matches. - - • ‘[CLASS...]’ - - matches if the section’s class is the same as the first CLASS - or a subclass of that; the section’s parent class matches the - second CLASS; and so on. - - • ‘[* CLASS...]’ - - matches sections that match ‘[CLASS...]’ and also recursively - all their child sections. - - • ‘CLASS’ - - matches if the section’s class is the same as CLASS or a - subclass of that; regardless of the classes of the parent - sections. - - Each CLASS should be a class symbol, identifying a class that - derives from ‘magit-section’. For backward compatibility CLASS can - also be a "type symbol". A section matches such a symbol if the - value of its ‘type’ slot is ‘eq’. If a type symbol has an entry in - ‘magit--section-type-alist’, then a section also matches that type - if its class is a subclass of the class that corresponds to the - type as per that alist. - - Note that it is not necessary to specify the complete section - lineage as printed by ‘magit-describe-section-briefly’, unless of - course you want to be that precise. - - -- 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. - - See ‘magit-section-match’ for the forms CONDITION can take. - - -- Function: magit-section-case &rest clauses - - Choose among clauses on the type of the section at point. - - Each clause looks like (CONDITION BODY...). The type of the - section is compared against each CONDITION; the BODY forms of the - 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. - - See ‘magit-section-match’ for the forms CONDITION can take. - 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. - - -- Variable: magit-root-section - - The root section in the current buffer. All other sections are - descendants of this section. The value of this variable is set by - ‘magit-insert-section’ and you should never modify it. - - For diff related sections a few additional tools exist. - - -- Function: magit-diff-type &optional section - - Return the diff type of SECTION. - - The returned type is one of the symbols ‘staged’, ‘unstaged’, - ‘committed’, or ‘undefined’. This type serves a similar purpose as - the general type common to all sections (which is stored in the - ‘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. - - 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. - - The section has to be a ‘diff’ or ‘hunk’ section, or a section - 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 - type is always ‘committed’. - - -- Function: magit-diff-scope &optional section strict - - Return the diff scope of SECTION or the selected section(s). - - A diff’s "scope" describes what part of a diff is selected, it is a - symbol, one of ‘region’, ‘hunk’, ‘hunks’, ‘file’, ‘files’, or - ‘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, - 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’. - - 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 - -10.3 Refreshing Buffers -======================= - -All commands that create a new Magit buffer or change what is being -displayed in an existing buffer do so by calling ‘magit-mode-setup’. -Among other things, that function sets the buffer local values of -‘default-directory’ (to the top-level of the repository), -‘magit-refresh-function’, and ‘magit-refresh-args’. - - Buffers are refreshed by calling the function that is the local value -of ‘magit-refresh-function’ (a function named ‘magit-*-refresh-buffer’, -where ‘*’ may be something like ‘diff’) with the value of -‘magit-refresh-args’ as arguments. - - -- Macro: magit-mode-setup buffer switch-func mode refresh-func - &optional refresh-args - - This function displays and selects BUFFER, turns on MODE, and - refreshes a first time. - - This function displays and optionally selects BUFFER by calling - ‘magit-mode-display-buffer’ with BUFFER, MODE and SWITCH-FUNC as - arguments. Then it sets the local value of - ‘magit-refresh-function’ to REFRESH-FUNC and that of - ‘magit-refresh-args’ to REFRESH-ARGS. Finally it creates the - buffer content by calling REFRESH-FUNC with REFRESH-ARGS as - arguments. - - All arguments are evaluated before switching to BUFFER. - - -- Function: magit-mode-display-buffer buffer mode &optional - switch-function - - This function display BUFFER in some window and select it. BUFFER - may be a buffer or a string, the name of a buffer. The buffer is - returned. - - Unless BUFFER is already displayed in the selected frame, store the - previous window configuration as a buffer local value, so that it - can later be restored by ‘magit-mode-bury-buffer’. - - The buffer is displayed and selected using SWITCH-FUNCTION. If - that is ‘nil’ then ‘pop-to-buffer’ is used if the current buffer’s - major mode derives from ‘magit-mode’. Otherwise ‘switch-to-buffer’ - is used. - - -- Variable: magit-refresh-function - - The value of this buffer-local variable is the function used to - refresh the current buffer. It is called with ‘magit-refresh-args’ - as arguments. - - -- Variable: magit-refresh-args - - The list of arguments used by ‘magit-refresh-function’ to refresh - the current buffer. ‘magit-refresh-function’ is called with these - arguments. - - The value is usually set using ‘magit-mode-setup’, but in some - cases it’s also useful to provide commands that can change the - value. For example, the ‘magit-diff-refresh’ transient can be used - to change any of the arguments used to display the diff, without - having to specify again which differences should be shown, but - ‘magit-diff-more-context’, ‘magit-diff-less-context’ and - ‘magit-diff-default-context’ change just the ‘-U’ argument. In - both case this is done by changing the value of this variable and - then calling this ‘magit-refresh-function’. - - -File: magit.info, Node: Conventions, Prev: Refreshing Buffers, Up: Plumbing - -10.4 Conventions -================ - -Also see *note Completion and Confirmation::. - -* Menu: - -* Theming Faces:: - - -File: magit.info, Node: Theming Faces, Up: Conventions - -10.4.1 Theming Faces --------------------- - -The default theme uses blue for local branches, green for remote -branches, and goldenrod (brownish yellow) for tags. When creating a new -theme, you should probably follow that example. If your theme already -uses other colors, then stick to that. - - In older releases these reference faces used to have a background -color and a box around them. The basic default faces no longer do so, -to make Magit buffers much less noisy, and you should follow that -example at least with regards to boxes. (Boxes were used in the past to -work around a conflict between the highlighting overlay and text -property backgrounds. That’s no longer necessary because highlighting -no longer causes other background colors to disappear.) Alternatively -you can keep the background color and/or box, but then have to take -special care to adjust ‘magit-branch-current’ accordingly. By default -it looks mostly like ‘magit-branch-local’, but with a box (by default -the former is the only face that uses a box, exactly so that it sticks -out). If the former also uses a box, then you have to make sure that it -differs in some other way from the latter. - - The most difficult faces to theme are those related to diffs, -headings, highlighting, and the region. There are faces that fall into -all four groups - expect to spend some time getting this right. - - The ‘region’ face in the default theme, in both the light and dark -variants, as well as in many other themes, distributed with Emacs or by -third-parties, is very ugly. It is common to use a background color -that really sticks out, which is ugly but if that were the only problem -then it would be acceptable. Unfortunately many themes also set the -foreground color, which ensures that all text within the region is -readable. Without doing that there might be cases where some foreground -color is too close to the region background color to still be readable. -But it also means that text within the region loses all syntax -highlighting. - - I consider the work that went into getting the ‘region’ face right to -be a good indicator for the general quality of a theme. My -recommendation for the ‘region’ face is this: use a background color -slightly different from the background color of the ‘default’ face, and -do not set the foreground color at all. So for a light theme you might -use a light (possibly tinted) gray as the background color of ‘default’ -and a somewhat darker gray for the background of ‘region’. That should -usually be enough to not collide with the foreground color of any other -face. But if some other faces also set a light gray as background -color, then you should also make sure it doesn’t collide with those (in -some cases it might be acceptable though). - - Magit only uses the ‘region’ face when the region is "invalid" by its -own definition. In a Magit buffer the region is used to either select -multiple sibling sections, so that commands which support it act on all -of these sections instead of just the current section, or to select -lines within a single hunk section. In all other cases, the section is -considered invalid and Magit won’t act on it. But such invalid sections -happen, either because the user has not moved point enough yet to make -it valid or because she wants to use a non-magit command to act on the -region, e.g. ‘kill-region’. - - So using the regular ‘region’ face for invalid sections is a feature. -It tells the user that Magit won’t be able to act on it. It’s -acceptable if that face looks a bit odd and even (but less so) if it -collides with the background colors of section headings and other things -that have a background color. - - Magit highlights the current section. If a section has subsections, -then all of them are highlighted. This is done using faces that have -"highlight" in their names. For most sections, -‘magit-section-highlight’ is used for both the body and the heading. -Like the ‘region’ face, it should only set the background color to -something similar to that of ‘default’. The highlight background color -must be different from both the ‘region’ background color and the -‘default’ background color. - - For diff related sections Magit uses various faces to highlight -different parts of the selected section(s). Note that hunk headings, -unlike all other section headings, by default have a background color, -because it is useful to have very visible separators between hunks. -That face ‘magit-diff-hunk-heading’, should be different from both -‘magit-diff-hunk-heading-highlight’ and ‘magit-section-highlight’, as -well as from ‘magit-diff-context’ and ‘magit-diff-context-highlight’. -By default we do that by changing the foreground color. Changing the -background color would lead to complications, and there are already -enough we cannot get around. (Also note that it is generally a good -idea for section headings to always be bold, but only for sections that -have subsections). - - When there is a valid region selecting diff-related sibling sections, -i.e. multiple files or hunks, then the bodies of all these sections use -the respective highlight faces, but additionally the headings instead -use one of the faces ‘magit-diff-file-heading-selection’ or -‘magit-diff-hunk-heading-selection’. These faces have to be different -from the regular highlight variants to provide explicit visual -indication that the region is active. - - When theming diff related faces, start by setting the option -‘magit-diff-refine-hunk’ to ‘all’. You might personally prefer to only -refine the current hunk or not use hunk refinement at all, but some of -the users of your theme want all hunks to be refined, so you have to -cater to that. - - (Also turn on ‘magit-diff-highlight-indentation’, -‘magit-diff-highlight-trailing’, and ‘magit-diff-paint-whitespace’; and -insert some whitespace errors into the code you use for testing.) - - For e.g. "added lines" you have to adjust three faces: -‘magit-diff-added’, ‘magit-diff-added-highlight’, and -‘smerge-refined-added’. Make sure that the latter works well with both -of the former, as well as ‘smerge-other’ and ‘diff-added’. Then do the -same for the removed lines, context lines, lines added by us, and lines -added by them. Also make sure the respective added, removed, and -context faces use approximately the same saturation for both the -highlighted and unhighlighted variants. Also make sure the file and -diff headings work nicely with context lines (e.g. make them look -different). Line faces should set both the foreground and the -background color. For example, for added lines use two different -greens. - - It’s best if the foreground color of both the highlighted and the -unhighlighted variants are the same, so you will need to have to find a -color that works well on the highlight and unhighlighted background, the -refine background, and the highlight context background. When there is -an hunk internal region, then the added- and removed-lines background -color is used only within that region. Outside the region the -highlighted context background color is used. This makes it easier to -see what is being staged. With an hunk internal region the hunk heading -is shown using ‘magit-diff-hunk-heading-selection’, and so are the thin -lines that are added around the lines that fall within the region. The -background color of that has to be distinct enough from the various -other involved background colors. - - Nobody said this would be easy. If your theme restricts itself to a -certain set of colors, then you should make an exception here. -Otherwise it would be impossible to make the diffs look good in each and -every variation. Actually you might want to just stick to the default -definitions for these faces. You have been warned. Also please note -that if you do not get this right, this will in some cases look to users -like bugs in Magit - so please do it right or not at all. - - -File: magit.info, Node: FAQ, Next: Debugging Tools, Prev: Plumbing, Up: Top - -Appendix A FAQ -************** - -The next two nodes lists frequently asked questions. For a list of -frequently *and recently* asked questions, i.e. questions that haven’t -made it into the manual yet, see -. - - Please also use the *note Debugging Tools::. - -* Menu: - -* FAQ - How to ...?:: -* FAQ - Issues and Errors:: - - -File: magit.info, Node: FAQ - How to ...?, Next: FAQ - Issues and Errors, Up: FAQ - -A.1 FAQ - How to ...? -===================== - -* Menu: - -* How to pronounce Magit?:: -* How to show git's output?:: -* How to install the gitman info manual?:: -* How to show diffs for gpg-encrypted files?:: -* How does branching and pushing work?:: -* Can Magit be used as ediff-version-control-package?:: -* Should I disable VC?:: - - -File: magit.info, Node: How to pronounce Magit?, Next: How to show git's output?, Up: FAQ - How to ...? - -A.1.1 How to pronounce Magit? ------------------------------ - -Either ‘mu[m's] git’ or ‘magi{c => t}’ is fine. - - The slogan is "It’s Magit! The magical Git client", so it makes -sense to pronounce Magit like magic, while taking into account that C -and T do not sound the same. - - The German "Magie" is not pronounced the same as the English "magic", -so if you speak German then you can use the above rational to justify -using the former pronunciation; ‘Mag{ie => it}’. - - You can also choose to use the former pronunciation just because you -like it better. - - Also see . Also see -. - - -File: magit.info, Node: How to show git's output?, Next: How to install the gitman info manual?, Prev: How to pronounce Magit?, Up: FAQ - How to ...? - -A.1.2 How to show git’s output? -------------------------------- - -To show the output of recently run git commands, press ‘$’ (or, if that -isn’t available, ‘M-x magit-process-buffer’). This will show a buffer -containing a section per git invocation; as always press ‘TAB’ to expand -or collapse them. - - By default, git’s output is only inserted into the process buffer if -it is run for side-effects. When the output is consumed in some way, -also inserting it into the process buffer would be too expensive. For -debugging purposes, it’s possible to do so anyway by setting -‘magit-git-debug’ to ‘t’. - - -File: magit.info, Node: How to install the gitman info manual?, Next: How to show diffs for gpg-encrypted files?, Prev: How to show git's output?, Up: FAQ - How to ...? - -A.1.3 How to install the gitman info manual? --------------------------------------------- - -Git’s manpages can be exported as an info manual called ‘gitman’. -Magit’s own info manual links to nodes in that manual instead of the -actual manpages because Info doesn’t support linking to manpages. - - Unfortunately some distributions do not install the ‘gitman’ manual -by default and you will have to install a separate documentation package -to get it. - - Magit patches Info adding the ability to visit links to the ‘gitman’ -Info manual by instead viewing the respective manpage. If you prefer -that approach, then set the value of ‘magit-view-git-manual-method’ to -one of the supported packages ‘man’ or ‘woman’, e.g.: - - (setq magit-view-git-manual-method 'man) - - -File: magit.info, Node: How to show diffs for gpg-encrypted files?, Next: How does branching and pushing work?, Prev: How to install the gitman info manual?, Up: FAQ - How to ...? - -A.1.4 How to show diffs for gpg-encrypted files? ------------------------------------------------- - -Git supports showing diffs for encrypted files, but has to be told to do -so. Since Magit just uses Git to get the diffs, configuring Git also -affects the diffs displayed inside Magit. - - git config --global diff.gpg.textconv "gpg --no-tty --decrypt" - echo "*.gpg filter=gpg diff=gpg" > .gitattributes - - -File: magit.info, Node: How does branching and pushing work?, Next: Can Magit be used as ediff-version-control-package?, Prev: How to show diffs for gpg-encrypted files?, Up: FAQ - How to ...? - -A.1.5 How does branching and pushing work? ------------------------------------------- - -Please see *note Branching:: and - - - -File: magit.info, Node: Can Magit be used as ediff-version-control-package?, Next: Should I disable VC?, Prev: How does branching and pushing work?, Up: FAQ - How to ...? - -A.1.6 Can Magit be used as ‘ediff-version-control-package’? ------------------------------------------------------------ - -No, it cannot. For that to work the functions ‘ediff-magit-internal’ -and ‘ediff-magit-merge-internal’ would have to be implemented, and they -are not. These two functions are only used by the three commands -‘ediff-revision’, ‘ediff-merge-revisions-with-ancestor’, and -‘ediff-merge-revisions’. - - These commands only delegate the task of populating buffers with -certain revisions to the "internal" functions. The equally important -task of determining which revisions are to be compared/merged is not -delegated. Instead this is done without any support whatsoever from the -version control package/system - meaning that the user has to enter the -revisions explicitly. Instead of implementing ‘ediff-magit-internal’ we -provide ‘magit-ediff-compare’, which handles both tasks like it is 2005. - - The other commands ‘ediff-merge-revisions’ and -‘ediff-merge-revisions-with-ancestor’ are normally not what you want -when using a modern version control system like Git. Instead of letting -the user resolve only those conflicts which Git could not resolve on its -own, they throw away all work done by Git and then expect the user to -manually merge all conflicts, including those that had already been -resolved. That made sense back in the days when version control systems -couldn’t merge (or so I have been told), but not anymore. Once in a -blue moon you might actually want to see all conflicts, in which case -you *can* use these commands, which then use ‘ediff-vc-merge-internal’. -So we don’t actually have to implement ‘ediff-magit-merge-internal’. -Instead we provide the more useful command ‘magit-ediff-resolve’ which -only shows yet-to-be resolved conflicts. - - -File: magit.info, Node: Should I disable VC?, Prev: Can Magit be used as ediff-version-control-package?, Up: FAQ - How to ...? - -A.1.7 Should I disable VC? --------------------------- - -If you don’t use VC (the built-in version control interface) then you -might be tempted to disable it, not least because we used to recommend -that you do that. - - We no longer recommend that you disable VC. Doing so would break -useful third-party packages (such as ‘diff-hl’), which depend on VC -being enabled. - - If you choose to disable VC anyway, then you can do so by changing -the value of ‘vc-handled-backends’. - - -File: magit.info, Node: FAQ - Issues and Errors, Prev: FAQ - How to ...?, Up: FAQ - -A.2 FAQ - Issues and Errors -=========================== - -* Menu: - -* Magit is slow:: -* I changed several thousand files at once and now Magit is unusable:: -* I am having problems committing:: -* I am using MS Windows and cannot push with Magit:: -* I am using OS X and SOMETHING works in shell, but not in Magit: I am using OS X and SOMETHING works in shell but not in Magit. -* Expanding a file to show the diff causes it to disappear:: -* Point is wrong in the COMMIT_EDITMSG buffer:: -* The mode-line information isn't always up-to-date:: -* A branch and tag sharing the same name breaks SOMETHING:: -* My Git hooks work on the command-line but not inside Magit:: -* git-commit-mode isn't used when committing from the command-line:: -* Point ends up inside invisible text when jumping to a file-visiting buffer:: -* I am unable to stage when using Tramp from MS Windows:: -* I am no longer able to save popup defaults:: - - -File: magit.info, Node: Magit is slow, Next: I changed several thousand files at once and now Magit is unusable, Up: FAQ - Issues and Errors - -A.2.1 Magit is slow -------------------- - -See *note Performance::. - - -File: magit.info, Node: I changed several thousand files at once and now Magit is unusable, Next: I am having problems committing, Prev: Magit is slow, Up: FAQ - Issues and Errors - -A.2.2 I changed several thousand files at once and now Magit is unusable ------------------------------------------------------------------------- - -Magit is *currently* not expected to work under such conditions. It -sure would be nice if it did, and v2.5 will hopefully be a big step into -that direction. But it might take until v3.1 to accomplish fully -satisfactory performance, because that requires some heavy refactoring. - - But for now we recommend you use the command line to complete this -one commit. Also see *note Performance::. - - -File: magit.info, Node: I am having problems committing, Next: I am using MS Windows and cannot push with Magit, Prev: I changed several thousand files at once and now Magit is unusable, Up: FAQ - Issues and Errors - -A.2.3 I am having problems committing -------------------------------------- - -That likely means that Magit is having problems finding an appropriate -emacsclient executable. See *note (with-editor)Configuring -With-Editor:: and *note (with-editor)Debugging::. - - -File: magit.info, Node: I am using MS Windows and cannot push with Magit, Next: I am using OS X and SOMETHING works in shell but not in Magit, Prev: I am having problems committing, Up: FAQ - Issues and Errors - -A.2.4 I am using MS Windows and cannot push with Magit ------------------------------------------------------- - -It’s almost certain that Magit is only incidental to this issue. It is -much more likely that this is a configuration issue, even if you can -push on the command line. - - Detailed setup instructions can be found at -. - - -File: magit.info, Node: I am using OS X and SOMETHING works in shell but not in Magit, Next: Expanding a file to show the diff causes it to disappear, Prev: I am using MS Windows and cannot push with Magit, Up: FAQ - Issues and Errors - -A.2.5 I am using OS X and SOMETHING works in shell, but not in Magit --------------------------------------------------------------------- - -This usually occurs because Emacs doesn’t have the same environment -variables as your shell. Try installing and configuring -. By default it -synchronizes ‘$PATH’, which helps Magit find the same ‘git’ as the one -you are using on the shell. - - If SOMETHING is "passphrase caching with gpg-agent for commit and/or -tag signing", then you’ll also need to synchronize ‘$GPG_AGENT_INFO’. - - -File: magit.info, Node: Expanding a file to show the diff causes it to disappear, Next: Point is wrong in the COMMIT_EDITMSG buffer, Prev: I am using OS X and SOMETHING works in shell but not in Magit, Up: FAQ - Issues and Errors - -A.2.6 Expanding a file to show the diff causes it to disappear --------------------------------------------------------------- - -This is probably caused by a change of a ‘diff.*’ Git variable. You -probably set that variable for a reason, and should therefore only undo -that setting in Magit by customizing ‘magit-git-global-arguments’. - - -File: magit.info, Node: Point is wrong in the COMMIT_EDITMSG buffer, Next: The mode-line information isn't always up-to-date, Prev: Expanding a file to show the diff causes it to disappear, Up: FAQ - Issues and Errors - -A.2.7 Point is wrong in the ‘COMMIT_EDITMSG’ buffer ---------------------------------------------------- - -Neither Magit nor ‘git-commit‘ fiddle with point in the buffer used to -write commit messages, so something else must be doing it. - - You have probably globally enabled a mode which does restore point in -file-visiting buffers. It might be a bit surprising, but when you write -a commit message, then you are actually editing a file. - - So you have to figure out which package is doing. ‘saveplace’, -‘pointback’, and ‘session’ are likely candidates. These snippets might -help: - - (setq session-name-disable-regexp "\\(?:\\`'\\.git/[A-Z_]+\\'\\)") - - (with-eval-after-load 'pointback - (lambda () - (when (or git-commit-mode git-rebase-mode) - (pointback-mode -1)))) - - -File: magit.info, Node: The mode-line information isn't always up-to-date, Next: A branch and tag sharing the same name breaks SOMETHING, Prev: Point is wrong in the COMMIT_EDITMSG buffer, Up: FAQ - Issues and Errors - -A.2.8 The mode-line information isn’t always up-to-date -------------------------------------------------------- - -Magit is not responsible for the version control information that is -being displayed in the mode-line and looks something like ‘Git-master’. -The built-in "Version Control" package, also known as "VC", updates that -information, and can be told to do so more often: - - (setq auto-revert-check-vc-info t) - - But doing so isn’t good for performance. For more (overly -optimistic) information see *note (emacs)VC Mode Line::. - - If you don’t really care about seeing this information in the -mode-line, but just don’t want to see _incorrect_ information, then -consider simply not displaying it in the mode-line: - - (setq-default mode-line-format - (delete '(vc-mode vc-mode) mode-line-format)) - - -File: magit.info, Node: A branch and tag sharing the same name breaks SOMETHING, Next: My Git hooks work on the command-line but not inside Magit, Prev: The mode-line information isn't always up-to-date, Up: FAQ - Issues and Errors - -A.2.9 A branch and tag sharing the same name breaks SOMETHING -------------------------------------------------------------- - -Or more generally, ambiguous refnames break SOMETHING. - - Magit assumes that refs are named non-ambiguously across the -"refs/heads/", "refs/tags/", and "refs/remotes/" namespaces (i.e., all -the names remain unique when those prefixes are stripped). We consider -ambiguous refnames unsupported and recommend that you use a -non-ambiguous naming scheme. However, if you do work with a repository -that has ambiguous refnames, please report any issues you encounter so -that we can investigate whether there is a simple fix. - - -File: magit.info, Node: My Git hooks work on the command-line but not inside Magit, Next: git-commit-mode isn't used when committing from the command-line, Prev: A branch and tag sharing the same name breaks SOMETHING, Up: FAQ - Issues and Errors - -A.2.10 My Git hooks work on the command-line but not inside Magit ------------------------------------------------------------------ - -When Magit calls ‘git’ it adds a few global arguments including -‘--literal-pathspecs’ and the ‘git’ process started by Magit then passes -that setting on to other ‘git’ process it starts itself. It does so by -setting the environment variable ‘GIT_LITERAL_PATHSPECS’, not by calling -subprocesses with the ‘--literal-pathspecs’ argument. You can therefore -override this setting in hook scripts using ‘unset -GIT_LITERAL_PATHSPECS’. - - -File: magit.info, Node: git-commit-mode isn't used when committing from the command-line, Next: Point ends up inside invisible text when jumping to a file-visiting buffer, Prev: My Git hooks work on the command-line but not inside Magit, Up: FAQ - Issues and Errors - -A.2.11 ‘git-commit-mode’ isn’t used when committing from the command-line -------------------------------------------------------------------------- - -The reason for this is that ‘git-commit.el’ has not been loaded yet -and/or that the server has not been started yet. These things have -always already been taken care of when you commit from Magit because in -order to do so, Magit has to be loaded and doing that involves loading -‘git-commit’ and starting the server. - - If you want to commit from the command-line, then you have to take -care of these things yourself. Your ‘init.el’ file should contain: - - (require 'git-commit) - (server-mode) - - Instead of ‘(require ’git-commit)‘ you may also use: - - (load "/path/to/magit-autoloads.el") - - You might want to do that because loading ‘git-commit’ causes large -parts of Magit to be loaded. - - There are also some variations of ‘(server-mode)’ that you might want -to try. Personally I use: - - (use-package server - :config (or (server-running-p) (server-mode))) - - Now you can use: - - $ emacs& - $ EDITOR=emacsclient git commit - - However you cannot use: - - $ killall emacs - $ EDITOR="emacsclient --alternate-editor emacs" git commit - - This will actually end up using ‘emacs’, not ‘emacsclient’. If you -do this, then you can still edit the commit message but -‘git-commit-mode’ won’t be used and you have to exit ‘emacs’ to finish -the process. - - Tautology ahead. If you want to be able to use ‘emacsclient’ to -connect to a running ‘emacs’ instance, even though no ‘emacs’ instance -is running, then you cannot use ‘emacsclient’ directly. - - Instead you have to create a script that does something like this: - - Try to use ‘emacsclient’ (without using ‘--alternate-editor’). If -that succeeds, do nothing else. Otherwise start ‘emacs &’ (and -‘init.el’ must call ‘server-start’) and try to use ‘emacsclient’ again. - - -File: magit.info, Node: Point ends up inside invisible text when jumping to a file-visiting buffer, Next: I am unable to stage when using Tramp from MS Windows, Prev: git-commit-mode isn't used when committing from the command-line, Up: FAQ - Issues and Errors - -A.2.12 Point ends up inside invisible text when jumping to a file-visiting buffer ---------------------------------------------------------------------------------- - -This can happen when you type ‘RET’ on a hunk to visit the respective -file at the respective position. One solution to this problem is to use -‘global-reveal-mode’. It makes sure that text around point is always -visible. If that is too drastic for your taste, then you may instead -use ‘magit-diff-visit-file-hook’ to reveal the text, possibly using -‘reveal-post-command’ or for Org buffers ‘org-reveal’. - - -File: magit.info, Node: I am unable to stage when using Tramp from MS Windows, Next: I am no longer able to save popup defaults, Prev: Point ends up inside invisible text when jumping to a file-visiting buffer, Up: FAQ - Issues and Errors - -A.2.13 I am unable to stage when using Tramp from MS Windows ------------------------------------------------------------- - -Magit may be unable to stage (or otherwise apply) individual hunks when -you are connected to remote machine using Tramp and the local machine -uses MS Windows. - - There appears to be a problem with ‘process-send-eof’ in this -scenario, as mentioned at the end of ‘tramp-tests.el’. I have contacted -the Tramp maintainer about this. For now this unfortunately means that -it just doesn’t work and we cannot do anything about it. If you have -more information, then please comment on -. - - -File: magit.info, Node: I am no longer able to save popup defaults, Prev: I am unable to stage when using Tramp from MS Windows, Up: FAQ - Issues and Errors - -A.2.14 I am no longer able to save popup defaults -------------------------------------------------- - -Magit used to use Magit-Popup to implement the transient popup menus. -Now it used Transient instead, which is Magit-Popup’s successor. - - In the older Magit-Popup menus, it was possible to save user settings -(e.g. setting the gpg signing key for commits) by using ‘C-c C-c’ in -the popup buffer. This would dismiss the popup, but save the settings -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 -for more details. - - -File: magit.info, Node: Debugging Tools, Next: Keystroke Index, Prev: FAQ, Up: Top - -B Debugging Tools -***************** - -Magit and its dependencies provide a few debugging tools, and we -appreciate it very much if you use those tools before reporting an -issue. Please include all relevant output when reporting an issue. - -‘M-x magit-version’ (‘magit-version’) - - This command shows the currently used versions of Magit, Git, and - Emacs in the echo area. Non-interactively this just returns the - Magit version. - -‘M-x magit-emacs-Q-command’ (‘magit-emacs-Q-command’) - - This command shows a debugging shell command in the echo area and - adds it to the kill ring. Paste that command into a shell and run - it. - - This shell command starts ‘emacs’ with only ‘magit’ and its - dependencies loaded. Neither your configuration nor other - installed packages are loaded. This makes it easier to determine - whether some issue lays with Magit or something else. - - If you run Magit from its Git repository, then you should be able - to use ‘make emacs-Q’ instead of the output of this command. - -‘M-x magit-toggle-verbose-refresh’ (‘magit-toggle-verbose-refresh’) - - This command toggles whether Magit refreshes buffers verbosely. - Enabling this helps figuring out which sections are bottlenecks. - The additional output can be found in the ‘*Messages*’ buffer. - -‘M-x magit-debug-git-executable’ (‘magit-debug-git-executable’) - - This command displays a buffer containing information about the - available and used ‘git’ executable(s), and can be useful when - investigating ‘exec-path’ issues. - - Also see *note Git Executable::. - -‘M-x with-editor-debug’ (‘with-editor-debug’) - - This command displays a buffer containing information about the - available and used ‘emacsclient’ executable(s), and can be useful - when investigating why Magit (or rather ‘with-editor’) cannot find - an appropriate ‘emacsclient’ executable. - - Also see *note (with-editor)Debugging::. - - Please also see the *note FAQ::. - - -File: magit.info, Node: Keystroke Index, Next: Command Index, Prev: Debugging Tools, Up: Top - -Appendix C Keystroke Index -************************** - -[index] -* Menu: - -* !: Running Git Manually. - (line 12) -* ! !: Running Git Manually. - (line 17) -* ! a: Running Git Manually. - (line 58) -* ! b: Running Git Manually. - (line 62) -* ! g: Running Git Manually. - (line 66) -* ! k: Running Git Manually. - (line 54) -* ! p: Running Git Manually. - (line 25) -* ! s: Running Git Manually. - (line 35) -* ! S: Running Git Manually. - (line 40) -* $: Viewing Git Output. (line 16) -* %: Worktree. (line 8) -* % b: Worktree. (line 13) -* % c: Worktree. (line 17) -* % g: Worktree. (line 30) -* % k: Worktree. (line 25) -* % m: Worktree. (line 21) -* +: Log Buffer. (line 72) -* + <1>: Refreshing Diffs. (line 69) -* -: Log Buffer. (line 76) -* - <1>: Refreshing Diffs. (line 65) -* 0: Refreshing Diffs. (line 73) -* 1: Section Visibility. (line 26) -* 2: Section Visibility. (line 27) -* 3: Section Visibility. (line 28) -* 4: Section Visibility. (line 29) -* =: Log Buffer. (line 66) -* ^: Section Movement. (line 31) -* a: Applying. (line 33) -* A: Cherry Picking. (line 8) -* A A: Cherry Picking. (line 17) -* A a: Cherry Picking. (line 24) -* A A <1>: Cherry Picking. (line 90) -* A a <1>: Cherry Picking. (line 98) -* A d: Cherry Picking. (line 54) -* A h: Cherry Picking. (line 42) -* A n: Cherry Picking. (line 65) -* A s: Cherry Picking. (line 76) -* A s <1>: Cherry Picking. (line 94) -* B: Bisecting. (line 8) -* b: Blaming. (line 102) -* b <1>: Branch Commands. (line 12) -* b <2>: Editing Rebase Sequences. - (line 85) -* B B: Bisecting. (line 16) -* B b: Bisecting. (line 34) -* b b: Branch Commands. (line 49) -* b C: Branch Commands. (line 29) -* b c: Branch Commands. (line 67) -* B g: Bisecting. (line 39) -* B k: Bisecting. (line 51) -* b k: Branch Commands. (line 147) -* b l: Branch Commands. (line 74) -* B m: Bisecting. (line 44) -* b n: Branch Commands. (line 57) -* B r: Bisecting. (line 57) -* b r: Branch Commands. (line 153) -* B s: Bisecting. (line 27) -* b s: Branch Commands. (line 97) -* b S: Branch Commands. (line 125) -* b x: Branch Commands. (line 131) -* c: Blaming. (line 135) -* C: Cloning Repository. (line 20) -* c <1>: Initiating a Commit. (line 8) -* c <2>: Editing Rebase Sequences. - (line 72) -* c a: Initiating a Commit. (line 19) -* c A: Initiating a Commit. (line 67) -* C b: Cloning Repository. (line 41) -* C C: Cloning Repository. (line 29) -* c c: Initiating a Commit. (line 14) -* C d: Cloning Repository. (line 54) -* C e: Cloning Repository. (line 61) -* c e: Initiating a Commit. (line 23) -* c f: Initiating a Commit. (line 43) -* c F: Initiating a Commit. (line 51) -* C m: Cloning Repository. (line 46) -* C s: Cloning Repository. (line 34) -* c s: Initiating a Commit. (line 55) -* c S: Initiating a Commit. (line 63) -* c w: Initiating a Commit. (line 33) -* C-: Visiting Files and Blobs from a Diff. - (line 51) -* C-: Section Visibility. (line 13) -* C-c C-a: Commit Pseudo Headers. - (line 17) -* C-c C-b: Log Buffer. (line 21) -* C-c C-b <1>: Refreshing Diffs. (line 91) -* C-c C-c: Transient Commands. (line 18) -* C-c C-c <1>: Select from Log. (line 20) -* C-c C-c <2>: Editing Commit Messages. - (line 17) -* C-c C-c <3>: Editing Rebase Sequences. - (line 6) -* C-c C-d: Refreshing Diffs. (line 81) -* C-c C-d <1>: Editing Commit Messages. - (line 58) -* C-c C-e: Commands Available in Diffs. - (line 25) -* C-c C-f: Log Buffer. (line 25) -* C-c C-f <1>: Refreshing Diffs. (line 95) -* C-c C-i: Commit Pseudo Headers. - (line 13) -* C-c C-k: Select from Log. (line 26) -* C-c C-k <1>: Editing Commit Messages. - (line 22) -* C-c C-k <2>: Editing Rebase Sequences. - (line 11) -* C-c C-n: Log Buffer. (line 29) -* C-c C-o: Commit Pseudo Headers. - (line 33) -* C-c C-p: Commit Pseudo Headers. - (line 37) -* C-c C-r: Commit Pseudo Headers. - (line 21) -* C-c C-s: Commit Pseudo Headers. - (line 25) -* C-c C-t: Commands Available in Diffs. - (line 14) -* C-c C-t <1>: Commit Pseudo Headers. - (line 29) -* C-c C-w: Using the Revision Stack. - (line 6) -* C-c M-g: Commands for Buffers Visiting Files. - (line 21) -* C-c M-g B: Blaming. (line 18) -* C-c M-g b: Blaming. (line 29) -* C-c M-g B <1>: Commands for Buffers Visiting Files. - (line 93) -* C-c M-g B b: Blaming. (line 30) -* C-c M-g B e: Blaming. (line 64) -* C-c M-g B f: Blaming. (line 55) -* C-c M-g B r: Blaming. (line 46) -* C-c M-g c: Commands for Buffers Visiting Files. - (line 38) -* C-c M-g D: Commands for Buffers Visiting Files. - (line 45) -* C-c M-g d: Commands for Buffers Visiting Files. - (line 56) -* C-c M-g e: Blaming. (line 63) -* C-c M-g e <1>: Commands for Buffers Visiting Files. - (line 106) -* C-c M-g f: Blaming. (line 54) -* C-c M-g L: Commands for Buffers Visiting Files. - (line 66) -* C-c M-g l: Commands for Buffers Visiting Files. - (line 77) -* C-c M-g p: Commands for Buffers Visiting Files. - (line 116) -* C-c M-g r: Blaming. (line 45) -* C-c M-g s: Commands for Buffers Visiting Files. - (line 29) -* C-c M-g t: Commands for Buffers Visiting Files. - (line 84) -* C-c M-g u: Commands for Buffers Visiting Files. - (line 33) -* C-c M-i: Commit Pseudo Headers. - (line 42) -* C-c M-s: Editing Commit Messages. - (line 34) -* C-w: Common Commands. (line 10) -* C-x g: Status Buffer. (line 22) -* C-x u: Editing Rebase Sequences. - (line 94) -* d: Diffing. (line 21) -* D: Refreshing Diffs. (line 11) -* d c: Diffing. (line 69) -* d d: Diffing. (line 27) -* D f: Refreshing Diffs. (line 46) -* D F: Refreshing Diffs. (line 51) -* D g: Refreshing Diffs. (line 17) -* d p: Diffing. (line 61) -* d r: Diffing. (line 31) -* D r: Refreshing Diffs. (line 41) -* d s: Diffing. (line 51) -* D s: Refreshing Diffs. (line 22) -* d t: Diffing. (line 74) -* D t: Refreshing Diffs. (line 37) -* d u: Diffing. (line 57) -* d w: Diffing. (line 45) -* D w: Refreshing Diffs. (line 29) -* DEL: Log Buffer. (line 56) -* DEL <1>: Commands Available in Diffs. - (line 60) -* DEL <2>: Blaming. (line 89) -* DEL <3>: Editing Rebase Sequences. - (line 28) -* e: Ediffing. (line 9) -* E: Ediffing. (line 21) -* e <1>: Editing Rebase Sequences. - (line 55) -* E c: Ediffing. (line 65) -* E i: Ediffing. (line 57) -* E m: Ediffing. (line 35) -* E r: Ediffing. (line 26) -* E s: Ediffing. (line 48) -* E u: Ediffing. (line 53) -* E w: Ediffing. (line 61) -* E z: Ediffing. (line 69) -* f: Editing Rebase Sequences. - (line 63) -* f <1>: Fetching. (line 9) -* F: Pulling. (line 9) -* f a: Fetching. (line 50) -* f C: Branch Commands. (line 30) -* F C: Branch Commands. (line 31) -* f e: Fetching. (line 36) -* F e: Pulling. (line 30) -* f m: Fetching. (line 54) -* f o: Fetching. (line 40) -* f p: Fetching. (line 15) -* F p: Pulling. (line 14) -* f r: Fetching. (line 45) -* f u: Fetching. (line 23) -* F u: Pulling. (line 22) -* g: Automatic Refreshing of Magit Buffers. - (line 25) -* G: Automatic Refreshing of Magit Buffers. - (line 34) -* j: Log Buffer. (line 35) -* j <1>: Commands Available in Diffs. - (line 45) -* k: Viewing Git Output. (line 24) -* k <1>: Applying. (line 40) -* k <2>: Editing Rebase Sequences. - (line 68) -* k <3>: Stashing. (line 96) -* l: Logging. (line 29) -* L: Refreshing Logs. (line 11) -* L <1>: Log Buffer. (line 6) -* L <2>: Log Margin. (line 57) -* l <1>: Editing Rebase Sequences. - (line 115) -* l a: Logging. (line 60) -* l b: Logging. (line 56) -* L d: Log Margin. (line 74) -* L g: Refreshing Logs. (line 17) -* l h: Logging. (line 48) -* l H: Reflog. (line 19) -* l l: Logging. (line 35) -* l L: Logging. (line 52) -* L L: Log Margin. (line 66) -* L l: Log Margin. (line 70) -* l o: Logging. (line 41) -* l O: Reflog. (line 15) -* l r: Reflog. (line 11) -* L s: Refreshing Logs. (line 22) -* L t: Refreshing Logs. (line 37) -* L w: Refreshing Logs. (line 29) -* m: Merging. (line 9) -* M: Remote Commands. (line 13) -* m a: Merging. (line 45) -* m a <1>: Merging. (line 95) -* M a: Remote Commands. (line 50) -* M C: Remote Commands. (line 33) -* m e: Merging. (line 31) -* m i: Merging. (line 58) -* M k: Remote Commands. (line 65) -* m m: Merging. (line 18) -* m m <1>: Merging. (line 89) -* m n: Merging. (line 38) -* m p: Merging. (line 81) -* M p: Remote Commands. (line 69) -* M P: Remote Commands. (line 74) -* M r: Remote Commands. (line 55) -* m s: Merging. (line 72) -* M u: Remote Commands. (line 60) -* M-1: Section Visibility. (line 33) -* M-2: Section Visibility. (line 34) -* M-3: Section Visibility. (line 35) -* M-4: Section Visibility. (line 36) -* M-: Section Visibility. (line 17) -* M-n: Section Movement. (line 26) -* M-n <1>: Editing Commit Messages. - (line 44) -* M-n <2>: Editing Rebase Sequences. - (line 47) -* M-p: Section Movement. (line 20) -* M-p <1>: Editing Commit Messages. - (line 38) -* M-p <2>: Editing Rebase Sequences. - (line 43) -* M-w: Blaming. (line 127) -* M-w <1>: Common Commands. (line 28) -* M-x magit-debug-git-executable: Git Executable. (line 55) -* M-x magit-debug-git-executable <1>: Debugging Tools. (line 36) -* M-x magit-describe-section-briefly: Section Types and Values. - (line 13) -* M-x magit-describe-section-briefly <1>: Matching Sections. (line 6) -* M-x magit-emacs-Q-command: Debugging Tools. (line 16) -* M-x magit-init: Creating Repository. (line 6) -* M-x magit-reset-index: Staging and Unstaging. - (line 87) -* M-x magit-reverse-in-index: Staging and Unstaging. - (line 62) -* M-x magit-stage-file: Staging from File-Visiting Buffers. - (line 10) -* M-x magit-toggle-buffer-lock: Modes and Buffers. (line 17) -* M-x magit-toggle-verbose-refresh: Debugging Tools. (line 30) -* M-x magit-unstage-file: Staging from File-Visiting Buffers. - (line 18) -* M-x magit-version: Git Executable. (line 60) -* M-x magit-version <1>: Debugging Tools. (line 10) -* M-x magit-wip-commit: Wip Modes. (line 88) -* M-x with-editor-debug: Debugging Tools. (line 44) -* MM: Editing Rebase Sequences. - (line 125) -* Mt: Editing Rebase Sequences. - (line 132) -* n: Section Movement. (line 16) -* n <1>: Blaming. (line 106) -* N: Blaming. (line 110) -* n <2>: Editing Rebase Sequences. - (line 39) -* n <3>: Minor Mode for Buffers Visiting Blobs. - (line 16) -* o: Submodule Transient. (line 6) -* O: Subtree. (line 8) -* o a: Submodule Transient. (line 20) -* o d: Submodule Transient. (line 50) -* O e: Subtree. (line 42) -* O e p: Subtree. (line 54) -* O e s: Subtree. (line 59) -* o f: Submodule Transient. (line 58) -* O i: Subtree. (line 13) -* O i a: Subtree. (line 25) -* O i c: Subtree. (line 30) -* O i f: Subtree. (line 38) -* O i m: Subtree. (line 34) -* o l: Submodule Transient. (line 54) -* o p: Submodule Transient. (line 34) -* o r: Submodule Transient. (line 27) -* o s: Submodule Transient. (line 44) -* o u: Submodule Transient. (line 39) -* p: Section Movement. (line 10) -* p <1>: Blaming. (line 114) -* P: Blaming. (line 118) -* p <2>: Editing Rebase Sequences. - (line 35) -* P <1>: Pushing. (line 9) -* p <3>: Minor Mode for Buffers Visiting Blobs. - (line 12) -* P C: Branch Commands. (line 32) -* P e: Pushing. (line 31) -* P m: Pushing. (line 50) -* P o: Pushing. (line 36) -* P p: Pushing. (line 15) -* P r: Pushing. (line 41) -* P t: Pushing. (line 58) -* P T: Pushing. (line 66) -* P u: Pushing. (line 23) -* q: Quitting Windows. (line 6) -* q <1>: Log Buffer. (line 14) -* q <2>: Blaming. (line 122) -* q <3>: Minor Mode for Buffers Visiting Blobs. - (line 20) -* r: Rebasing. (line 9) -* r <1>: Editing Rebase Sequences. - (line 51) -* r a: Rebasing. (line 123) -* r e: Rebasing. (line 44) -* r e <1>: Rebasing. (line 118) -* r f: Rebasing. (line 84) -* r i: Rebasing. (line 80) -* r k: Rebasing. (line 99) -* r m: Rebasing. (line 89) -* r p: Rebasing. (line 28) -* r r: Rebasing. (line 106) -* r s: Rebasing. (line 50) -* r s <1>: Rebasing. (line 113) -* r u: Rebasing. (line 36) -* r w: Rebasing. (line 94) -* RET: References Buffer. (line 181) -* RET <1>: Visiting Files and Blobs from a Diff. - (line 8) -* RET <2>: Blaming. (line 75) -* RET <3>: Editing Rebase Sequences. - (line 16) -* s: Staging and Unstaging. - (line 28) -* S: Staging and Unstaging. - (line 36) -* s <1>: Editing Rebase Sequences. - (line 59) -* S-: Section Visibility. (line 22) -* SPC: Log Buffer. (line 46) -* SPC <1>: Commands Available in Diffs. - (line 56) -* SPC <2>: Blaming. (line 79) -* SPC <3>: Editing Rebase Sequences. - (line 21) -* t: Editing Rebase Sequences. - (line 119) -* t <1>: Tagging. (line 8) -* T: Notes. (line 8) -* T a: Notes. (line 52) -* T c: Notes. (line 47) -* t k: Tagging. (line 39) -* T m: Notes. (line 38) -* t p: Tagging. (line 46) -* T p: Notes. (line 30) -* t r: Tagging. (line 19) -* T r: Notes. (line 22) -* t t: Tagging. (line 14) -* T T: Notes. (line 14) -* TAB: Section Visibility. (line 9) -* u: Staging and Unstaging. - (line 43) -* U: Staging and Unstaging. - (line 52) -* v: Applying. (line 44) -* V: Reverting. (line 6) -* V A: Reverting. (line 31) -* V a: Reverting. (line 39) -* V s: Reverting. (line 35) -* V V: Reverting. (line 15) -* V v: Reverting. (line 21) -* W: Plain Patches. (line 6) -* w: Maildir Patches. (line 8) -* w a: Plain Patches. (line 21) -* w a <1>: Maildir Patches. (line 25) -* w a <2>: Maildir Patches. (line 43) -* W c: Plain Patches. (line 12) -* w m: Maildir Patches. (line 21) -* W s: Plain Patches. (line 28) -* w s: Maildir Patches. (line 38) -* w w: Maildir Patches. (line 14) -* w w <1>: Maildir Patches. (line 34) -* x: Editing Rebase Sequences. - (line 76) -* x <1>: Resetting. (line 8) -* X f: Resetting. (line 50) -* X h: Resetting. (line 26) -* X i: Resetting. (line 37) -* X k: Resetting. (line 31) -* X m: Resetting. (line 15) -* X s: Resetting. (line 20) -* X w: Resetting. (line 44) -* X w <1>: Wip Modes. (line 66) -* Y: Cherries. (line 17) -* y: References Buffer. (line 6) -* y <1>: Editing Rebase Sequences. - (line 90) -* y c: References Buffer. (line 26) -* y o: References Buffer. (line 32) -* y y: References Buffer. (line 21) -* z: Stashing. (line 8) -* z a: Stashing. (line 59) -* z b: Stashing. (line 81) -* z B: Stashing. (line 86) -* z f: Stashing. (line 92) -* z i: Stashing. (line 21) -* z I: Stashing. (line 47) -* z k: Stashing. (line 72) -* z l: Stashing. (line 100) -* z p: Stashing. (line 65) -* z v: Stashing. (line 77) -* z w: Stashing. (line 26) -* z W: Stashing. (line 52) -* z x: Stashing. (line 33) -* z z: Stashing. (line 14) -* z Z: Stashing. (line 40) - - -File: magit.info, Node: Command Index, Next: Function Index, Prev: Keystroke Index, Up: Top - -Appendix D Command Index -************************ - -[index] -* Menu: - -* forward-line: Editing Rebase Sequences. - (line 39) -* git-commit-ack: Commit Pseudo Headers. - (line 17) -* git-commit-cc: Commit Pseudo Headers. - (line 33) -* git-commit-insert-pseudo-header: Commit Pseudo Headers. - (line 13) -* git-commit-next-message: Editing Commit Messages. - (line 44) -* git-commit-prev-message: Editing Commit Messages. - (line 38) -* git-commit-reported: Commit Pseudo Headers. - (line 37) -* git-commit-review: Commit Pseudo Headers. - (line 21) -* git-commit-save-message: Editing Commit Messages. - (line 34) -* git-commit-signoff: Commit Pseudo Headers. - (line 25) -* git-commit-suggested: Commit Pseudo Headers. - (line 42) -* git-commit-test: Commit Pseudo Headers. - (line 29) -* git-rebase-backward-line: Editing Rebase Sequences. - (line 35) -* git-rebase-break: Editing Rebase Sequences. - (line 85) -* git-rebase-edit: Editing Rebase Sequences. - (line 55) -* git-rebase-exec: Editing Rebase Sequences. - (line 76) -* git-rebase-fixup: Editing Rebase Sequences. - (line 63) -* git-rebase-insert: Editing Rebase Sequences. - (line 90) -* git-rebase-kill-line: Editing Rebase Sequences. - (line 68) -* git-rebase-label: Editing Rebase Sequences. - (line 115) -* git-rebase-merge: Editing Rebase Sequences. - (line 125) -* git-rebase-merge-toggle-editmsg: Editing Rebase Sequences. - (line 132) -* git-rebase-move-line-down: Editing Rebase Sequences. - (line 47) -* git-rebase-move-line-up: Editing Rebase Sequences. - (line 43) -* git-rebase-pick: Editing Rebase Sequences. - (line 72) -* git-rebase-reset: Editing Rebase Sequences. - (line 119) -* git-rebase-reword: Editing Rebase Sequences. - (line 51) -* git-rebase-show-commit: Editing Rebase Sequences. - (line 16) -* git-rebase-show-or-scroll-down: Editing Rebase Sequences. - (line 28) -* git-rebase-show-or-scroll-up: Editing Rebase Sequences. - (line 21) -* git-rebase-squash: Editing Rebase Sequences. - (line 59) -* git-rebase-undo: Editing Rebase Sequences. - (line 94) -* ido-enter-magit-status: Status Buffer. (line 72) -* magit-am: Maildir Patches. (line 8) -* magit-am-abort: Maildir Patches. (line 43) -* magit-am-apply-maildir: Maildir Patches. (line 21) -* magit-am-apply-patches: Maildir Patches. (line 14) -* magit-am-continue: Maildir Patches. (line 34) -* magit-am-skip: Maildir Patches. (line 38) -* magit-apply: Applying. (line 33) -* magit-bisect: Bisecting. (line 8) -* magit-bisect-bad: Bisecting. (line 34) -* magit-bisect-good: Bisecting. (line 39) -* magit-bisect-mark: Bisecting. (line 44) -* magit-bisect-reset: Bisecting. (line 57) -* magit-bisect-run: Bisecting. (line 27) -* magit-bisect-skip: Bisecting. (line 51) -* magit-bisect-start: Bisecting. (line 16) -* magit-blame: Blaming. (line 18) -* magit-blame <1>: Blaming. (line 102) -* magit-blame <2>: Commands for Buffers Visiting Files. - (line 93) -* magit-blame-addition: Blaming. (line 29) -* magit-blame-addition <1>: Blaming. (line 30) -* magit-blame-copy-hash: Blaming. (line 127) -* magit-blame-cycle-style: Blaming. (line 135) -* magit-blame-echo: Blaming. (line 63) -* magit-blame-echo <1>: Blaming. (line 64) -* magit-blame-next-chunk: Blaming. (line 106) -* magit-blame-next-chunk-same-commit: Blaming. (line 110) -* magit-blame-previous-chunk: Blaming. (line 114) -* magit-blame-previous-chunk-same-commit: Blaming. (line 118) -* magit-blame-quit: Blaming. (line 122) -* magit-blame-removal: Blaming. (line 45) -* magit-blame-removal <1>: Blaming. (line 46) -* magit-blame-reverse: Blaming. (line 54) -* magit-blame-reverse <1>: Blaming. (line 55) -* magit-blob-next: Minor Mode for Buffers Visiting Blobs. - (line 16) -* magit-blob-previous: Commands for Buffers Visiting Files. - (line 116) -* magit-blob-previous <1>: Minor Mode for Buffers Visiting Blobs. - (line 12) -* magit-branch: Branch Commands. (line 12) -* magit-branch-and-checkout: Branch Commands. (line 67) -* magit-branch-checkout: Branch Commands. (line 74) -* magit-branch-configure: Branch Commands. (line 29) -* magit-branch-configure <1>: Branch Commands. (line 30) -* magit-branch-configure <2>: Branch Commands. (line 31) -* magit-branch-configure <3>: Branch Commands. (line 32) -* magit-branch-create: Branch Commands. (line 57) -* magit-branch-delete: Branch Commands. (line 147) -* magit-branch-or-checkout: Branch Commands. (line 267) -* magit-branch-orphan: Branch Commands. (line 262) -* magit-branch-rename: Branch Commands. (line 153) -* magit-branch-reset: Branch Commands. (line 131) -* magit-branch-shelve: Auxiliary Branch Commands. - (line 9) -* magit-branch-spinoff: Branch Commands. (line 97) -* magit-branch-spinout: Branch Commands. (line 125) -* magit-branch-unshelve: Auxiliary Branch Commands. - (line 20) -* magit-checkout: Branch Commands. (line 49) -* magit-cherry: Cherries. (line 17) -* magit-cherry-apply: Cherry Picking. (line 24) -* magit-cherry-copy: Cherry Picking. (line 17) -* magit-cherry-donate: Cherry Picking. (line 54) -* magit-cherry-harvest: Cherry Picking. (line 42) -* magit-cherry-pick: Cherry Picking. (line 8) -* magit-cherry-spinoff: Cherry Picking. (line 76) -* magit-cherry-spinout: Cherry Picking. (line 65) -* magit-clone: Cloning Repository. (line 20) -* magit-clone-bare: Cloning Repository. (line 41) -* magit-clone-mirror: Cloning Repository. (line 46) -* magit-clone-regular: Cloning Repository. (line 29) -* magit-clone-shallow: Cloning Repository. (line 34) -* magit-clone-shallow-exclude: Cloning Repository. (line 61) -* magit-clone-shallow-since: Cloning Repository. (line 54) -* magit-commit: Initiating a Commit. (line 8) -* magit-commit <1>: Commands for Buffers Visiting Files. - (line 38) -* magit-commit-amend: Initiating a Commit. (line 19) -* magit-commit-augment: Initiating a Commit. (line 67) -* magit-commit-create: Initiating a Commit. (line 14) -* magit-commit-extend: Initiating a Commit. (line 23) -* magit-commit-fixup: Initiating a Commit. (line 43) -* magit-commit-instant-fixup: Initiating a Commit. (line 51) -* magit-commit-instant-squash: Initiating a Commit. (line 63) -* magit-commit-reword: Initiating a Commit. (line 33) -* magit-commit-squash: Initiating a Commit. (line 55) -* magit-copy-buffer-revision: Common Commands. (line 28) -* magit-copy-section-value: Common Commands. (line 10) -* magit-cycle-margin-style: Log Margin. (line 70) -* magit-debug-git-executable: Git Executable. (line 55) -* magit-debug-git-executable <1>: Debugging Tools. (line 36) -* magit-describe-section-briefly: Section Types and Values. - (line 13) -* magit-describe-section-briefly <1>: Matching Sections. (line 6) -* magit-diff: Diffing. (line 21) -* magit-diff <1>: Commands for Buffers Visiting Files. - (line 45) -* magit-diff-buffer-file: Commands for Buffers Visiting Files. - (line 56) -* magit-diff-default-context: Refreshing Diffs. (line 73) -* magit-diff-dwim: Diffing. (line 27) -* magit-diff-edit-hunk-commit: Commands Available in Diffs. - (line 25) -* magit-diff-flip-revs: Refreshing Diffs. (line 46) -* magit-diff-less-context: Refreshing Diffs. (line 65) -* magit-diff-more-context: Refreshing Diffs. (line 69) -* magit-diff-paths: Diffing. (line 61) -* magit-diff-range: Diffing. (line 31) -* magit-diff-refresh: Refreshing Diffs. (line 11) -* magit-diff-refresh <1>: Refreshing Diffs. (line 17) -* magit-diff-save-default-arguments: Refreshing Diffs. (line 29) -* magit-diff-set-default-arguments: Refreshing Diffs. (line 22) -* magit-diff-show-or-scroll-down: Log Buffer. (line 56) -* magit-diff-show-or-scroll-down <1>: Blaming. (line 89) -* magit-diff-show-or-scroll-up: Log Buffer. (line 46) -* magit-diff-show-or-scroll-up <1>: Blaming. (line 79) -* magit-diff-staged: Diffing. (line 51) -* magit-diff-switch-range-type: Refreshing Diffs. (line 41) -* magit-diff-toggle-file-filter: Refreshing Diffs. (line 51) -* magit-diff-toggle-refine-hunk: Refreshing Diffs. (line 37) -* magit-diff-trace-definition: Commands Available in Diffs. - (line 14) -* magit-diff-unstaged: Diffing. (line 57) -* magit-diff-visit-file: Visiting Files and Blobs from a Diff. - (line 8) -* magit-diff-visit-file-other-frame: Visiting Files and Blobs from a Diff. - (line 74) -* magit-diff-visit-file-other-window: Visiting Files and Blobs from a Diff. - (line 73) -* magit-diff-visit-file-worktree: Visiting Files and Blobs from a Diff. - (line 51) -* magit-diff-visit-worktree-file-other-frame: Visiting Files and Blobs from a Diff. - (line 76) -* magit-diff-visit-worktree-file-other-window: Visiting Files and Blobs from a Diff. - (line 75) -* magit-diff-while-committing: Refreshing Diffs. (line 81) -* magit-diff-while-committing <1>: Editing Commit Messages. - (line 58) -* magit-diff-working-tree: Diffing. (line 45) -* magit-discard: Applying. (line 40) -* magit-dispatch: Transient Commands. (line 18) -* magit-ediff: Ediffing. (line 21) -* magit-ediff-compare: Ediffing. (line 26) -* magit-ediff-dwim: Ediffing. (line 9) -* magit-ediff-resolve: Ediffing. (line 35) -* magit-ediff-show-commit: Ediffing. (line 65) -* magit-ediff-show-staged: Ediffing. (line 57) -* magit-ediff-show-stash: Ediffing. (line 69) -* magit-ediff-show-unstaged: Ediffing. (line 53) -* magit-ediff-show-working-tree: Ediffing. (line 61) -* magit-ediff-stage: Ediffing. (line 48) -* magit-edit-line-commit: Commands for Buffers Visiting Files. - (line 106) -* magit-emacs-Q-command: Debugging Tools. (line 16) -* magit-fetch: Fetching. (line 9) -* magit-fetch-all: Fetching. (line 50) -* magit-fetch-branch: Fetching. (line 40) -* magit-fetch-from-pushremote: Fetching. (line 15) -* magit-fetch-from-upstream: Fetching. (line 23) -* magit-fetch-modules: Submodule Transient. (line 58) -* magit-fetch-other: Fetching. (line 36) -* magit-fetch-refspec: Fetching. (line 45) -* magit-file-checkout: Resetting. (line 50) -* magit-file-checkout <1>: Commands for Buffers Visiting Files. - (line 135) -* magit-file-delete: Commands for Buffers Visiting Files. - (line 127) -* magit-file-dispatch: Commands for Buffers Visiting Files. - (line 21) -* magit-file-rename: Commands for Buffers Visiting Files. - (line 123) -* magit-file-untrack: Commands for Buffers Visiting Files. - (line 131) -* magit-find-file: General-Purpose Visit Commands. - (line 9) -* magit-find-file-other-frame: General-Purpose Visit Commands. - (line 21) -* magit-find-file-other-window: General-Purpose Visit Commands. - (line 15) -* magit-git-command: Running Git Manually. - (line 25) -* magit-git-command-topdir: Running Git Manually. - (line 17) -* magit-go-backward: Log Buffer. (line 21) -* magit-go-backward <1>: Refreshing Diffs. (line 91) -* magit-go-forward: Log Buffer. (line 25) -* magit-go-forward <1>: Refreshing Diffs. (line 95) -* magit-init: Creating Repository. (line 6) -* magit-jump-to-diffstat-or-diff: Commands Available in Diffs. - (line 45) -* magit-kill-this-buffer: Minor Mode for Buffers Visiting Blobs. - (line 20) -* magit-list-repositories: Repository List. (line 6) -* magit-list-submodules: Listing Submodules. (line 13) -* magit-list-submodules <1>: Submodule Transient. (line 54) -* magit-log: Logging. (line 29) -* magit-log <1>: Commands for Buffers Visiting Files. - (line 66) -* magit-log-all: Logging. (line 60) -* magit-log-all-branches: Logging. (line 56) -* magit-log-branches: Logging. (line 52) -* magit-log-buffer-file: Commands for Buffers Visiting Files. - (line 77) -* magit-log-bury-buffer: Log Buffer. (line 14) -* magit-log-current: Logging. (line 35) -* magit-log-double-commit-limit: Log Buffer. (line 72) -* magit-log-half-commit-limit: Log Buffer. (line 76) -* magit-log-head: Logging. (line 48) -* magit-log-move-to-parent: Log Buffer. (line 29) -* magit-log-move-to-revision: Log Buffer. (line 35) -* magit-log-other: Logging. (line 41) -* magit-log-refresh: Refreshing Logs. (line 11) -* magit-log-refresh <1>: Refreshing Logs. (line 17) -* magit-log-refresh <2>: Log Buffer. (line 6) -* magit-log-save-default-arguments: Refreshing Logs. (line 29) -* magit-log-select-pick: Select from Log. (line 20) -* magit-log-select-quit: Select from Log. (line 26) -* magit-log-set-default-arguments: Refreshing Logs. (line 22) -* magit-log-toggle-commit-limit: Log Buffer. (line 66) -* magit-log-trace-definition: Commands for Buffers Visiting Files. - (line 84) -* magit-margin-settings: Log Margin. (line 57) -* magit-merge: Merging. (line 9) -* magit-merge <1>: Merging. (line 89) -* magit-merge-abort: Merging. (line 95) -* magit-merge-absorb: Merging. (line 45) -* magit-merge-editmsg: Merging. (line 31) -* magit-merge-into: Merging. (line 58) -* magit-merge-nocommit: Merging. (line 38) -* magit-merge-plain: Merging. (line 18) -* magit-merge-preview: Merging. (line 81) -* magit-merge-squash: Merging. (line 72) -* magit-mode-bury-buffer: Quitting Windows. (line 6) -* magit-notes: Notes. (line 8) -* magit-notes-edit: Notes. (line 14) -* magit-notes-merge: Notes. (line 38) -* magit-notes-merge-abort: Notes. (line 52) -* magit-notes-merge-commit: Notes. (line 47) -* magit-notes-prune: Notes. (line 30) -* magit-notes-remove: Notes. (line 22) -* magit-patch: Plain Patches. (line 6) -* magit-patch-apply: Plain Patches. (line 21) -* magit-patch-apply <1>: Maildir Patches. (line 25) -* magit-patch-create: Plain Patches. (line 12) -* magit-patch-save: Plain Patches. (line 28) -* magit-pop-revision-stack: Using the Revision Stack. - (line 6) -* magit-process: Viewing Git Output. (line 16) -* magit-process-kill: Viewing Git Output. (line 24) -* magit-pull: Pulling. (line 9) -* magit-pull-branch: Pulling. (line 30) -* magit-pull-from-pushremote: Pulling. (line 14) -* magit-pull-from-upstream: Pulling. (line 22) -* magit-push: Pushing. (line 9) -* magit-push-current: Pushing. (line 31) -* magit-push-current-to-pushremote: Pushing. (line 15) -* magit-push-current-to-upstream: Pushing. (line 23) -* magit-push-implicitly args: Pushing. (line 83) -* magit-push-matching: Pushing. (line 50) -* magit-push-other: Pushing. (line 36) -* magit-push-refspecs: Pushing. (line 41) -* magit-push-tag: Pushing. (line 66) -* magit-push-tags: Pushing. (line 58) -* magit-push-to-remote remote args: Pushing. (line 101) -* magit-rebase: Rebasing. (line 9) -* magit-rebase-abort: Rebasing. (line 123) -* magit-rebase-autosquash: Rebasing. (line 84) -* magit-rebase-branch: Rebasing. (line 44) -* magit-rebase-continue: Rebasing. (line 106) -* magit-rebase-edit: Rebasing. (line 118) -* magit-rebase-edit-commit: Rebasing. (line 89) -* magit-rebase-interactive: Rebasing. (line 80) -* magit-rebase-onto-pushremote: Rebasing. (line 28) -* magit-rebase-onto-upstream: Rebasing. (line 36) -* magit-rebase-remove-commit: Rebasing. (line 99) -* magit-rebase-reword-commit: Rebasing. (line 94) -* magit-rebase-skip: Rebasing. (line 113) -* magit-rebase-subset: Rebasing. (line 50) -* magit-reflog-current: Reflog. (line 11) -* magit-reflog-head: Reflog. (line 19) -* magit-reflog-other: Reflog. (line 15) -* magit-refresh: Automatic Refreshing of Magit Buffers. - (line 25) -* magit-refresh-all: Automatic Refreshing of Magit Buffers. - (line 34) -* magit-remote: Remote Commands. (line 13) -* magit-remote-add: Remote Commands. (line 50) -* magit-remote-configure: Remote Commands. (line 33) -* magit-remote-prune: Remote Commands. (line 69) -* magit-remote-prune-refspecs: Remote Commands. (line 74) -* magit-remote-remove: Remote Commands. (line 65) -* magit-remote-rename: Remote Commands. (line 55) -* magit-remote-set-url: Remote Commands. (line 60) -* magit-reset-hard: Resetting. (line 26) -* magit-reset-index: Staging and Unstaging. - (line 87) -* magit-reset-index <1>: Resetting. (line 37) -* magit-reset-keep: Resetting. (line 31) -* magit-reset-mixed: Resetting. (line 15) -* magit-reset-quickly: Resetting. (line 8) -* magit-reset-soft: Resetting. (line 20) -* magit-reset-worktree: Resetting. (line 44) -* magit-reset-worktree <1>: Wip Modes. (line 66) -* magit-reverse: Applying. (line 44) -* magit-reverse-in-index: Staging and Unstaging. - (line 62) -* magit-revert: Reverting. (line 6) -* magit-revert-and-commit: Reverting. (line 15) -* magit-revert-no-commit: Reverting. (line 21) -* magit-run: Running Git Manually. - (line 12) -* magit-run-git-gui: Running Git Manually. - (line 66) -* magit-run-gitk: Running Git Manually. - (line 54) -* magit-run-gitk-all: Running Git Manually. - (line 58) -* magit-run-gitk-branches: Running Git Manually. - (line 62) -* magit-section-backward: Section Movement. (line 10) -* magit-section-backward-siblings: Section Movement. (line 20) -* magit-section-cycle: Section Visibility. (line 13) -* magit-section-cycle-diffs: Section Visibility. (line 17) -* magit-section-cycle-global: Section Visibility. (line 22) -* magit-section-forward: Section Movement. (line 16) -* magit-section-forward-siblings: Section Movement. (line 26) -* magit-section-hide: Section Visibility. (line 49) -* magit-section-hide-children: Section Visibility. (line 64) -* magit-section-show: Section Visibility. (line 45) -* magit-section-show-children: Section Visibility. (line 58) -* magit-section-show-headings: Section Visibility. (line 53) -* magit-section-show-level-1: Section Visibility. (line 26) -* magit-section-show-level-1-all: Section Visibility. (line 33) -* magit-section-show-level-2: Section Visibility. (line 27) -* magit-section-show-level-2-all: Section Visibility. (line 34) -* magit-section-show-level-3: Section Visibility. (line 28) -* magit-section-show-level-3-all: Section Visibility. (line 35) -* magit-section-show-level-4: Section Visibility. (line 29) -* magit-section-show-level-4-all: Section Visibility. (line 36) -* magit-section-toggle: Section Visibility. (line 9) -* magit-section-toggle-children: Section Visibility. (line 68) -* magit-section-up: Section Movement. (line 31) -* magit-sequence-abort: Cherry Picking. (line 98) -* magit-sequence-abort <1>: Reverting. (line 39) -* magit-sequence-continue: Cherry Picking. (line 90) -* magit-sequence-continue <1>: Reverting. (line 31) -* magit-sequence-skip: Cherry Picking. (line 94) -* magit-sequence-skip <1>: Reverting. (line 35) -* magit-shell-command: Running Git Manually. - (line 40) -* magit-shell-command-topdir: Running Git Manually. - (line 35) -* magit-show-commit: Diffing. (line 69) -* magit-show-commit <1>: Blaming. (line 75) -* magit-show-refs: References Buffer. (line 6) -* magit-show-refs-current: References Buffer. (line 26) -* magit-show-refs-head: References Buffer. (line 21) -* magit-show-refs-other: References Buffer. (line 32) -* magit-snapshot-both: Stashing. (line 40) -* magit-snapshot-index: Stashing. (line 47) -* magit-snapshot-worktree: Stashing. (line 52) -* magit-stage: Staging and Unstaging. - (line 28) -* magit-stage-file: Staging from File-Visiting Buffers. - (line 10) -* magit-stage-file <1>: Commands for Buffers Visiting Files. - (line 29) -* magit-stage-modified: Staging and Unstaging. - (line 36) -* magit-stash: Stashing. (line 8) -* magit-stash-apply: Stashing. (line 59) -* magit-stash-both: Stashing. (line 14) -* magit-stash-branch: Stashing. (line 81) -* magit-stash-branch-here: Stashing. (line 86) -* magit-stash-clear: Stashing. (line 96) -* magit-stash-drop: Stashing. (line 72) -* magit-stash-format-patch: Stashing. (line 92) -* magit-stash-index: Stashing. (line 21) -* magit-stash-keep-index: Stashing. (line 33) -* magit-stash-list: Stashing. (line 100) -* magit-stash-pop: Stashing. (line 65) -* magit-stash-show: Diffing. (line 74) -* magit-stash-show <1>: Stashing. (line 77) -* magit-stash-worktree: Stashing. (line 26) -* magit-status: Status Buffer. (line 22) -* magit-submodule: Submodule Transient. (line 6) -* magit-submodule-add: Submodule Transient. (line 20) -* magit-submodule-fetch: Fetching. (line 54) -* magit-submodule-populate: Submodule Transient. (line 34) -* magit-submodule-register: Submodule Transient. (line 27) -* magit-submodule-synchronize: Submodule Transient. (line 44) -* magit-submodule-unpopulate: Submodule Transient. (line 50) -* magit-submodule-update: Submodule Transient. (line 39) -* magit-subtree: Subtree. (line 8) -* magit-subtree-add: Subtree. (line 25) -* magit-subtree-add-commit: Subtree. (line 30) -* magit-subtree-export: Subtree. (line 42) -* magit-subtree-import: Subtree. (line 13) -* magit-subtree-merge: Subtree. (line 34) -* magit-subtree-pull: Subtree. (line 38) -* magit-subtree-push: Subtree. (line 54) -* magit-subtree-split: Subtree. (line 59) -* magit-tag: Tagging. (line 8) -* magit-tag-create: Tagging. (line 14) -* magit-tag-delete: Tagging. (line 39) -* magit-tag-prune: Tagging. (line 46) -* magit-tag-release: Tagging. (line 19) -* magit-toggle-buffer-lock: Modes and Buffers. (line 17) -* magit-toggle-margin: Refreshing Logs. (line 37) -* magit-toggle-margin <1>: Log Margin. (line 66) -* magit-toggle-margin-details: Log Margin. (line 74) -* magit-toggle-verbose-refresh: Debugging Tools. (line 30) -* magit-unstage: Staging and Unstaging. - (line 43) -* magit-unstage-all: Staging and Unstaging. - (line 52) -* magit-unstage-file: Staging from File-Visiting Buffers. - (line 18) -* magit-unstage-file <1>: Commands for Buffers Visiting Files. - (line 33) -* magit-version: Git Executable. (line 60) -* magit-version <1>: Debugging Tools. (line 10) -* magit-visit-ref: References Buffer. (line 181) -* magit-wip-commit: Wip Modes. (line 88) -* magit-wip-log: Wip Modes. (line 48) -* magit-wip-log-current: Wip Modes. (line 57) -* magit-worktree: Worktree. (line 8) -* magit-worktree-branch: Worktree. (line 17) -* magit-worktree-checkout: Worktree. (line 13) -* magit-worktree-delete: Worktree. (line 25) -* magit-worktree-move: Worktree. (line 21) -* magit-worktree-status: Worktree. (line 30) -* scroll-down: Commands Available in Diffs. - (line 60) -* scroll-up: Commands Available in Diffs. - (line 56) -* with-editor-cancel: Editing Commit Messages. - (line 22) -* with-editor-cancel <1>: Editing Rebase Sequences. - (line 11) -* with-editor-debug: Debugging Tools. (line 44) -* with-editor-finish: Editing Commit Messages. - (line 17) -* with-editor-finish <1>: Editing Rebase Sequences. - (line 6) - - -File: magit.info, Node: Function Index, Next: Variable Index, Prev: Command Index, Up: Top - -Appendix E Function Index -************************* - -[index] -* Menu: - -* bug-reference-mode: Commit Mode and Hooks. - (line 56) -* git-commit-check-style-conventions: Commit Message Conventions. - (line 40) -* git-commit-propertize-diff: Commit Mode and Hooks. - (line 47) -* git-commit-save-message: Commit Mode and Hooks. - (line 28) -* git-commit-setup-changelog-support: Commit Mode and Hooks. - (line 32) -* git-commit-turn-on-auto-fill: Commit Mode and Hooks. - (line 37) -* git-commit-turn-on-flyspell: Commit Mode and Hooks. - (line 42) -* ido-enter-magit-status: Status Buffer. (line 72) -* magit-add-section-hook: Section Hooks. (line 20) -* magit-after-save-refresh-status: Automatic Refreshing of Magit Buffers. - (line 59) -* magit-branch-or-checkout: Branch Commands. (line 267) -* magit-branch-orphan: Branch Commands. (line 262) -* magit-branch-shelve: Auxiliary Branch Commands. - (line 9) -* magit-branch-unshelve: Auxiliary Branch Commands. - (line 20) -* magit-builtin-completing-read: Support for Completion Frameworks. - (line 42) -* magit-call-git: Calling Git for Effect. - (line 28) -* magit-call-process: Calling Git for Effect. - (line 32) -* magit-cancel-section: Creating Sections. (line 71) -* magit-completing-read: Support for Completion Frameworks. - (line 60) -* magit-current-section: Section Selection. (line 6) -* magit-define-section-jumper: Creating Sections. (line 77) -* magit-diff-scope: Matching Sections. (line 118) -* magit-diff-type: Matching Sections. (line 95) -* magit-diff-visit-file-other-frame: Visiting Files and Blobs from a Diff. - (line 74) -* magit-diff-visit-file-other-window: Visiting Files and Blobs from a Diff. - (line 73) -* magit-diff-visit-worktree-file-other-frame: Visiting Files and Blobs from a Diff. - (line 76) -* magit-diff-visit-worktree-file-other-window: Visiting Files and Blobs from a Diff. - (line 75) -* magit-disable-section-inserter: Per-Repository Configuration. - (line 31) -* magit-display-buffer: Switching Buffers. (line 6) -* magit-display-buffer-fullcolumn-most-v1: Switching Buffers. (line 75) -* magit-display-buffer-fullframe-status-topleft-v1: Switching Buffers. - (line 65) -* magit-display-buffer-fullframe-status-v1: Switching Buffers. - (line 59) -* magit-display-buffer-same-window-except-diff-v1: Switching Buffers. - (line 53) -* magit-display-buffer-traditional: Switching Buffers. (line 45) -* magit-file-checkout: Commands for Buffers Visiting Files. - (line 135) -* magit-file-delete: Commands for Buffers Visiting Files. - (line 127) -* magit-file-rename: Commands for Buffers Visiting Files. - (line 123) -* magit-file-untrack: Commands for Buffers Visiting Files. - (line 131) -* magit-find-file: General-Purpose Visit Commands. - (line 9) -* magit-find-file-other-frame: General-Purpose Visit Commands. - (line 21) -* magit-find-file-other-window: General-Purpose Visit Commands. - (line 15) -* magit-generate-buffer-name-default-function: Naming Buffers. - (line 17) -* magit-get-section: Matching Sections. (line 16) -* magit-git: Calling Git for Effect. - (line 50) -* magit-git-exit-code: Getting a Value from Git. - (line 10) -* magit-git-failure: Getting a Value from Git. - (line 19) -* magit-git-false: Getting a Value from Git. - (line 29) -* magit-git-insert: Getting a Value from Git. - (line 34) -* magit-git-items: Getting a Value from Git. - (line 49) -* magit-git-lines: Getting a Value from Git. - (line 44) -* magit-git-str: Getting a Value from Git. - (line 87) -* magit-git-string: Getting a Value from Git. - (line 38) -* magit-git-success: Getting a Value from Git. - (line 14) -* magit-git-true: Getting a Value from Git. - (line 24) -* magit-git-wash: Calling Git for Effect. - (line 55) -* magit-hunk-set-window-start: Section Movement. (line 51) -* magit-ido-completing-read: Support for Completion Frameworks. - (line 48) -* magit-insert-am-sequence: Status Sections. (line 28) -* magit-insert-assumed-unchanged-files: Status Sections. (line 117) -* magit-insert-bisect-log: Status Sections. (line 46) -* magit-insert-bisect-output: Status Sections. (line 38) -* magit-insert-bisect-rest: Status Sections. (line 42) -* magit-insert-diff-filter-header: Status Header Sections. - (line 38) -* magit-insert-error-header: Status Header Sections. - (line 28) -* magit-insert-head-branch-header: Status Header Sections. - (line 42) -* magit-insert-heading: Creating Sections. (line 42) -* magit-insert-ignored-files: Status Sections. (line 100) -* magit-insert-local-branches: References Sections. (line 17) -* magit-insert-merge-log: Status Sections. (line 18) -* magit-insert-modules: Status Module Sections. - (line 12) -* magit-insert-modules-overview: Status Module Sections. - (line 33) -* magit-insert-modules-unpulled-from-pushremote: Status Module Sections. - (line 50) -* magit-insert-modules-unpulled-from-upstream: Status Module Sections. - (line 44) -* magit-insert-modules-unpushed-to-pushremote: Status Module Sections. - (line 62) -* magit-insert-modules-unpushed-to-upstream: Status Module Sections. - (line 56) -* magit-insert-push-branch-header: Status Header Sections. - (line 51) -* magit-insert-rebase-sequence: Status Sections. (line 23) -* magit-insert-recent-commits: Status Sections. (line 131) -* magit-insert-remote-branches: References Sections. (line 21) -* magit-insert-remote-header: Status Header Sections. - (line 67) -* magit-insert-repo-header: Status Header Sections. - (line 63) -* magit-insert-section: Creating Sections. (line 6) -* magit-insert-sequencer-sequence: Status Sections. (line 33) -* magit-insert-skip-worktree-files: Status Sections. (line 110) -* magit-insert-staged-changes: Status Sections. (line 63) -* magit-insert-stashes: Status Sections. (line 67) -* magit-insert-status-headers: Status Header Sections. - (line 12) -* magit-insert-tags: References Sections. (line 25) -* magit-insert-tags-header: Status Header Sections. - (line 56) -* magit-insert-tracked-files: Status Sections. (line 96) -* magit-insert-unpulled-cherries: Status Sections. (line 142) -* magit-insert-unpulled-from-pushremote: Status Sections. (line 79) -* magit-insert-unpulled-from-upstream: Status Sections. (line 74) -* magit-insert-unpulled-or-recent-commits: Status Sections. (line 124) -* magit-insert-unpushed-cherries: Status Sections. (line 149) -* magit-insert-unpushed-to-pushremote: Status Sections. (line 89) -* magit-insert-unpushed-to-upstream: Status Sections. (line 84) -* magit-insert-unstaged-changes: Status Sections. (line 59) -* magit-insert-untracked-files: Status Sections. (line 50) -* magit-insert-upstream-branch-header: Status Header Sections. - (line 46) -* magit-insert-user-header: Status Header Sections. - (line 75) -* magit-list-repositories: Repository List. (line 6) -* magit-list-submodules: Listing Submodules. (line 13) -* magit-log-maybe-show-more-commits: Section Movement. (line 66) -* magit-log-maybe-update-blob-buffer: Section Movement. (line 82) -* magit-log-maybe-update-revision-buffer: Section Movement. (line 74) -* magit-maybe-set-dedicated: Switching Buffers. (line 100) -* magit-mode-display-buffer: Refreshing Buffers. (line 33) -* magit-mode-quit-window: Quitting Windows. (line 34) -* magit-mode-setup: Refreshing Buffers. (line 17) -* magit-process-file: Getting a Value from Git. - (line 67) -* magit-process-git: Getting a Value from Git. - (line 59) -* magit-push-implicitly: Pushing. (line 83) -* magit-push-to-remote: Pushing. (line 101) -* magit-region-sections: Section Selection. (line 10) -* magit-region-values: Section Selection. (line 37) -* magit-repolist-column-branch: Repository List. (line 50) -* magit-repolist-column-branches: Repository List. (line 59) -* magit-repolist-column-flag: Repository List. (line 67) -* magit-repolist-column-ident: Repository List. (line 36) -* magit-repolist-column-path: Repository List. (line 41) -* magit-repolist-column-stashes: Repository List. (line 63) -* magit-repolist-column-unpulled-from-pushremote: Repository List. - (line 87) -* magit-repolist-column-unpulled-from-upstream: Repository List. - (line 82) -* magit-repolist-column-unpushed-to-pushremote: Repository List. - (line 97) -* magit-repolist-column-unpushed-to-upstream: Repository List. - (line 92) -* magit-repolist-column-upstream: Repository List. (line 54) -* magit-repolist-column-version: Repository List. (line 45) -* magit-restore-window-configuration: Quitting Windows. (line 23) -* magit-run-git: Calling Git for Effect. - (line 36) -* magit-run-git-async: Calling Git for Effect. - (line 65) -* magit-run-git-with-editor: Calling Git for Effect. - (line 78) -* magit-run-git-with-input: Calling Git for Effect. - (line 40) -* magit-save-window-configuration: Switching Buffers. (line 89) -* magit-section-case: Matching Sections. (line 71) -* magit-section-hide: Section Visibility. (line 49) -* magit-section-hide-children: Section Visibility. (line 64) -* magit-section-ident: Matching Sections. (line 11) -* magit-section-match: Matching Sections. (line 21) -* magit-section-set-window-start: Section Movement. (line 59) -* magit-section-show: Section Visibility. (line 45) -* magit-section-show-children: Section Visibility. (line 58) -* magit-section-show-headings: Section Visibility. (line 53) -* magit-section-toggle-children: Section Visibility. (line 68) -* magit-section-value-if: Matching Sections. (line 61) -* magit-start-git: Calling Git for Effect. - (line 90) -* magit-start-process: Calling Git for Effect. - (line 109) -* magit-stashes-maybe-update-stash-buffer: Section Movement. (line 106) -* magit-status-maybe-update-blob-buffer: Section Movement. (line 100) -* magit-status-maybe-update-revision-buffer: Section Movement. - (line 88) -* magit-status-maybe-update-stash-buffer: Section Movement. (line 94) -* magit-wip-log: Wip Modes. (line 48) -* magit-wip-log-current: Wip Modes. (line 57) -* with-editor-usage-message: Commit Mode and Hooks. - (line 60) - - -File: magit.info, Node: Variable Index, Prev: Function Index, Up: Top - -Appendix F Variable Index -************************* - -[index] -* Menu: - -* auto-revert-buffer-list-filter: Automatic Reverting of File-Visiting Buffers. - (line 81) -* auto-revert-interval: Automatic Reverting of File-Visiting Buffers. - (line 76) -* auto-revert-mode: Automatic Reverting of File-Visiting Buffers. - (line 62) -* auto-revert-stop-on-user-input: Automatic Reverting of File-Visiting Buffers. - (line 71) -* auto-revert-use-notify: Automatic Reverting of File-Visiting Buffers. - (line 49) -* auto-revert-verbose: Automatic Reverting of File-Visiting Buffers. - (line 103) -* branch.autoSetupMerge: Branch Git Variables. - (line 81) -* branch.autoSetupRebase: Branch Git Variables. - (line 98) -* branch.NAME.description: Branch Git Variables. - (line 48) -* branch.NAME.merge: Branch Git Variables. - (line 10) -* branch.NAME.pushRemote: Branch Git Variables. - (line 34) -* branch.NAME.rebase: Branch Git Variables. - (line 22) -* branch.NAME.remote: Branch Git Variables. - (line 16) -* core.notesRef: Notes. (line 60) -* git-commit-fill-column: Commit Message Conventions. - (line 19) -* git-commit-finish-query-functions: Commit Message Conventions. - (line 24) -* git-commit-known-pseudo-headers: Commit Pseudo Headers. - (line 9) -* git-commit-major-mode: Commit Mode and Hooks. - (line 12) -* git-commit-setup-hook: Commit Mode and Hooks. - (line 22) -* git-commit-setup-hook <1>: Commit Mode and Hooks. - (line 64) -* git-commit-style-convention-checks: Commit Message Conventions. - (line 46) -* git-commit-summary-max-length: Commit Message Conventions. - (line 13) -* git-rebase-auto-advance: Editing Rebase Sequences. - (line 99) -* git-rebase-confirm-cancel: Editing Rebase Sequences. - (line 107) -* git-rebase-show-instructions: Editing Rebase Sequences. - (line 103) -* global-auto-revert-mode: Automatic Reverting of File-Visiting Buffers. - (line 22) -* magit-auto-revert-immediately: Automatic Reverting of File-Visiting Buffers. - (line 32) -* magit-auto-revert-mode: Automatic Reverting of File-Visiting Buffers. - (line 17) -* magit-auto-revert-tracked-only: Automatic Reverting of File-Visiting Buffers. - (line 55) -* magit-bisect-show-graph: Bisecting. (line 65) -* magit-blame-disable-modes: Blaming. (line 165) -* magit-blame-echo-style: Blaming. (line 148) -* magit-blame-goto-chunk-hook: Blaming. (line 171) -* magit-blame-read-only: Blaming. (line 160) -* magit-blame-styles: Blaming. (line 143) -* magit-blame-time-format: Blaming. (line 155) -* magit-branch-adjust-remote-upstream-alist: Branch Commands. (line 210) -* magit-branch-direct-configure: Branch Commands. (line 20) -* magit-branch-prefer-remote-upstream: Branch Commands. (line 165) -* magit-branch-read-upstream-first: Branch Commands. (line 159) -* magit-buffer-name-format: Naming Buffers. (line 27) -* magit-bury-buffer-function: Quitting Windows. (line 14) -* magit-cherry-margin: Cherries. (line 22) -* magit-clone-always-transient: Cloning Repository. (line 12) -* magit-clone-default-directory: Cloning Repository. (line 90) -* magit-clone-name-alist: Cloning Repository. (line 103) -* magit-clone-set-remote-head: Cloning Repository. (line 68) -* magit-clone-set-remote.pushDefault: Cloning Repository. (line 78) -* magit-clone-url-format: Cloning Repository. (line 124) -* magit-commit-ask-to-stage: Initiating a Commit. (line 75) -* magit-commit-extend-override-date: Initiating a Commit. (line 84) -* magit-commit-reword-override-date: Initiating a Commit. (line 88) -* magit-commit-show-diff: Initiating a Commit. (line 80) -* magit-commit-squash-confirm: Initiating a Commit. (line 92) -* magit-completing-read-function: Support for Completion Frameworks. - (line 27) -* magit-define-global-key-bindings: Default Bindings. (line 6) -* magit-diff-adjust-tab-width: Diff Options. (line 21) -* magit-diff-buffer-file-locked: Commands for Buffers Visiting Files. - (line 61) -* magit-diff-extra-stat-arguments: Diff Options. (line 128) -* magit-diff-hide-trailing-cr-characters: Diff Options. (line 90) -* magit-diff-highlight-hunk-region-functions: Diff Options. (line 94) -* magit-diff-highlight-indentation: Diff Options. (line 75) -* magit-diff-highlight-trailing: Diff Options. (line 70) -* magit-diff-paint-whitespace: Diff Options. (line 43) -* magit-diff-paint-whitespace-lines: Diff Options. (line 60) -* magit-diff-refine-hunk: Diff Options. (line 6) -* magit-diff-refine-ignore-whitespace: Diff Options. (line 16) -* magit-diff-unmarked-lines-keep-foreground: Diff Options. (line 120) -* magit-diff-visit-previous-blob: Visiting Files and Blobs from a Diff. - (line 39) -* magit-direct-use-buffer-arguments: Transient Arguments and Buffer Variables. - (line 73) -* magit-display-buffer-function: Switching Buffers. (line 27) -* magit-display-buffer-noselect: Switching Buffers. (line 18) -* magit-dwim-selection: Completion and Confirmation. - (line 42) -* magit-ediff-dwim-show-on-hunks: Ediffing. (line 73) -* magit-ediff-quit-hook: Ediffing. (line 88) -* magit-ediff-show-stash-with-index: Ediffing. (line 81) -* magit-generate-buffer-name-function: Naming Buffers. (line 6) -* magit-git-debug: Viewing Git Output. (line 28) -* magit-git-debug <1>: Getting a Value from Git. - (line 79) -* magit-git-executable: Git Executable. (line 26) -* magit-git-global-arguments: Global Git Arguments. - (line 6) -* magit-keep-region-overlay: The Selection. (line 52) -* magit-list-refs-sortby: Additional Completion Options. - (line 6) -* magit-log-auto-more: Log Buffer. (line 80) -* magit-log-buffer-file-locked: Commands for Buffers Visiting Files. - (line 88) -* magit-log-margin: Log Margin. (line 12) -* magit-log-margin-show-committer-date: Log Margin. (line 49) -* magit-log-section-commit-count: Status Sections. (line 136) -* magit-log-select-margin: Select from Log. (line 30) -* magit-log-show-refname-after-summary: Log Buffer. (line 86) -* magit-log-trace-definition-function: Commands Available in Diffs. - (line 18) -* magit-module-sections-hook: Status Module Sections. - (line 20) -* magit-module-sections-nested: Status Module Sections. - (line 24) -* magit-no-confirm: Action Confirmation. (line 18) -* magit-pop-revision-stack-format: Using the Revision Stack. - (line 35) -* magit-post-commit-hook: Initiating a Commit. (line 101) -* magit-post-display-buffer-hook: Switching Buffers. (line 95) -* magit-pre-display-buffer-hook: Switching Buffers. (line 84) -* magit-prefer-remote-upstream: Branch Git Variables. - (line 126) -* magit-prefix-use-buffer-arguments: Transient Arguments and Buffer Variables. - (line 64) -* magit-process-raise-error: Calling Git for Effect. - (line 136) -* magit-pull-or-fetch: Fetching. (line 59) -* magit-reflog-margin: Reflog. (line 23) -* magit-refresh-args: Refreshing Buffers. (line 55) -* magit-refresh-buffer-hook: Automatic Refreshing of Magit Buffers. - (line 43) -* magit-refresh-function: Refreshing Buffers. (line 49) -* magit-refresh-status-buffer: Automatic Refreshing of Magit Buffers. - (line 49) -* magit-refs-filter-alist: References Buffer. (line 159) -* magit-refs-focus-column-width: References Buffer. (line 82) -* magit-refs-margin: References Buffer. (line 97) -* magit-refs-margin-for-tags: References Buffer. (line 125) -* magit-refs-pad-commit-counts: References Buffer. (line 49) -* magit-refs-primary-column-width: References Buffer. (line 69) -* magit-refs-sections-hook: References Sections. (line 13) -* magit-refs-show-commit-count: References Buffer. (line 37) -* magit-refs-show-remote-prefix: References Buffer. (line 62) -* magit-remote-add-set-remote.pushDefault: Remote Commands. (line 92) -* magit-remote-direct-configure: Remote Commands. (line 21) -* magit-remote-git-executable: Git Executable. (line 33) -* magit-repolist-columns: Repository List. (line 14) -* magit-repository-directories: Status Buffer. (line 58) -* magit-revision-filter-files-on-follow: Revision Buffer. (line 64) -* magit-revision-insert-related-refs: Revision Buffer. (line 6) -* magit-revision-show-gravatars: Revision Buffer. (line 19) -* magit-revision-use-hash-sections: Revision Buffer. (line 36) -* magit-root-section: Matching Sections. (line 87) -* magit-save-repository-buffers: Automatic Saving of File-Visiting Buffers. - (line 13) -* magit-section-cache-visibility: Section Visibility. (line 95) -* magit-section-initial-visibility-alist: Section Visibility. (line 78) -* magit-section-movement-hook: Section Movement. (line 46) -* magit-section-set-visibility-hook: Section Visibility. (line 106) -* magit-section-show-child-count: Section Options. (line 9) -* magit-section-visibility-indicator: Section Visibility. (line 124) -* magit-shell-command-verbose-prompt: Running Git Manually. - (line 47) -* magit-stashes-margin: Stashing. (line 104) -* magit-status-headers-hook: Status Header Sections. - (line 18) -* magit-status-margin: Status Options. (line 10) -* magit-status-refresh-hook: Status Options. (line 6) -* magit-status-sections-hook: Status Sections. (line 10) -* magit-submodule-list-columns: Listing Submodules. (line 21) -* magit-this-process: Calling Git for Effect. - (line 131) -* magit-uniquify-buffer-names: Naming Buffers. (line 74) -* magit-unstage-committed: Staging and Unstaging. - (line 56) -* magit-update-other-window-delay: Section Movement. (line 112) -* magit-visit-ref-behavior: References Buffer. (line 192) -* magit-wip-after-apply-mode: Legacy Wip Modes. (line 19) -* magit-wip-after-apply-mode-lighter: Legacy Wip Modes. (line 59) -* magit-wip-after-save-local-mode-lighter: Legacy Wip Modes. (line 55) -* magit-wip-after-save-mode: Legacy Wip Modes. (line 13) -* magit-wip-before-change-mode: Legacy Wip Modes. (line 33) -* magit-wip-before-change-mode-lighter: Legacy Wip Modes. (line 63) -* magit-wip-initial-backup-mode: Legacy Wip Modes. (line 38) -* magit-wip-initial-backup-mode-lighter: Legacy Wip Modes. (line 67) -* magit-wip-merge-branch: Wip Graph. (line 6) -* magit-wip-mode: Wip Modes. (line 30) -* magit-wip-mode-lighter: Wip Modes. (line 104) -* magit-wip-namespace: Wip Modes. (line 96) -* notes.displayRef: Notes. (line 65) -* pull.rebase: Branch Git Variables. - (line 57) -* remote.NAME.fetch: Remote Git Variables. - (line 15) -* remote.NAME.push: Remote Git Variables. - (line 26) -* remote.NAME.pushurl: Remote Git Variables. - (line 20) -* remote.NAME.tagOpts: Remote Git Variables. - (line 31) -* remote.NAME.url: Remote Git Variables. - (line 10) -* remote.pushDefault: Branch Git Variables. - (line 71) - diff --git a/elpa/magit-20210802.1524/AUTHORS.md b/elpa/magit-20220116.1908/AUTHORS.md similarity index 97% rename from elpa/magit-20210802.1524/AUTHORS.md rename to elpa/magit-20220116.1908/AUTHORS.md index 7f70f7a6..44343b63 100644 --- a/elpa/magit-20210802.1524/AUTHORS.md +++ b/elpa/magit-20220116.1908/AUTHORS.md @@ -78,10 +78,12 @@ Contributors - Bart Bakker - Basil L. Contovounesios - Bastian Beischer +- Bastian Beranek - Benjamin Motz - Ben North - Ben Walton - Bob Uhl +- Boruch Baum - Bradley Wright - Brandon W Maister - Brian Leung @@ -115,6 +117,7 @@ Contributors - Daniel Kraus - Daniel Mai - Daniel Martín +- Daniel Nagy - Dan LaManna - Danny Zhu - Dato Simó @@ -142,6 +145,8 @@ Contributors - Felix Yan - Feng Li - Florian Ragwitz +- Franklin Delehelle +- Frédéric Giquel - Fritz Grabo - Fritz Stelzer - Geoff Shannon @@ -182,6 +187,7 @@ Contributors - Jonathan del Strother - Jonathan Leech-Pepin - Jonathan Roes +- Jonathon McKitrick - Jon Vanderwijk - Jordan Galby - Jordan Greenberg @@ -209,6 +215,7 @@ Contributors - Leonardo Etcheverry - Leo Vivier - Lingchao Xin +- Lin Sun - Li-Yun Chang - Lluís Vilanova - Loic Dachary @@ -347,6 +354,7 @@ Contributors - Tim Wraight - Ting-Yu Lin - Tom Feist +- Toon Claes - Topi Miettinen - Troy Hinckley - Tsuyoshi Kitamoto diff --git a/elpa/magit-20210802.1524/LICENSE b/elpa/magit-20220116.1908/LICENSE similarity index 100% rename from elpa/magit-20210802.1524/LICENSE rename to elpa/magit-20220116.1908/LICENSE diff --git a/elpa/magit-20210802.1524/dir b/elpa/magit-20220116.1908/dir similarity index 100% rename from elpa/magit-20210802.1524/dir rename to elpa/magit-20220116.1908/dir diff --git a/elpa/magit-20210802.1524/git-rebase.el b/elpa/magit-20220116.1908/git-rebase.el similarity index 97% rename from elpa/magit-20210802.1524/git-rebase.el rename to elpa/magit-20220116.1908/git-rebase.el index 6a8a7775..a893a64d 100644 --- a/elpa/magit-20210802.1524/git-rebase.el +++ b/elpa/magit-20220116.1908/git-rebase.el @@ -1,6 +1,6 @@ ;;; git-rebase.el --- Edit Git rebase files -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -112,32 +112,37 @@ :group 'faces :group 'git-rebase) -(defface git-rebase-hash '((t (:inherit magit-hash))) +(defface git-rebase-hash '((t :inherit magit-hash)) "Face for commit hashes." :group 'git-rebase-faces) -(defface git-rebase-label '((t (:inherit magit-refname))) +(defface git-rebase-label '((t :inherit magit-refname)) "Face for labels in label, merge, and reset lines." :group 'git-rebase-faces) -(defface git-rebase-description nil +(defface git-rebase-description '((t nil)) "Face for commit descriptions." :group 'git-rebase-faces) +(defface git-rebase-action + '((t :inherit font-lock-keyword-face)) + "Face for action keywords." + :group 'git-rebase-faces) + (defface git-rebase-killed-action - '((t (:inherit font-lock-comment-face :strike-through t))) + '((t :inherit font-lock-comment-face :strike-through t)) "Face for commented commit action lines." :group 'git-rebase-faces) (defface git-rebase-comment-hash - '((t (:inherit git-rebase-hash :weight bold))) + '((t :inherit git-rebase-hash :weight bold)) "Face for commit hashes in commit message comments." :group 'git-rebase-faces) (defface git-rebase-comment-heading '((t :inherit font-lock-keyword-face)) "Face for headings in rebase message comments." - :group 'git-commit-faces) + :group 'git-rebase-faces) ;;; Keymaps @@ -443,7 +448,7 @@ current line." (when bounds (magit-section-make-overlay (car bounds) (cadr bounds) 'magit-section-heading-selection)) - (if (and bounds (not magit-keep-region-overlay)) + (if (and bounds (not magit-section-keep-region-overlay)) (funcall (default-value 'redisplay-unhighlight-region-function) rol) (funcall (default-value 'redisplay-highlight-region-function) start end window rol)))) @@ -731,25 +736,25 @@ running 'man git-rebase' at the command line) for details." (defun git-rebase-mode-font-lock-keywords () "Font lock keywords for Git-Rebase mode." `((,(concat "^" (cdr (assq 'commit git-rebase-line-regexps))) - (1 'font-lock-keyword-face) + (1 'git-rebase-action) (3 'git-rebase-hash) (4 'git-rebase-description)) (,(concat "^" (cdr (assq 'exec git-rebase-line-regexps))) - (1 'font-lock-keyword-face) + (1 'git-rebase-action) (3 'git-rebase-description)) (,(concat "^" (cdr (assq 'bare git-rebase-line-regexps))) - (1 'font-lock-keyword-face)) + (1 'git-rebase-action)) (,(concat "^" (cdr (assq 'label git-rebase-line-regexps))) - (1 'font-lock-keyword-face) + (1 'git-rebase-action) (3 'git-rebase-label) (4 'font-lock-comment-face)) ("^\\(m\\(?:erge\\)?\\) -[Cc] \\([^ \n]+\\) \\([^ \n]+\\)\\( #.*\\)?" - (1 'font-lock-keyword-face) + (1 'git-rebase-action) (2 'git-rebase-hash) (3 'git-rebase-label) (4 'font-lock-comment-face)) ("^\\(m\\(?:erge\\)?\\) \\([^ \n]+\\)" - (1 'font-lock-keyword-face) + (1 'git-rebase-action) (2 'git-rebase-label)) (,(concat git-rebase-comment-re " *" (cdr (assq 'commit git-rebase-line-regexps))) diff --git a/elpa/magit-20210802.1524/magit-apply.el b/elpa/magit-20220116.1908/magit-apply.el similarity index 92% rename from elpa/magit-20210802.1524/magit-apply.el rename to elpa/magit-20220116.1908/magit-apply.el index 1feeddf3..3edae33c 100644 --- a/elpa/magit-20210802.1524/magit-apply.el +++ b/elpa/magit-20220116.1908/magit-apply.el @@ -1,6 +1,6 @@ ;;; magit-apply.el --- apply Git diffs -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -39,8 +39,8 @@ (require 'transient) ; See #3732. ;; For `magit-apply' -(declare-function magit-am "magit-sequence" ()) -(declare-function magit-patch-apply "magit-files" ()) +(declare-function magit-am "magit-sequence" () t) +(declare-function magit-patch-apply "magit-patch" () t) ;; For `magit-discard-files' (declare-function magit-checkout-stage "magit-merge" (file arg)) (declare-function magit-checkout-read-stage "magit-merge" (file)) @@ -55,6 +55,11 @@ (declare-function borg-assimilate "borg" (package url &optional partially)) (defvar borg-user-emacs-directory) +(cl-eval-when (compile load) + (when (< emacs-major-version 26) + (defalias 'smerge-keep-upper 'smerge-keep-mine) + (defalias 'smerge-keep-lower 'smerge-keep-other))) + ;;; Options (defcustom magit-delete-by-moving-to-trash t @@ -449,6 +454,8 @@ without requiring confirmation." (defun magit-unstage-all () "Remove all changes from the staging area." (interactive) + (unless (magit-anything-staged-p) + (user-error "Nothing to unstage")) (when (or (magit-anything-unstaged-p) (magit-untracked-files)) (magit-confirm 'unstage-all-changes)) @@ -459,7 +466,11 @@ without requiring confirmation." ;;;; Discard (defun magit-discard () - "Remove the change at point." + "Remove the change at point. + +On a hunk or file with unresolved conflicts prompt which side to +keep (while discarding the other). If point is within the text +of a side, then keep that side without prompting." (interactive) (--when-let (magit-apply--get-selection) (pcase (list (magit-diff-type) (magit-diff-scope)) @@ -478,7 +489,10 @@ without requiring confirmation." (defun magit-discard-hunk (section) (magit-confirm 'discard "Discard hunk") - (magit-discard-apply section 'magit-apply-hunk)) + (let ((file (magit-section-parent-value section))) + (pcase (cddr (car (magit-file-status file))) + (`(?U ?U) (magit-smerge-keep-current)) + (_ (magit-discard-apply section 'magit-apply-hunk))))) (defun magit-discard-apply (section apply) (if (eq (magit-diff-type section) 'unstaged) @@ -735,6 +749,60 @@ a separate commit. A typical workflow would be: (interactive) (magit-reverse (cons "--cached" args))) +;;; Smerge Support + +(defun magit-smerge-keep-current () + "Keep the current version of the conflict at point." + (interactive) + (magit-call-smerge #'smerge-keep-current)) + +(defun magit-smerge-keep-upper () + "Keep the upper/our version of the conflict at point." + (interactive) + (magit-call-smerge #'smerge-keep-upper)) + +(defun magit-smerge-keep-base () + "Keep the base version of the conflict at point." + (interactive) + (magit-call-smerge #'smerge-keep-base)) + +(defun magit-smerge-keep-lower () + "Keep the lower/their version of the conflict at point." + (interactive) + (magit-call-smerge #'smerge-keep-lower)) + +(defun magit-call-smerge (fn) + (pcase-let* ((file (magit-file-at-point t t)) + (keep (get-file-buffer file)) + (`(,buf ,pos) + (let ((magit-diff-visit-jump-to-change nil)) + (magit-diff-visit-file--noselect file)))) + (with-current-buffer buf + (save-excursion + (save-restriction + (unless (<= (point-min) pos (point-max)) + (widen)) + (goto-char pos) + (condition-case nil + (smerge-match-conflict) + (error + (if (eq fn 'smerge-keep-current) + (when (eq this-command 'magit-discard) + (re-search-forward smerge-begin-re nil t) + (setq fn + (magit-read-char-case "Keep side: " t + (?o "[o]urs/upper" #'smerge-keep-upper) + (?b "[b]ase" #'smerge-keep-base) + (?t "[t]heirs/lower" #'smerge-keep-lower)))) + (re-search-forward smerge-begin-re nil t)))) + (funcall fn))) + (when (and keep (magit-anything-unmerged-p file)) + (smerge-start-session)) + (save-buffer)) + (unless keep + (kill-buffer buf)) + (magit-refresh))) + ;;; _ (provide 'magit-apply) ;;; magit-apply.el ends here diff --git a/elpa/magit-20210802.1524/magit-autoloads.el b/elpa/magit-20220116.1908/magit-autoloads.el similarity index 96% rename from elpa/magit-20210802.1524/magit-autoloads.el rename to elpa/magit-20220116.1908/magit-autoloads.el index e17bf129..89dad858 100644 --- a/elpa/magit-20210802.1524/magit-autoloads.el +++ b/elpa/magit-20220116.1908/magit-autoloads.el @@ -452,6 +452,35 @@ and also rename the respective reflog file. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-branch" '("magit-"))) +;;;*** + +;;;### (autoloads nil "magit-bundle" "magit-bundle.el" (0 0 0 0)) +;;; Generated autoloads from magit-bundle.el + (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. + +\(fn FILE TAG BRANCH REFS ARGS)" t nil) + +(autoload 'magit-bundle-update-tracked "magit-bundle" "\ +Update a bundle that is being tracked using TAG. + +\(fn TAG)" t nil) + +(autoload 'magit-bundle-verify "magit-bundle" "\ +Check whether FILE is valid and applies to the current repository. + +\(fn FILE)" t nil) + +(autoload 'magit-bundle-list-heads "magit-bundle" "\ +List the refs in FILE. + +\(fn FILE)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-bundle" '("magit-"))) + ;;;*** ;;;### (autoloads nil "magit-clone" "magit-clone.el" (0 0 0 0)) @@ -845,6 +874,13 @@ Show log for all marked files, or the current file. \(fn &optional FOLLOW)" t nil) +(autoload 'magit-dired-am-apply-patches "magit-extras" "\ +In Dired, apply the marked (or next ARG) files as patches. +If inside a repository, then apply in that. Otherwise prompt +for a repository. + +\(fn REPO &optional ARG)" t nil) + (autoload 'magit-do-async-shell-command "magit-extras" "\ Open FILE with `dired-do-async-shell-command'. Interactively, open the file at point. @@ -890,6 +926,15 @@ with two prefix arguments remove ignored files only. \(fn &optional ARG)" t nil) +(autoload 'magit-generate-changelog "magit-extras" "\ +Insert ChangeLog entries into the current buffer. + +The entries are generated from the diff being committed. +If prefix argument, AMENDING, is non-nil, include changes +in HEAD as well as staged changes in the diff to check. + +\(fn &optional AMENDING)" t nil) + (autoload 'magit-add-change-log-entry "magit-extras" "\ Find change log file and add date entry and item for current change. This differs from `add-change-log-entry' (which see) in that @@ -1032,6 +1077,27 @@ When `magit-copy-revision-abbreviated' is non-nil, save the abbreviated revision to the `kill-ring' and the `magit-revision-stack'." t nil) +(autoload 'magit-display-repository-buffer "magit-extras" "\ +Display a Magit buffer belonging to the current Git repository. +The buffer is displayed using `magit-display-buffer', which see. + +\(fn BUFFER)" t nil) + +(autoload 'magit-switch-to-repository-buffer "magit-extras" "\ +Switch to a Magit buffer belonging to the current Git repository. + +\(fn BUFFER)" t nil) + +(autoload 'magit-switch-to-repository-buffer-other-window "magit-extras" "\ +Switch to a Magit buffer belonging to the current Git repository. + +\(fn BUFFER)" t nil) + +(autoload 'magit-switch-to-repository-buffer-other-frame "magit-extras" "\ +Switch to a Magit buffer belonging to the current Git repository. + +\(fn BUFFER)" t nil) + (autoload 'magit-abort-dwim "magit-extras" "\ Abort current operation. Depending on the context, this will abort a merge, a rebase, a @@ -1074,16 +1140,7 @@ removed on the respective remote." t nil) (autoload 'magit-fetch-all-no-prune "magit-fetch" "\ Fetch from all remotes." t nil) - -(autoload 'magit-fetch-modules "magit-fetch" "\ -Fetch all submodules. - -Option `magit-fetch-modules-jobs' controls how many submodules -are being fetched in parallel. Also fetch the super-repository, -because `git-fetch' does not support not doing that. With a -prefix argument fetch all remotes. - -\(fn &optional ALL)" t nil) + (autoload 'magit-fetch-modules "magit-fetch" nil t) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-fetch" '("magit-"))) @@ -1438,7 +1495,7 @@ provided the respective remote branch already exists, ensuring that the respective pull-request (if any) won't get stuck on some obsolete version of the commits that are being merged. Finally if `forge-branch-pullreq' was used to create the merged branch, -branch, then also remove the respective remote branch. +then also remove the respective remote branch. \(fn BRANCH &optional ARGS)" t nil) @@ -1732,6 +1789,14 @@ doing that. Unset the local representation of REMOTE's default branch. Delete the symbolic-ref \"refs/remotes//HEAD\". +\(fn REMOTE)" t nil) + +(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 +wildcard, then also offer to replace it with the standard +refspec. + \(fn REMOTE)" t nil) (autoload 'magit-remote-configure "magit-remote" nil t) @@ -1854,7 +1919,7 @@ process manually. Move COMMITS from the current branch onto another existing BRANCH. Remove COMMITS from the current branch and stay on that branch. If a conflict occurs, then you have to fix that and finish the -process manually. +process manually. `HEAD' is allowed to be detached initially. \(fn COMMITS BRANCH &optional ARGS)" t nil) @@ -2038,6 +2103,14 @@ are staged changes, apply without preserving the stash index. \(fn STASH)" t nil) +(autoload 'magit-stash-pop "magit-stash" "\ +Apply a stash to the working tree and remove it from stash list. +Try to preserve the stash index. If that fails because there +are staged changes, apply without preserving the stash index +and forgo removing the stash. + +\(fn STASH)" t nil) + (autoload 'magit-stash-drop "magit-stash" "\ Remove a stash from the stash list. When the region is active offer to drop all contained stashes. @@ -2139,6 +2212,22 @@ also contains other useful hints.") (autoload 'magit-status-here "magit-status" "\ Like `magit-status' but with non-nil `magit-status-goto-file-position'." t nil) +(autoload 'magit-status-quick "magit-status" "\ +Show the status of the current Git repository, maybe without refreshing. + +If the status buffer of the current Git repository exists but +isn't being displayed in the selected frame, then display it +without refreshing it. + +If the status buffer is being displayed in the selected frame, +then also refresh it. + +Prefix arguments have the same meaning as for `magit-status', +and additionally cause the buffer to be refresh. + +To use this function instead of `magit-status', add this to your +init file: (global-set-key (kbd \"C-x g\") 'magit-status-quick)." t nil) + (autoload 'magit-status-setup-buffer "magit-status" "\ diff --git a/elpa/magit-20210802.1524/magit-autorevert.el b/elpa/magit-20220116.1908/magit-autorevert.el similarity index 99% rename from elpa/magit-20210802.1524/magit-autorevert.el rename to elpa/magit-20220116.1908/magit-autorevert.el index 75e88d8e..c998d7a6 100644 --- a/elpa/magit-20210802.1524/magit-autorevert.el +++ b/elpa/magit-20220116.1908/magit-autorevert.el @@ -1,6 +1,6 @@ ;;; magit-autorevert.el --- revert buffers when files in repository change -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-bisect.el b/elpa/magit-20220116.1908/magit-bisect.el similarity index 96% rename from elpa/magit-20210802.1524/magit-bisect.el rename to elpa/magit-20220116.1908/magit-bisect.el index 8efe1af3..ff2a53b5 100644 --- a/elpa/magit-20210802.1524/magit-bisect.el +++ b/elpa/magit-20220116.1908/magit-bisect.el @@ -1,6 +1,6 @@ ;;; magit-bisect.el --- bisect support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2011-2021 The Magit Project Contributors +;; Copyright (C) 2011-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -65,11 +65,11 @@ ["Arguments" ("-n" "Don't checkout commits" "--no-checkout") ("-p" "Follow only first parent of a merge" "--first-parent" - :if (lambda () (version<= "2.29" (magit-git-version)))) + :if (lambda () (magit-git-version>= "2.29"))) (6 magit-bisect:--term-old - :if (lambda () (version<= "2.7" (magit-git-version)))) + :if (lambda () (magit-git-version>= "2.7"))) (6 magit-bisect:--term-new - :if (lambda () (version<= "2.7" (magit-git-version))))] + :if (lambda () (magit-git-version>= "2.7")))] ["Actions" ("B" "Start" magit-bisect-start) ("s" "Start script" magit-bisect-run)]] @@ -78,7 +78,7 @@ ("B" "Bad" magit-bisect-bad) ("g" "Good" magit-bisect-good) (6 "m" "Mark" magit-bisect-mark - :if (lambda () (version<= "2.7" (magit-git-version)))) + :if (lambda () (magit-git-version>= "2.7"))) ("k" "Skip" magit-bisect-skip) ("r" "Reset" magit-bisect-reset) ("s" "Run script" magit-bisect-run)]) @@ -204,7 +204,9 @@ bisect run'." (magit-process-git-arguments (list "bisect" "start" bad good args))) (magit-refresh))) - (magit-git-bisect "run" (list shell-file-name shell-command-switch cmdline))) + (magit--with-connection-local-variables + (magit-git-bisect "run" (list shell-file-name + shell-command-switch cmdline)))) (defun magit-git-bisect (subcommand &optional args no-assert) (unless (or no-assert (magit-bisect-in-progress-p)) diff --git a/elpa/magit-20210802.1524/magit-blame.el b/elpa/magit-20220116.1908/magit-blame.el similarity index 98% rename from elpa/magit-20210802.1524/magit-blame.el rename to elpa/magit-20220116.1908/magit-blame.el index 91e71a0c..81c6219e 100644 --- a/elpa/magit-20210802.1524/magit-blame.el +++ b/elpa/magit-20220116.1908/magit-blame.el @@ -1,6 +1,6 @@ ;;; magit-blame.el --- blame support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2012-2021 The Magit Project Contributors +;; Copyright (C) 2012-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -197,19 +197,19 @@ Also see option `magit-blame-styles'." Also see option `magit-blame-styles'." :group 'magit-faces) -(defface magit-blame-summary nil +(defface magit-blame-summary '((t nil)) "Face used for commit summaries when blaming." :group 'magit-faces) -(defface magit-blame-hash nil +(defface magit-blame-hash '((t nil)) "Face used for commit hashes when blaming." :group 'magit-faces) -(defface magit-blame-name nil +(defface magit-blame-name '((t nil)) "Face used for author and committer names when blaming." :group 'magit-faces) -(defface magit-blame-date nil +(defface magit-blame-date '((t nil)) "Face used for dates when blaming." :group 'magit-faces) @@ -232,7 +232,9 @@ Also see option `magit-blame-styles'." (magit-blame-chunk-at (point))) (and type (let ((rev (or magit-buffer-refname magit-buffer-revision)) - (file (magit-file-relative-name nil (not magit-buffer-file-name))) + (file (and (not (derived-mode-p 'dired-mode)) + (magit-file-relative-name + nil (not magit-buffer-file-name)))) (line (format "%i,+1" (line-number-at-pos)))) (cond (file (with-temp-buffer (magit-with-toplevel @@ -915,12 +917,14 @@ instead of the hash, like `kill-ring-save' would." :description "Detect lines moved or copied within a file" :class 'transient-option :argument "-M" + :allow-empty t :reader 'transient-read-number-N+) (transient-define-argument magit-blame:-C () :description "Detect lines moved or copied between files" :class 'transient-option :argument "-C" + :allow-empty t :reader 'transient-read-number-N+) ;;; Utilities diff --git a/elpa/magit-20210802.1524/magit-bookmark.el b/elpa/magit-20220116.1908/magit-bookmark.el similarity index 99% rename from elpa/magit-20210802.1524/magit-bookmark.el rename to elpa/magit-20220116.1908/magit-bookmark.el index 22f022e6..b65b3ace 100644 --- a/elpa/magit-20210802.1524/magit-bookmark.el +++ b/elpa/magit-20220116.1908/magit-bookmark.el @@ -1,6 +1,6 @@ ;;; magit-bookmark.el --- bookmark support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-branch.el b/elpa/magit-20220116.1908/magit-branch.el similarity index 98% rename from elpa/magit-20210802.1524/magit-branch.el rename to elpa/magit-20220116.1908/magit-branch.el index 1b5f0882..c663eb14 100644 --- a/elpa/magit-20210802.1524/magit-branch.el +++ b/elpa/magit-20220116.1908/magit-branch.el @@ -1,6 +1,6 @@ ;;; magit-branch.el --- branch support -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -217,7 +217,7 @@ has to be used to view and change branch related variables." ["Arguments" (7 "-r" "Recurse submodules when checking out an existing branch" "--recurse-submodules" - :if (lambda () (version<= "2.13" (magit-git-version))))] + :if (lambda () (magit-git-version>= "2.13")))] ["Variables" :if (lambda () (and magit-branch-direct-configure @@ -361,13 +361,15 @@ when using `magit-branch-and-checkout'." (magit-checkout branch (magit-branch-arguments)) (when (magit-anything-modified-p t) (user-error "Cannot checkout when there are uncommitted changes")) - (magit-branch-and-checkout branch start-point) + (let ((magit-inhibit-refresh t)) + (magit-branch-and-checkout branch start-point)) (when (magit-remote-branch-p start-point) (pcase-let ((`(,remote . ,remote-branch) (magit-split-branch-name start-point))) (when (and (equal branch remote-branch) (not (equal remote (magit-get "remote.pushDefault")))) - (magit-set remote "branch" branch "pushRemote")))))) + (magit-set remote "branch" branch "pushRemote")))) + (magit-refresh))) (defun magit-branch-maybe-adjust-upstream (branch start-point) (--when-let @@ -618,16 +620,19 @@ defaulting to the branch at point." (t ; And now for something completely different. (let* ((branch (car branches)) (prompt (format "Branch %s is checked out. " branch)) - (main (magit-main-branch))) + (target (magit-get-upstream-branch))) (when (equal branch (magit-get-current-branch)) - (pcase (if (or (equal branch main) - (not main)) + (when (or (equal branch target) + (not target)) + (setq target (magit-main-branch))) + (pcase (if (or (equal branch target) + (not target)) (magit-read-char-case prompt nil (?d "[d]etach HEAD & delete" 'detach) (?a "[a]bort" 'abort)) (magit-read-char-case prompt nil (?d "[d]etach HEAD & delete" 'detach) - (?c (format "[c]heckout %s & delete" main) 'main) + (?c (format "[c]heckout %s & delete" target) 'target) (?a "[a]bort" 'abort))) (`detach (unless (or (equal force '(4)) (member branch force) @@ -636,13 +641,13 @@ defaulting to the branch at point." "Delete unmerged branch %s" "" nil (list branch))) (magit-call-git "checkout" "--detach")) - (`main (unless (or (equal force '(4)) + (`target (unless (or (equal force '(4)) (member branch force) - (magit-branch-merged-p branch main)) + (magit-branch-merged-p branch target)) (magit-confirm 'delete-unmerged-branch "Delete unmerged branch %s" "" nil (list branch))) - (magit-call-git "checkout" main)) + (magit-call-git "checkout" target)) (`abort (user-error "Abort"))) (setq force t)) (magit-branch-maybe-delete-pr-remote branch) diff --git a/elpa/magit-20220116.1908/magit-bundle.el b/elpa/magit-20220116.1908/magit-bundle.el new file mode 100644 index 00000000..8afa7ffc --- /dev/null +++ b/elpa/magit-20220116.1908/magit-bundle.el @@ -0,0 +1,135 @@ +;;; magit-bundle.el --- bundle support for Magit -*- lexical-binding: t -*- + +;; Copyright (C) 2011-2022 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; SPDX-License-Identifier: GPL-3.0-or-later + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Code: + +(require 'magit) + +;;; Commands + +;;;###autoload (autoload 'magit-bundle "magit-bundle" nil t) +(transient-define-prefix magit-bundle () + "Create or verify Git bundles." + :man-page "git-bundle" + ["Actions" + ("c" "create" magit-bundle-create) + ("v" "verify" magit-bundle-verify) + ("l" "list-heads" magit-bundle-list-heads)]) + +;;;###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" + ["Arguments" + ("-a" "Include all refs" "--all") + ("-b" "Include branches" "--branches=" :allow-empty t) + ("-t" "Include tags" "--tags=" :allow-empty t) + ("-r" "Include remotes" "--remotes=" :allow-empty t) + ("-g" "Include refs" "--glob=") + ("-e" "Exclude refs" "--exclude=") + (magit-log:-n) + (magit-log:--since) + (magit-log:--until)] + ["Actions" + ("c" "create regular bundle" magit-bundle-create) + ("t" "create tracked bundle" magit-bundle-create-tracked) + ("u" "update tracked bundle" magit-bundle-update-tracked)] + (interactive + (and (eq transient-current-command 'magit-bundle-create) + (list (read-file-name "Create bundle: " nil nil nil + (concat (file-name-nondirectory + (directory-file-name (magit-toplevel))) + ".bundle")) + (magit-completing-read-multiple* "Refnames (zero or more): " + (magit-list-refnames)) + (transient-args 'magit-bundle-create)))) + (if file + (magit-git-bundle "create" file refs args) + (transient-setup 'magit-bundle-create))) + +;;;###autoload +(defun magit-bundle-create-tracked (file tag branch refs args) + "Create and track a new bundle." + (interactive + (let ((tag (magit-read-tag "Track bundle using tag")) + (branch (magit-read-branch "Bundle branch")) + (refs (magit-completing-read-multiple* + "Additional refnames (zero or more): " + (magit-list-refnames)))) + (list (read-file-name "File: " nil nil nil (concat tag ".bundle")) + tag branch + (if (equal branch (magit-get-current-branch)) + (cons "HEAD" refs) + refs) + (transient-args 'magit-bundle-create)))) + (magit-git-bundle "create" file (cons branch refs) args) + (magit-git "tag" "--force" tag branch + "-m" (concat ";; git-bundle tracking\n" + (pp-to-string `((file . ,file) + (branch . ,branch) + (refs . ,refs) + (args . ,args)))))) + +;;;###autoload +(defun magit-bundle-update-tracked (tag) + "Update a bundle that is being tracked using TAG." + (interactive (list (magit-read-tag "Update bundle tracked by tag" t))) + (let (msg) + (let-alist (magit--with-temp-process-buffer + (save-excursion + (magit-git-insert "for-each-ref" "--format=%(contents)" + (concat "refs/tags/" tag))) + (setq msg (buffer-string)) + (ignore-errors (read (current-buffer)))) + (unless (and .file .branch) + (error "Tag %s does not appear to track a bundle" tag)) + (magit-git-bundle "create" .file + (cons (concat tag ".." .branch) .refs) + .args) + (magit-git "tag" "--force" tag .branch "-m" msg)))) + +;;;###autoload +(defun magit-bundle-verify (file) + "Check whether FILE is valid and applies to the current repository." + (interactive (list (magit-bundle--read-file-name "Verify bundle: "))) + (magit-process-buffer) + (magit-git-bundle "verify" file)) + +;;;###autoload +(defun magit-bundle-list-heads (file) + "List the refs in FILE." + (interactive (list (magit-bundle--read-file-name "List heads of bundle: "))) + (magit-process-buffer) + (magit-git-bundle "list-heads" file)) + +(defun magit-bundle--read-file-name (prompt) + (read-file-name prompt nil nil t (magit-file-at-point) #'file-regular-p)) + +(defun magit-git-bundle (command file &optional refs args) + (magit-git "bundle" command (magit-convert-filename-for-git file) refs args)) + +;;; _ +(provide 'magit-bundle) +;;; magit-bundle.el ends here diff --git a/elpa/magit-20210802.1524/magit-clone.el b/elpa/magit-20220116.1908/magit-clone.el similarity index 96% rename from elpa/magit-20210802.1524/magit-clone.el rename to elpa/magit-20220116.1908/magit-clone.el index 3b30e477..f2813cb8 100644 --- a/elpa/magit-20210802.1524/magit-clone.el +++ b/elpa/magit-20220116.1908/magit-clone.el @@ -1,6 +1,6 @@ ;;; magit-clone.el --- clone a repository -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -257,9 +257,15 @@ Then show the status buffer for the new repository." str (magit-clone--name-to-url str)))) (?p "[p]ath" - (read-directory-name "Clone repository: ")) - (?l "or [l]ocal url" - (concat "file://" (read-directory-name "Clone repository: file://"))))) + (magit-convert-filename-for-git + (read-directory-name "Clone repository: "))) + (?l "[l]ocal url" + (concat "file://" + (magit-convert-filename-for-git + (read-directory-name "Clone repository: file://")))) + (?b "or [b]undle" + (magit-convert-filename-for-git + (read-file-name "Clone from bundle: "))))) (defun magit-clone--url-to-name (url) (and (string-match "\\([^/:]+?\\)\\(/?\\.git\\)?$" url) diff --git a/elpa/magit-20210802.1524/magit-commit.el b/elpa/magit-20220116.1908/magit-commit.el similarity index 94% rename from elpa/magit-20210802.1524/magit-commit.el rename to elpa/magit-20220116.1908/magit-commit.el index 51f64057..c2b5a429 100644 --- a/elpa/magit-20210802.1524/magit-commit.el +++ b/elpa/magit-20220116.1908/magit-commit.el @@ -1,6 +1,6 @@ ;;; magit-commit.el --- create Git commits -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -91,6 +91,34 @@ Also see `git-commit-post-finish-hook'." :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. + +When writing a commit, then a diff of the changes to be committed +is automatically shown. The idea is that the diff is shown in a +different window of the same frame and for most users that just +works. In other words most users can completely ignore this +option because its value doesn't make a difference for them. + +However for users who configured Emacs to never create a new +window even when the package explicitly tries to do so, then +displaying two new buffers necessarily means that the first is +immediately replaced by the second. In our case the message +buffer is immediately replaced by the diff buffer, which is of +course highly undesirable. + +A workaround is to suppress this user configuration in this +particular case. Users have to explicitly opt-in by toggling +this option. We cannot enable the workaround unconditionally +because that again causes issues for other users: if the frame +is too tiny or the relevant settings too aggressive, then the +diff buffer would end up being displayed in a new frame. + +Also see https://github.com/magit/magit/issues/4132." + :package-version '(magit . "3.3.0") + :group 'magit-commands + :type 'boolean) + (defvar magit-post-commit-hook-commands '(magit-commit-extend magit-commit-fixup @@ -153,7 +181,7 @@ Also see `git-commit-post-finish-hook'." (defun magit-read-gpg-secret-key (prompt &optional initial-input history predicate) (require 'epa) - (let* ((keys (mapcan + (let* ((keys (cl-mapcan (lambda (cert) (and (or (not predicate) (funcall predicate cert)) @@ -574,7 +602,11 @@ See `magit-commit-absorb' for an alternative implementation." (magit-inhibit-save-previous-winconf 'unset) (magit-display-buffer-noselect t) (inhibit-quit nil) - (display-buffer-overriding-action '(nil (inhibit-same-window t)))) + (display-buffer-overriding-action + display-buffer-overriding-action)) + (when magit-commit-diff-inhibit-same-window + (setq display-buffer-overriding-action + '(nil (inhibit-same-window t)))) (message "Diffing changes to be committed (C-g to abort diffing)") (cl-case last-command (magit-commit diff --git a/elpa/magit-20210802.1524/magit-core.el b/elpa/magit-20220116.1908/magit-core.el similarity index 95% rename from elpa/magit-20210802.1524/magit-core.el rename to elpa/magit-20220116.1908/magit-core.el index 3d19d6c3..c0873a98 100644 --- a/elpa/magit-20210802.1524/magit-core.el +++ b/elpa/magit-20220116.1908/magit-core.el @@ -1,6 +1,6 @@ ;;; magit-core.el --- core functionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -96,6 +96,9 @@ Each of these options falls into one or more of these categories: :group 'magit :group 'faces) +(custom-add-to-group 'magit-faces 'diff-refine-added 'custom-face) +(custom-add-to-group 'magit-faces 'diff-refine-removed 'custom-face) + (defgroup magit-extensions nil "Extensions to Magit." :group 'magit) diff --git a/elpa/magit-20210802.1524/magit-diff.el b/elpa/magit-20220116.1908/magit-diff.el similarity index 98% rename from elpa/magit-20210802.1524/magit-diff.el rename to elpa/magit-20220116.1908/magit-diff.el index 004cb173..b38c17ad 100644 --- a/elpa/magit-20210802.1524/magit-diff.el +++ b/elpa/magit-20220116.1908/magit-diff.el @@ -1,6 +1,6 @@ ;;; magit-diff.el --- inspect Git diffs -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -35,20 +35,22 @@ (eval-when-compile (require 'ansi-color)) (require 'diff-mode) +(require 'image) (require 'smerge-mode) ;; For `magit-diff-popup' (declare-function magit-stash-show "magit-stash" (stash &optional args files)) ;; For `magit-diff-visit-file' -(declare-function dired-jump "dired-x" (&optional other-window file-name)) +(declare-function dired-jump "dired" ; dired-x before 27.1 + (&optional other-window file-name)) (declare-function magit-find-file-noselect "magit-files" (rev file)) -(declare-function magit-status-setup-buffer "magit-status" (directory)) +(declare-function magit-status-setup-buffer "magit-status" (&optional directory)) ;; For `magit-diff-while-committing' (declare-function magit-commit-message-buffer "magit-commit" ()) ;; For `magit-insert-revision-gravatar' (defvar gravatar-size) ;; For `magit-show-commit' and `magit-diff-show-or-scroll' -(declare-function magit-current-blame-chunk "magit-blame" ()) +(declare-function magit-current-blame-chunk "magit-blame" (&optional type noerror)) (declare-function magit-blame-mode "magit-blame" (&optional arg)) (defvar magit-blame-mode) ;; For `magit-diff-show-or-scroll' @@ -61,7 +63,7 @@ (pullreq &optional endpoints)) (declare-function forge--pullreq-ref "forge-pullreq" (pullreq)) ;; For `magit-diff-wash-diff' -(declare-function ansi-color-apply-on-region "ansi-color" (begin end)) +(declare-function ansi-color-apply-on-region "ansi-color") (eval-when-compile (cl-pushnew 'orig-rev eieio--known-slot-names) @@ -93,10 +95,10 @@ (defcustom magit-diff-expansion-threshold 60 "After how many seconds not to expand anymore diffs. -Except in status buffers, diffs are usually start out fully -expanded. Because that can take a long time, all diffs that -haven't been fontified during a refresh before the threshold -defined here are instead displayed with their bodies collapsed. +Except in status buffers, diffs usually start out fully expanded. +Because that can take a long time, all diffs that haven't been +fontified during a refresh before the threshold defined here are +instead displayed with their bodies collapsed. Note that this can cause sections that were previously expanded to be collapsed. So you should not pick a very low value here. @@ -967,12 +969,14 @@ and `:slant'." :description "Detect renames" :class 'transient-option :argument "-M" + :allow-empty t :reader 'transient-read-number-N+) (transient-define-argument magit-diff:-C () :description "Detect copies" :class 'transient-option :argument "-C" + :allow-empty t :reader 'transient-read-number-N+) (transient-define-argument magit-diff:--diff-algorithm () @@ -1097,8 +1101,8 @@ If no DWIM context is found, nil is returned." ([* unstaged] 'unstaged) ([* staged] 'staged) (unmerged 'unmerged) - (unpushed (oref it value)) - (unpulled (oref it value)) + (unpushed (magit-diff--range-to-endpoints (oref it value))) + (unpulled (magit-diff--range-to-endpoints (oref it value))) (branch (let ((current (magit-get-current-branch)) (atpoint (oref it value))) (if (equal atpoint current) @@ -1117,6 +1121,11 @@ If no DWIM context is found, nil is returned." (stash (cons 'stash (oref it value))) (pullreq (forge--pullreq-range (oref it value) t)))))) +(defun magit-diff--range-to-endpoints (range) + (cond ((string-match "\\.\\.\\." range) (replace-match ".." nil nil range)) + ((string-match "\\.\\." range) (replace-match "..." nil nil range)) + (t range))) + (defun magit-diff-read-range-or-commit (prompt &optional secondary-default mbase) "Read range or revision with special diff range treatment. If MBASE is non-nil, prompt for which rev to place at the end of @@ -1676,11 +1685,13 @@ the Magit-Status buffer for DIRECTORY." (not (< (point) (oref section content))) (= (char-after (line-beginning-position)) ?-))) +(defvar magit-diff-visit-jump-to-change t) + (defun magit-diff-hunk-line (section goto-from) (save-excursion (goto-char (line-beginning-position)) (with-slots (content combined from-ranges from-range to-range) section - (when (< (point) content) + (when (and magit-diff-visit-jump-to-change (< (point) content)) (goto-char content) (re-search-forward "^[-+]")) (+ (car (if goto-from from-range to-range)) @@ -1974,6 +1985,12 @@ Staging and applying changes is documented in info node (defvar magit-hunk-section-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-diff-section-base-map) + (let ((m (make-sparse-keymap))) + (define-key m (kbd "RET") 'magit-smerge-keep-current) + (define-key m (kbd "u") 'magit-smerge-keep-upper) + (define-key m (kbd "b") 'magit-smerge-keep-base) + (define-key m (kbd "l") 'magit-smerge-keep-lower) + (define-key map smerge-command-prefix m)) map) "Keymap for `hunk' sections.") @@ -2041,7 +2058,7 @@ Staging and applying changes is documented in info node (when (and (not (equal cmd "merge-tree")) (pcase (magit-repository-local-get 'diff-ita-kludge-p 'unset) (`unset - (let ((val (version<= "2.19.0" (magit-git-version)))) + (let ((val (magit-git-version>= "2.19.0"))) (magit-repository-local-set 'diff-ita-kludge-p val) val)) (val val))) @@ -2258,6 +2275,7 @@ section or a child thereof." (unless (equal (match-string 1) "/dev/null") (setq file (match-string 1)))) ((looking-at "Binary files .+ and .+ differ\n")) + ((looking-at "Binary files differ\n")) ;; TODO Use all combined diff extended headers. ((looking-at "mode .+\n")) (t @@ -2327,7 +2345,7 @@ section or a child thereof." (equal (match-string 1) module)) (magit-bind-match-strings (_module range rewind) nil (magit-delete-line) - (while (looking-at "^ \\([<>]\\) \\(.+\\)$") + (while (looking-at "^ \\([<>]\\) \\(.*\\)$") (magit-delete-line)) (when rewind (setq range (replace-regexp-in-string "[^.]\\(\\.\\.\\)[^.]" @@ -2708,9 +2726,11 @@ or a ref which is not a branch, then it inserts nothing." (gravatar-size (- size 2))) (ignore-errors ; service may be unreachable (gravatar-retrieve email 'magit-insert-revision-gravatar-cb - (list rev (point-marker) align-to column)))))))) + (list gravatar-size rev + (point-marker) + align-to column)))))))) -(defun magit-insert-revision-gravatar-cb (image rev marker align-to column) +(defun magit-insert-revision-gravatar-cb (image size rev marker align-to column) (unless (eq image 'error) (when-let ((buffer (marker-buffer marker))) (with-current-buffer buffer @@ -2724,10 +2744,13 @@ or a ref which is not a branch, then it inserts nothing." (car-safe (get-text-property (point) 'display))) 'image))) - (let ((top `((,@image :ascent center :relief 1) - (slice 0.0 0.0 1.0 0.5))) - (bot `((,@image :ascent center :relief 1) - (slice 0.0 0.5 1.0 1.0))) + ;; `image-property' wasn't added until 26.1. + (setcdr image (plist-put (cdr image) :ascent 'center)) + (setcdr image (plist-put (cdr image) :relief 1)) + (setcdr image (plist-put (cdr image) :scale 1)) + (setcdr image (plist-put (cdr image) :height size)) + (let ((top (list image '(slice 0.0 0.0 1.0 0.5))) + (bot (list image '(slice 0.0 0.5 1.0 1.0))) (align `((space :align-to ,align-to)))) (when magit-revision-use-gravatar-kludge (cl-rotatef top bot)) @@ -2949,8 +2972,7 @@ actually a `diff' but a `diffstat' section." (`(file ,_ ,_ ,_) 'file) (`(module t t nil) 'files) (`(module ,_ ,_ ,_) 'file) - (`(,(or `staged `unstaged `untracked) - nil ,_ ,_) 'list))))) + (`(,(or `staged `unstaged `untracked) nil ,_ ,_) 'list))))) (defun magit-diff-use-hunk-region-p () (and (region-active-p) @@ -3227,7 +3249,8 @@ are highlighted." (defun magit-diff-update-hunk-region (section) "Highlight the hunk-internal region if any." - (when (eq (magit-diff-scope section t) 'region) + (when (and (eq (oref section type) 'hunk) + (eq (magit-diff-scope section t) 'region)) (magit-diff--make-hunk-overlay (oref section start) (1- (oref section content)) diff --git a/elpa/magit-20210802.1524/magit-ediff.el b/elpa/magit-20220116.1908/magit-ediff.el similarity index 99% rename from elpa/magit-20210802.1524/magit-ediff.el rename to elpa/magit-20220116.1908/magit-ediff.el index 58c47f5f..97b49cc8 100644 --- a/elpa/magit-20210802.1524/magit-ediff.el +++ b/elpa/magit-20220116.1908/magit-ediff.el @@ -1,6 +1,6 @@ ;;; magit-ediff.el --- Ediff extension for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-extras.el b/elpa/magit-20220116.1908/magit-extras.el similarity index 91% rename from elpa/magit-20210802.1524/magit-extras.el rename to elpa/magit-20220116.1908/magit-extras.el index a7f1cbe9..a7966d1a 100644 --- a/elpa/magit-20210802.1524/magit-extras.el +++ b/elpa/magit-20220116.1908/magit-extras.el @@ -1,6 +1,6 @@ ;;; magit-extras.el --- additional functionality for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -196,6 +196,21 @@ is no file at point, then instead visit `default-directory'." magit-log-buffer-file-locked)) (magit--not-inside-repository-error))) +;;;###autoload +(defun magit-dired-am-apply-patches (repo &optional arg) + "In Dired, apply the marked (or next ARG) files as patches. +If inside a repository, then apply in that. Otherwise prompt +for a repository." + (interactive (list (or (magit-toplevel) + (magit-read-repository t)) + current-prefix-arg)) + ;; Note: The ERROR argument of `dired-get-marked-files' isn't + ;; available until Emacs 27. + (let ((files (or (dired-get-marked-files nil arg) + (user-error "No files specified")))) + (magit-status-setup-buffer repo) + (magit-am-apply-patches files))) + ;;;###autoload (defun magit-do-async-shell-command (file) "Open FILE with `dired-do-async-shell-command'. @@ -282,6 +297,7 @@ with two prefix arguments remove ignored files only. ;;; ChangeLog +;;;###autoload (defun magit-generate-changelog (&optional amending) "Insert ChangeLog entries into the current buffer. @@ -753,6 +769,55 @@ abbreviated revision to the `kill-ring' and the (push (list rev default-directory) magit-revision-stack) (kill-new (message "%s" rev)))))) +;;; Buffer Switching + +;;;###autoload +(defun magit-display-repository-buffer (buffer) + "Display a Magit buffer belonging to the current Git repository. +The buffer is displayed using `magit-display-buffer', which see." + (interactive (list (magit--read-repository-buffer + "Display magit buffer: "))) + (magit-display-buffer buffer)) + +;;;###autoload +(defun magit-switch-to-repository-buffer (buffer) + "Switch to a Magit buffer belonging to the current Git repository." + (interactive (list (magit--read-repository-buffer + "Switch to magit buffer: "))) + (switch-to-buffer buffer)) + +;;;###autoload +(defun magit-switch-to-repository-buffer-other-window (buffer) + "Switch to a Magit buffer belonging to the current Git repository." + (interactive (list (magit--read-repository-buffer + "Switch to magit buffer in another window: "))) + (switch-to-buffer-other-window buffer)) + +;;;###autoload +(defun magit-switch-to-repository-buffer-other-frame (buffer) + "Switch to a Magit buffer belonging to the current Git repository." + (interactive (list (magit--read-repository-buffer + "Switch to magit buffer in another frame: "))) + (switch-to-buffer-other-frame buffer)) + +(defun magit--read-repository-buffer (prompt) + (if-let ((topdir (magit-rev-parse-safe "--show-toplevel"))) + (read-buffer + prompt (magit-get-mode-buffer 'magit-status-mode) t + (pcase-lambda (`(,_ . ,buf)) + (and buf + (with-current-buffer buf + (and (or (derived-mode-p 'magit-mode + 'magit-repolist-mode + 'magit-submodule-list-mode + 'git-rebase-mode) + (and buffer-file-name + (string-match-p git-commit-filename-regexp + buffer-file-name))) + (equal (magit-rev-parse-safe "--show-toplevel") + topdir)))))) + (user-error "Not inside a Git repository"))) + ;;; Miscellaneous ;;;###autoload diff --git a/elpa/magit-20210802.1524/magit-fetch.el b/elpa/magit-20220116.1908/magit-fetch.el similarity index 78% rename from elpa/magit-20210802.1524/magit-fetch.el rename to elpa/magit-20220116.1908/magit-fetch.el index e4006150..3cbd008d 100644 --- a/elpa/magit-20210802.1524/magit-fetch.el +++ b/elpa/magit-20220116.1908/magit-fetch.el @@ -1,6 +1,6 @@ ;;; magit-fetch.el --- download objects and refs -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -31,14 +31,11 @@ (require 'magit) -;;; Options - -(defcustom magit-fetch-modules-jobs 4 - "Number of submodules to fetch in parallel. -Ignored for Git versions before v2.8.0." - :package-version '(magit . "2.12.0") - :group 'magit-commands - :type '(choice (const :tag "one at a time" nil) number)) +(defvar magit-fetch-modules-jobs nil) +(make-obsolete-variable + 'magit-fetch-modules-jobs + "invoke `magit-fetch-modules' with a prefix argument instead." + "Magit 3.0.0") ;;; Commands @@ -167,22 +164,39 @@ removed on the respective remote." (run-hooks 'magit-credential-hook) (magit-run-git-async "remote" "update")) -;;;###autoload -(defun magit-fetch-modules (&optional all) +;;;###autoload (autoload 'magit-fetch-modules "magit-fetch" nil t) +(transient-define-prefix magit-fetch-modules (&optional transient args) "Fetch all submodules. -Option `magit-fetch-modules-jobs' controls how many submodules -are being fetched in parallel. Also fetch the super-repository, -because `git-fetch' does not support not doing that. With a -prefix argument fetch all remotes." - (interactive "P") - (magit-with-toplevel - (magit-run-git-async - "fetch" "--verbose" "--recurse-submodules" - (and magit-fetch-modules-jobs - (version<= "2.8.0" (magit-git-version)) - (list "-j" (number-to-string magit-fetch-modules-jobs))) - (and all "--all")))) +Fetching is done using \"git fetch --recurse-submodules\", which +means that the super-repository and recursively all submodules +are also fetched. + +To set and potentially save other arguments invoke this command +with a prefix argument." + :man-page "git-fetch" + :value (list "--verbose" + (cond (magit-fetch-modules-jobs + (format "--jobs=%s" magit-fetch-modules-jobs)) + (t "--jobs=4"))) + ["Arguments" + ("-v" "verbose" "--verbose") + ("-a" "all remotes" "--all") + ("-j" "number of jobs" "--jobs=" :reader transient-read-number-N+)] + ["Action" + ("m" "fetch modules" magit-fetch-modules)] + (interactive (if current-prefix-arg + (list t) + (list nil (transient-args 'magit-fetch-modules)))) + (if transient + (transient-setup 'magit-fetch-modules) + (when (magit-git-version< "2.8.0") + (when-let ((value (transient-arg-value "--jobs=" args))) + (message "Dropping --jobs; not supported by Git v%s" + (magit-git-version)) + (setq args (remove (format "--jobs=%s" value) args)))) + (magit-with-toplevel + (magit-run-git-async "fetch" "--recurse-submodules" args)))) ;;; _ (provide 'magit-fetch) diff --git a/elpa/magit-20210802.1524/magit-files.el b/elpa/magit-20220116.1908/magit-files.el similarity index 98% rename from elpa/magit-20210802.1524/magit-files.el rename to elpa/magit-20220116.1908/magit-files.el index 160de383..2b91c8ef 100644 --- a/elpa/magit-20210802.1524/magit-files.el +++ b/elpa/magit-20220116.1908/magit-files.el @@ -1,6 +1,6 @@ ;;; magit-files.el --- finding files -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -251,7 +251,7 @@ reading the FILENAME." (find-file filename wildcards)) (defun magit-find-git-config-file-other-window (filename &optional wildcards) - "Edit a file located in the current repository's git directory, in another window. + "Edit a file located in the current repo's git directory, in another window. When \".git\", located at the root of the working tree, is a regular file, then that makes it cumbersome to open a file @@ -267,7 +267,7 @@ directory, while reading the FILENAME." (find-file-other-window filename wildcards)) (defun magit-find-git-config-file-other-frame (filename &optional wildcards) - "Edit a file located in the current repository's git directory, in another frame. + "Edit a file located in the current repo's git directory, in another frame. When \".git\", located at the root of the working tree, is a regular file, then that makes it cumbersome to open a file diff --git a/elpa/magit-20210802.1524/magit-git.el b/elpa/magit-20220116.1908/magit-git.el similarity index 96% rename from elpa/magit-20210802.1524/magit-git.el rename to elpa/magit-20220116.1908/magit-git.el index 68f9ff1f..80e2e30f 100644 --- a/elpa/magit-20210802.1524/magit-git.el +++ b/elpa/magit-20220116.1908/magit-git.el @@ -1,6 +1,6 @@ ;;; magit-git.el --- Git functionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -53,7 +53,8 @@ ;; From `magit-process'. (declare-function magit-call-git "magit-process" (&rest args)) (declare-function magit-process-buffer "magit-process" (&optional nodisplay)) -(declare-function magit-process-file "magit-process" (&rest args)) +(declare-function magit-process-file "magit-process" + (process &optional infile buffer display &rest args)) (declare-function magit-process-git "magit-process" (destination &rest args)) (declare-function magit-process-insert-section "magit-process" (pwd program args &optional errcode errlog)) @@ -133,12 +134,9 @@ the environment in order to run the non-wrapper git executables successfully.") (defcustom magit-git-executable - ;; Git might be installed in a different location on a remote, so - ;; it is better not to use the full path to the executable, except - ;; on Window where we would otherwise end up using one of the - ;; wrappers "cmd/git.exe" or "cmd/git.cmd", which are much slower - ;; than using "bin/git.exe" directly. (or (and (eq system-type 'windows-nt) + ;; Avoid the wrappers "cmd/git.exe" and "cmd/git.cmd", + ;; which are much slower than using "bin/git.exe" directly. (--when-let (executable-find "git") (ignore-errors ;; Git for Windows 2.x provides cygpath so we can @@ -176,7 +174,9 @@ On remote machines `magit-remote-git-executable' is used instead." (defcustom magit-remote-git-executable "git" "The Git executable used by Magit on remote machines. -On the local host `magit-git-executable' is used instead." +On the local host `magit-git-executable' is used instead. +Consider customizing `tramp-remote-path' instead of this +option." :package-version '(magit . "3.2.0") :group 'magit-process :type 'string) @@ -223,8 +223,9 @@ option is non-nil and git returns with a non-zero exit status, then at least its standard error is inserted into this buffer. This is only intended for debugging purposes. Do not enable this -permanently, that would negatively affect performance.") +permanently, that would negatively affect performance. +Also see `magit-process-extreme-logging'.") (defcustom magit-prefer-remote-upstream nil "Whether to favor remote branches when reading the upstream branch. @@ -574,11 +575,20 @@ call function WASHER with ARGS as its sole argument." (magit-maybe-make-margin-overlay)))) (defun magit-git-version (&optional raw) + "Return the installed Git version." (--when-let (let (magit-git-global-arguments) (ignore-errors (substring (magit-git-string "version") 12))) (if raw it (and (string-match "\\`\\([0-9]+\\(\\.[0-9]+\\)\\{1,2\\}\\)" it) (match-string 1 it))))) +(defun magit-git-version>= (n) + "Return t if `magit-git-version's value is greater than or equal to N." + (magit--version>= (magit-git-version) n)) + +(defun magit-git-version< (n) + "Return t if `magit-git-version's value is smaller than N." + (version< (magit-git-version) n)) + ;;; Variables (defun magit-config-get-from-cached-list (key) @@ -1018,15 +1028,18 @@ Sorted from longest to shortest CYGWIN name." (defun magit-convert-filename-for-git (filename) "Convert FILENAME so that it can be passed to git. -1. If it's a remote filename, then remove the remote part. -2. Deal with an `windows-nt' Emacs vs. Cygwin Git incompatibility." +1. If it's a absolute filename, then pass through `expand-file-name' + to replace things such as \"~/\" that Git does not understand. +2. If it's a remote filename, then remove the remote part. +3. Deal with an `windows-nt' Emacs vs. Cygwin Git incompatibility." (if (file-name-absolute-p filename) (-if-let ((cyg . win) (cl-rassoc filename magit-cygwin-mount-points :test (lambda (f win) (string-prefix-p win f)))) (concat cyg (substring filename (length win))) - (or (file-remote-p filename 'localname) - filename)) + (let ((expanded (expand-file-name filename))) + (or (file-remote-p expanded 'localname) + expanded))) filename)) (defun magit-decode-git-path (path) @@ -1195,7 +1208,7 @@ ref that should have been excluded, then that is discarded and this function returns nil instead. This is unfortunate because there might be other refs that do match. To fix that, update Git." - (if (version< (magit-git-version) "2.13") + (if (magit-git-version< "2.13") (when-let ((ref (magit-git-string "name-rev" "--name-only" "--no-undefined" (and pattern (concat "--refs=" pattern)) @@ -1391,7 +1404,7 @@ to, or to some other symbolic-ref that points to the same ref." (defun magit-remote-at-point () (magit-section-case (remote (oref it value)) - (branch (magit-section-parent-value it)))) + ([branch remote] (magit-section-parent-value it)))) (defun magit-module-at-point (&optional predicate) (when (magit-section-match 'magit-module-section) @@ -1449,7 +1462,7 @@ remote-tracking branch ref." It BRANCH is nil, then return the upstream of the current branch if any, nil otherwise. If the upstream is not configured, the configured remote is an url, or the named branch does not exist, -then return nil. I.e. return the name of an existing local or +then return nil. I.e. return the name of an existing local or remote-tracking branch. The returned string is colorized according to the branch type." (magit--with-refresh-cache (list 'magit-get-upstream-branch branch) @@ -1687,7 +1700,9 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of ((and val (pred listp)) val))) (or namespaces magit-list-refs-namespaces)))) (if (member format '("%(refname)" "%(refname:short)")) - (--remove (string-match-p "\\(\\`\\|/\\)HEAD\\'" it) refs) + (let ((case-fold-search nil)) + (--remove (string-match-p "\\(\\`\\|/\\)HEAD\\'" it) + refs)) refs))) (defun magit-list-branches () @@ -1820,14 +1835,23 @@ PATH has to be relative to the super-repository." (magit-git-string "submodule--helper" "name" path)) (defun magit-list-worktrees () - (let (worktrees worktree) + (let ((remote (file-remote-p default-directory)) + worktrees worktree) (dolist (line (let ((magit-git-global-arguments ;; KLUDGE At least in v2.8.3 this triggers a segfault. (remove "--no-pager" magit-git-global-arguments))) (magit-git-lines "worktree" "list" "--porcelain"))) (cond ((string-prefix-p "worktree" line) - (push (setq worktree (list (substring line 9) nil nil nil)) - worktrees)) + (let ((path (substring line 9))) + (when remote + (setq path (concat remote path))) + ;; If the git directory is separate from the main + ;; worktree, then "git worktree" returns the git + ;; directory instead of the worktree, which isn't + ;; what it is supposed to do and not what we want. + (setq path (magit-toplevel path)) + (setq worktree (list path nil nil nil)) + (push worktree worktrees))) ((string-equal line "bare") (let* ((default-directory (car worktree)) (wt (and (not (magit-get-boolean "core.bare")) @@ -1946,12 +1970,13 @@ Return a list of two integers: (A>B B>A)." (cdr (split-string it)))) (defun magit-patch-id (rev) - (magit--with-temp-process-buffer - (magit-process-file - shell-file-name nil '(t nil) nil shell-command-switch - (let ((exec (shell-quote-argument (magit-git-executable)))) - (format "%s diff-tree -u %s | %s patch-id" exec rev exec))) - (car (split-string (buffer-string))))) + (magit--with-connection-local-variables + (magit--with-temp-process-buffer + (magit-process-file + shell-file-name nil '(t nil) nil shell-command-switch + (let ((exec (shell-quote-argument (magit-git-executable)))) + (format "%s diff-tree -u %s | %s patch-id" exec rev exec))) + (car (split-string (buffer-string)))))) (defun magit-rev-format (format &optional rev args) (let ((str (magit-git-string "show" "--no-patch" @@ -2147,7 +2172,7 @@ and this option only controls what face is used.") (defun magit-update-ref (ref message rev &optional stashish) (let ((magit--refresh-cache nil)) - (or (if (not (version< (magit-git-version) "2.6.0")) + (or (if (magit-git-version>= "2.6.0") (zerop (magit-call-git "update-ref" "--create-reflog" "-m" message ref rev (or (magit-rev-verify ref) ""))) @@ -2210,6 +2235,14 @@ and this option only controls what face is used.") (defvar magit-revision-history nil) +(defun magit--minibuf-default-add-commit () + (let ((fn minibuffer-default-add-function)) + (lambda () + (if-let ((commit (with-selected-window (minibuffer-selected-window) + (magit-commit-at-point)))) + (cons commit (delete commit (funcall fn))) + (funcall fn))))) + (defun magit-read-branch (prompt &optional secondary-default) (magit-completing-read prompt (magit-list-branch-names) nil t nil 'magit-revision-history @@ -2218,12 +2251,13 @@ and this option only controls what face is used.") (magit-get-current-branch)))) (defun magit-read-branch-or-commit (prompt &optional secondary-default) - (or (magit-completing-read prompt (magit-list-refnames nil t) - nil nil nil 'magit-revision-history - (or (magit-branch-or-commit-at-point) - secondary-default - (magit-get-current-branch))) - (user-error "Nothing selected"))) + (let ((minibuffer-default-add-function (magit--minibuf-default-add-commit))) + (or (magit-completing-read prompt (magit-list-refnames nil t) + nil nil nil 'magit-revision-history + (or (magit-branch-or-commit-at-point) + secondary-default + (magit-get-current-branch))) + (user-error "Nothing selected")))) (defun magit-read-range-or-commit (prompt &optional secondary-default) (magit-read-range @@ -2236,7 +2270,8 @@ and this option only controls what face is used.") (magit-get-current-branch)))) (defun magit-read-range (prompt &optional default) - (let ((crm-separator "\\.\\.\\.?")) + (let ((minibuffer-default-add-function (magit--minibuf-default-add-commit)) + (crm-separator "\\.\\.\\.?")) (magit-completing-read-multiple* (concat prompt ": ") (magit-list-refnames) @@ -2271,7 +2306,8 @@ and this option only controls what face is used.") (magit-get-current-branch)))) (defun magit-read-local-branch-or-commit (prompt) - (let ((choices (nconc (magit-list-local-branch-names) + (let ((minibuffer-default-add-function (magit--minibuf-default-add-commit)) + (choices (nconc (magit-list-local-branch-names) (magit-list-special-refnames))) (commit (magit-commit-at-point))) (when commit @@ -2304,7 +2340,8 @@ and this option only controls what face is used.") (defun magit-read-other-branch-or-commit (prompt &optional exclude secondary-default) - (let* ((current (magit-get-current-branch)) + (let* ((minibuffer-default-add-function (magit--minibuf-default-add-commit)) + (current (magit-get-current-branch)) (atpoint (magit-branch-or-commit-at-point)) (exclude (or exclude current)) (default (or (and (not (equal atpoint exclude)) diff --git a/elpa/magit-20210802.1524/magit-gitignore.el b/elpa/magit-20220116.1908/magit-gitignore.el similarity index 96% rename from elpa/magit-20210802.1524/magit-gitignore.el rename to elpa/magit-20220116.1908/magit-gitignore.el index da4101e2..7ff64695 100644 --- a/elpa/magit-20210802.1524/magit-gitignore.el +++ b/elpa/magit-20220116.1908/magit-gitignore.el @@ -1,6 +1,6 @@ ;;; magit-gitignore.el --- intentionally untracked files -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -153,7 +153,8 @@ Rules that are defined in that file affect all local repositories." (magit-with-toplevel (cl-set-difference (magit-list-files) - (magit-skip-worktree-files)))))) + (magit-skip-worktree-files) + :test #'equal))))) (magit-with-toplevel (magit-run-git "update-index" "--skip-worktree" "--" file))) @@ -177,7 +178,8 @@ Rules that are defined in that file affect all local repositories." (magit-with-toplevel (cl-set-difference (magit-list-files) - (magit-assume-unchanged-files)))))) + (magit-assume-unchanged-files) + :test #'equal))))) (magit-with-toplevel (magit-run-git "update-index" "--assume-unchanged" "--" file))) diff --git a/elpa/magit-20210802.1524/magit-imenu.el b/elpa/magit-20220116.1908/magit-imenu.el similarity index 88% rename from elpa/magit-20210802.1524/magit-imenu.el rename to elpa/magit-20220116.1908/magit-imenu.el index 774d302d..fad04dec 100644 --- a/elpa/magit-20210802.1524/magit-imenu.el +++ b/elpa/magit-20220116.1908/magit-imenu.el @@ -1,6 +1,6 @@ ;;; magit-imenu.el --- Integrate Imenu in magit major modes -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -47,21 +47,28 @@ ENTRY-TYPES is a list of section types to be selected through `imenu'. MENU-TYPES is a list of section types containing elements of -ENTRY-TYPES. Elements of MENU-TYPES are are used to categories +ENTRY-TYPES. Elements of MENU-TYPES are used to categorize elements of ENTRY-TYPES. This function is used as a helper for functions set as `imenu-create-index-function'." - (let ((entries (make-hash-table :test 'equal))) + ;; If `which-function-mode' is active, then the create-index + ;; function is called at the time the major-mode is being enabled. + ;; Modes that derive from `magit-mode' have not populated the buffer + ;; at that time yet, so we have to abort. + (when-let ((section (magit-current-section)) + (entries (make-hash-table :test 'equal))) (goto-char (point-max)) + (unless (oref section parent) + (forward-line -1)) (while (magit-section--backward-find (lambda () (let* ((section (magit-current-section)) (type (oref section type)) (parent (oref section parent)) (parent-type (oref parent type))) - (and (-contains-p entry-types type) - (-contains-p menu-types parent-type))))) + (and (memq type entry-types) + (memq parent-type menu-types))))) (let* ((section (magit-current-section)) (name (buffer-substring-no-properties (line-beginning-position) @@ -70,6 +77,8 @@ This function is used as a helper for functions set as (parent-title (buffer-substring-no-properties (oref parent start) (1- (oref parent content))))) + (when (string-match " ([0-9]*)\\'" parent-title) + (setq parent-title (substring parent-title 0 (match-beginning 0)))) (puthash parent-title (cons (cons name (point)) (gethash parent-title entries (list))) @@ -133,10 +142,10 @@ beginning of the line." This function is used as a value for `imenu-create-index-function'." (magit-imenu--index-function - '(file commit stash) - '(unpushed unstaged unpulled untracked staged stashes))) + '(file commit stash pullreq issue) + '(unpushed unstaged unpulled untracked staged stashes pullreqs issues))) -;;;; Refs mode +;;; Refs mode ;;;###autoload (defun magit-imenu--refs-create-index-function () @@ -147,7 +156,7 @@ This function is used as a value for '(branch commit tag) '(local remote tags))) -;;;; Cherry mode +;;; Cherry mode ;;;###autoload (defun magit-imenu--cherry-create-index-function () @@ -158,7 +167,7 @@ This function is used as a value for '(commit) '(cherries))) -;;;; Submodule list mode +;;; Submodule list mode ;;;###autoload (defun magit-imenu--submodule-prev-index-position-function () @@ -176,7 +185,7 @@ This function is used as a value for beginning of the line." (elt (tabulated-list-get-entry) 0)) -;;;; Repolist mode +;;; Repolist mode ;;;###autoload (defun magit-imenu--repolist-prev-index-position-function () @@ -197,7 +206,7 @@ beginning of the line." (elt entry 0) (elt entry (1- (length entry)))))) -;;;; Process mode +;;; Process mode ;;;###autoload (defun magit-imenu--process-prev-index-position-function () @@ -217,7 +226,7 @@ beginning of the line." (buffer-substring-no-properties (line-beginning-position) (line-end-position))) -;;;; Rebase mode +;;; Rebase mode ;;;###autoload (defun magit-imenu--rebase-prev-index-position-function () diff --git a/elpa/magit-20210802.1524/magit-log.el b/elpa/magit-20220116.1908/magit-log.el similarity index 98% rename from elpa/magit-20210802.1524/magit-log.el rename to elpa/magit-20220116.1908/magit-log.el index 887232ca..3c9a12c1 100644 --- a/elpa/magit-20210802.1524/magit-log.el +++ b/elpa/magit-20220116.1908/magit-log.el @@ -1,6 +1,6 @@ ;;; magit-log.el --- inspect Git history -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -34,7 +34,7 @@ (require 'magit-core) (require 'magit-diff) -(declare-function magit-blob-visit "magit-files" (blob-or-file line)) +(declare-function magit-blob-visit "magit-files" (blob-or-file)) (declare-function magit-insert-head-branch-header "magit-status" (&optional branch)) (declare-function magit-insert-upstream-branch-header "magit-status" @@ -406,8 +406,8 @@ the upstream isn't ahead of the current branch) show." ["Commit limiting" (magit-log:-n) (magit:--author) - (7 "=s" "Limit to commits since" "--since=" transient-read-date) - (7 "=u" "Limit to commits until" "--until=" transient-read-date) + (7 magit-log:--since) + (7 magit-log:--until) (magit-log:--grep) (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) (7 "-I" "Invert search pattern" "--invert-grep") @@ -550,6 +550,20 @@ the upstream isn't ahead of the current branch) show." :argument "--author=" :reader 'magit-transient-read-person) +(transient-define-argument magit-log:--since () + :description "Limit to commits since" + :class 'transient-option + :key "=s" + :argument "--since=" + :reader 'transient-read-date) + +(transient-define-argument magit-log:--until () + :description "Limit to commits until" + :class 'transient-option + :key "=u" + :argument "--until=" + :reader 'transient-read-date) + (transient-define-argument magit-log:--*-order () :description "Order commits by" :class 'transient-switches @@ -951,9 +965,9 @@ of the current repository first; creating it if necessary." (defvar magit-log-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-mode-map) - (define-key map "\C-c\C-b" 'magit-go-backward) - (define-key map "\C-c\C-f" 'magit-go-forward) - (define-key map "\C-c\C-n" 'magit-log-move-to-parent) + (define-key map (kbd "C-c C-b") 'magit-go-backward) + (define-key map (kbd "C-c C-f") 'magit-go-forward) + (define-key map (kbd "C-c C-n") 'magit-log-move-to-parent) (define-key map "j" 'magit-log-move-to-revision) (define-key map "=" 'magit-log-toggle-commit-limit) (define-key map "+" 'magit-log-double-commit-limit) @@ -1007,9 +1021,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point. (files magit-buffer-log-files)) (magit-set-header-line-format (funcall magit-log-header-line-function revs args files)) - (if (= (length files) 1) - (unless (magit-file-tracked-p (car files)) - (setq args (cons "--full-history" args))) + (unless (= (length files) 1) (setq args (remove "--follow" args))) (when (and (car magit-log-remove-graph-args) (--any-p (string-match-p @@ -1428,8 +1440,7 @@ If there is no blob buffer in the same frame, then do nothing." (save-excursion (magit-blob-visit (list (magit-rev-parse rev) (magit-file-relative-name - magit-buffer-file-name)) - (line-number-at-pos)))))))))))) + magit-buffer-file-name))))))))))))) (defun magit-log-goto-commit-section (rev) (let ((abbrev (magit-rev-format "%h" rev))) @@ -1531,13 +1542,13 @@ The shortstat style is experimental and rather slow." (defvar magit-log-select-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-log-mode-map) - (define-key map "\C-c\C-b" 'undefined) - (define-key map "\C-c\C-f" 'undefined) - (define-key map "." 'magit-log-select-pick) - (define-key map "e" 'magit-log-select-pick) - (define-key map "\C-c\C-c" 'magit-log-select-pick) - (define-key map "q" 'magit-log-select-quit) - (define-key map "\C-c\C-k" 'magit-log-select-quit) + (define-key map (kbd "C-c C-b") 'undefined) + (define-key map (kbd "C-c C-f") 'undefined) + (define-key map (kbd ".") 'magit-log-select-pick) + (define-key map (kbd "e") 'magit-log-select-pick) + (define-key map (kbd "C-c C-c") 'magit-log-select-pick) + (define-key map (kbd "q") 'magit-log-select-quit) + (define-key map (kbd "C-c C-k") 'magit-log-select-quit) map) "Keymap for `magit-log-select-mode'.") diff --git a/elpa/magit-20210802.1524/magit-margin.el b/elpa/magit-20220116.1908/magit-margin.el similarity index 99% rename from elpa/magit-20210802.1524/magit-margin.el rename to elpa/magit-20220116.1908/magit-margin.el index 2889238d..4cd8074f 100644 --- a/elpa/magit-20210802.1524/magit-margin.el +++ b/elpa/magit-20220116.1908/magit-margin.el @@ -1,6 +1,6 @@ ;;; magit-margin.el --- margins in Magit buffers -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-merge.el b/elpa/magit-20220116.1908/magit-merge.el similarity index 97% rename from elpa/magit-20210802.1524/magit-merge.el rename to elpa/magit-20220116.1908/magit-merge.el index a50ca3dd..470cac96 100644 --- a/elpa/magit-20210802.1524/magit-merge.el +++ b/elpa/magit-20220116.1908/magit-merge.el @@ -1,6 +1,6 @@ ;;; magit-merge.el --- merge functionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -47,6 +47,8 @@ ("-n" "No fast-forward" "--no-ff") (magit-merge:--strategy) (5 magit-merge:--strategy-option) + (5 "-b" "Ignore changes in amount of whitespace" "-Xignore-space-change") + (5 "-w" "Ignore whitespace when comparing lines" "-Xignore-all-space") (5 magit-diff:--diff-algorithm :argument "-Xdiff-algorithm=") (5 magit:--gpg-sign)] ["Actions" @@ -137,7 +139,7 @@ provided the respective remote branch already exists, ensuring that the respective pull-request (if any) won't get stuck on some obsolete version of the commits that are being merged. Finally if `forge-branch-pullreq' was used to create the merged branch, -branch, then also remove the respective remote branch." +then also remove the respective remote branch." (interactive (list (magit-read-other-local-branch (format "Merge `%s' into" diff --git a/elpa/magit-20210802.1524/magit-mode.el b/elpa/magit-20220116.1908/magit-mode.el similarity index 96% rename from elpa/magit-20210802.1524/magit-mode.el rename to elpa/magit-20220116.1908/magit-mode.el index efa1614e..f32bf0d7 100644 --- a/elpa/magit-20210802.1524/magit-mode.el +++ b/elpa/magit-20220116.1908/magit-mode.el @@ -1,6 +1,6 @@ ;;; magit-mode.el --- create and refresh Magit buffers -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -49,7 +49,7 @@ ;; For `magit-refresh-buffer' (declare-function magit-process-unset-mode-line-error-status "magit-process" ()) ;; For `magit-refresh-get-relative-position' -(declare-function magit-hunk-section-p "magit-diff" (obj)) +(declare-function magit-hunk-section-p "magit-diff" (section) t) ;; For `magit-mode-setup-internal' (declare-function magit-status-goto-initial-section "magit-status" ()) ;; For `magit-mode' from `bookmark' @@ -110,7 +110,7 @@ inside your function." :type 'hook) (defcustom magit-display-buffer-function 'magit-display-buffer-traditional - "The function used display a Magit buffer. + "The function used to display a Magit buffer. All Magit buffers (buffers whose major-modes derive from `magit-mode') are displayed using `magit-display-buffer', @@ -226,7 +226,7 @@ Valid values are: buffer. For more information see info node `(magit)Transient Arguments -and Buffer Arguments'." +and Buffer Variables'." :package-version '(magit . "3.0.0") :group 'magit-buffers :group 'magit-commands @@ -259,7 +259,7 @@ Valid values are: buffer. For more information see info node `(magit)Transient Arguments -and Buffer Arguments'." +and Buffer Variables'." :package-version '(magit . "3.0.0") :group 'magit-buffers :group 'magit-commands @@ -336,23 +336,16 @@ recommended value." (defvar magit-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-section-mode-map) - (define-key map [C-return] 'magit-visit-thing) - (define-key map (kbd "C-m") 'magit-visit-thing) - (define-key map (kbd "C-M-i") 'magit-dired-jump) - (define-key map [M-tab] 'magit-section-cycle-diffs) - (define-key map (kbd "P") 'magit-push) - (define-key map (kbd "k") 'magit-delete-thing) - (define-key map (kbd "K") 'magit-file-untrack) - (define-key map (kbd "i") 'magit-gitignore) - (define-key map (kbd "I") 'magit-gitignore) - (define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up) + (define-key map [C-return] 'magit-visit-thing) + (define-key map (kbd "RET") 'magit-visit-thing) + (define-key map (kbd "M-TAB") 'magit-dired-jump) + (define-key map [M-tab] 'magit-section-cycle-diffs) + (define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up) (define-key map (kbd "S-SPC") 'magit-diff-show-or-scroll-down) - (define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down) - (define-key map "+" 'magit-diff-more-context) - (define-key map "-" 'magit-diff-less-context) - (define-key map "0" 'magit-diff-default-context) - (define-key map "$" 'magit-process-buffer) - (define-key map "%" 'magit-worktree) + (define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down) + (define-key map "+" 'magit-diff-more-context) + (define-key map "-" 'magit-diff-less-context) + (define-key map "0" 'magit-diff-default-context) (define-key map "a" 'magit-cherry-apply) (define-key map "A" 'magit-cherry-pick) (define-key map "b" 'magit-branch) @@ -369,13 +362,26 @@ recommended value." (define-key map "G" 'magit-refresh-all) (define-key map "h" 'magit-dispatch) (define-key map "?" 'magit-dispatch) + (define-key map "H" 'magit-describe-section) + (define-key map "i" 'magit-gitignore) + (define-key map "I" 'magit-init) + (define-key map "j" 'magit-status-quick) + (define-key map "J" 'magit-display-repository-buffer) + (define-key map "k" 'magit-delete-thing) + (define-key map "K" 'magit-file-untrack) (define-key map "l" 'magit-log) (define-key map "L" 'magit-log-refresh) (define-key map "m" 'magit-merge) (define-key map "M" 'magit-remote) + ;; section-map "n" magit-section-forward + ;; reserved "N" forge-dispatch (define-key map "o" 'magit-submodule) (define-key map "O" 'magit-subtree) + ;; section-map "p" magit-section-backward + (define-key map "P" 'magit-push) (define-key map "q" 'magit-mode-bury-buffer) + (define-key map "Q" 'magit-git-command) + (define-key map ":" 'magit-git-command) (define-key map "r" 'magit-rebase) (define-key map "R" 'magit-file-rename) (define-key map "s" 'magit-stage-file) @@ -393,8 +399,9 @@ recommended value." (define-key map "y" 'magit-show-refs) (define-key map "Y" 'magit-cherry) (define-key map "z" 'magit-stash) - (define-key map "Z" 'magit-stash) - (define-key map ":" 'magit-git-command) + (define-key map "Z" 'magit-worktree) + (define-key map "%" 'magit-worktree) + (define-key map "$" 'magit-process-buffer) (define-key map "!" 'magit-run) (define-key map (kbd "C-c C-c") 'magit-dispatch) (define-key map (kbd "C-c C-e") 'magit-edit-thing) @@ -441,6 +448,11 @@ which visits the thing at point using `browse-url'." (interactive) (user-error "There is no thing at point that could be browsed")) +(defun magit-help () + "Visit the Magit manual." + (interactive) + (info "magit")) + (defvar bug-reference-map) (with-eval-after-load 'bug-reference (define-key bug-reference-map [remap magit-visit-thing] @@ -1082,8 +1094,8 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (or (nreverse (get-buffer-window-list buffer nil t)) (list (selected-window)))))) (deactivate-mark) + (setq magit-section-pre-command-section nil) (setq magit-section-highlight-overlays nil) - (setq magit-section-highlighted-section nil) (setq magit-section-highlighted-sections nil) (setq magit-section-unhighlight-sections nil) (magit-process-unset-mode-line-error-status) @@ -1109,7 +1121,8 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (defun magit-refresh-get-relative-position () (when-let ((section (magit-current-section))) (let ((start (oref section start))) - (list (count-lines start (point)) + (list (- (line-number-at-pos (point)) + (line-number-at-pos start)) (- (point) (line-beginning-position)) (and (magit-hunk-section-p section) (region-active-p) @@ -1193,7 +1206,7 @@ buffer which visits a file in the current repository. Optional argument (the prefix) non-nil means save all with no questions." (interactive "P") (when-let ((topdir (magit-rev-parse-safe "--show-toplevel"))) - (let ((remote (file-remote-p topdir)) + (let ((remote (file-remote-p default-directory)) (save-some-buffers-action-alist `((?Y (lambda (buffer) (with-current-buffer buffer @@ -1207,18 +1220,19 @@ argument (the prefix) non-nil means save all with no questions." ,@save-some-buffers-action-alist))) (save-some-buffers arg (lambda () - (and (not magit-inhibit-refresh-save) - buffer-file-name - ;; Avoid needlessly connecting to unrelated remotes. - (equal (file-remote-p buffer-file-name) - remote) - ;; For remote files this makes network requests and - ;; therefore has to come after the above to avoid - ;; unnecessarily waiting for unrelated hosts. - (file-exists-p (file-name-directory buffer-file-name)) - (string-prefix-p topdir (file-truename buffer-file-name)) - (equal (magit-rev-parse-safe "--show-toplevel") - topdir))))))) + (and buffer-file-name + ;; - Check whether refreshing is disabled. + (not magit-inhibit-refresh-save) + ;; - Check whether the visited file is either on the + ;; same remote as the repository, or both are on + ;; the local system. + (equal (file-remote-p buffer-file-name) remote) + ;; Delayed checks that are more expensive for remote + ;; repositories, due to the required network access. + ;; - Check whether the file is inside the repository. + (equal (magit-rev-parse-safe "--show-toplevel") topdir) + ;; - Check whether the file is actually writable. + (file-writable-p buffer-file-name))))))) ;;; Restore Window Configuration diff --git a/elpa/magit-20210802.1524/magit-notes.el b/elpa/magit-20220116.1908/magit-notes.el similarity index 99% rename from elpa/magit-20210802.1524/magit-notes.el rename to elpa/magit-20220116.1908/magit-notes.el index a541b032..30bbc5f9 100644 --- a/elpa/magit-20210802.1524/magit-notes.el +++ b/elpa/magit-20220116.1908/magit-notes.el @@ -1,6 +1,6 @@ ;;; magit-notes.el --- notes support -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-obsolete.el b/elpa/magit-20220116.1908/magit-obsolete.el similarity index 98% rename from elpa/magit-20210802.1524/magit-obsolete.el rename to elpa/magit-20220116.1908/magit-obsolete.el index f49f149b..e6605f34 100644 --- a/elpa/magit-20210802.1524/magit-obsolete.el +++ b/elpa/magit-20220116.1908/magit-obsolete.el @@ -1,6 +1,6 @@ ;;; magit-obsolete.el --- obsolete definitions -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-patch.el b/elpa/magit-20220116.1908/magit-patch.el similarity index 97% rename from elpa/magit-20210802.1524/magit-patch.el rename to elpa/magit-20220116.1908/magit-patch.el index c49e104b..e526bead 100644 --- a/elpa/magit-20210802.1524/magit-patch.el +++ b/elpa/magit-20220116.1908/magit-patch.el @@ -1,6 +1,6 @@ ;;; magit-patch.el --- creating and applying patches -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -57,10 +57,11 @@ the prefix argument." (transient-define-prefix magit-patch () "Create or apply patches." ["Actions" - ("c" "Create patches" magit-patch-create) - ("a" "Apply patch" magit-patch-apply) - ("s" "Save diff as patch" magit-patch-save) - ("r" "Request pull" magit-request-pull)]) + [("c" "Create patches" magit-patch-create) + ("w" "Apply patches" magit-am)] + [("a" "Apply plain patch" magit-patch-apply) + ("s" "Save diff as patch" magit-patch-save)] + [("r" "Request pull" magit-request-pull)]]) ;;;###autoload (autoload 'magit-patch-create "magit-patch" nil t) (transient-define-prefix magit-patch-create (range args files) diff --git a/elpa/magit-20210802.1524/magit-pkg.el b/elpa/magit-20220116.1908/magit-pkg.el similarity index 54% rename from elpa/magit-20210802.1524/magit-pkg.el rename to elpa/magit-20220116.1908/magit-pkg.el index 9c98e797..e7653c99 100644 --- a/elpa/magit-20210802.1524/magit-pkg.el +++ b/elpa/magit-20220116.1908/magit-pkg.el @@ -1,11 +1,11 @@ -(define-package "magit" "20210802.1524" "A Git porcelain inside Emacs." +(define-package "magit" "20220116.1908" "A Git porcelain inside Emacs." '((emacs "25.1") - (dash "20210330") - (git-commit "20210801") - (magit-section "20210801") - (transient "20210701") - (with-editor "20210524")) - :commit "7b46191dedba053f1c44d5f13d4283860e26cbd6" :authors + (dash "20210826") + (git-commit "20211004") + (magit-section "20211004") + (transient "20210920") + (with-editor "20211001")) + :commit "2a7812705f5cf4b864bb162576415863f4116285" :authors '(("Marius Vollmer" . "marius.vollmer@gmail.com") ("Jonas Bernoulli" . "jonas@bernoul.li")) :maintainer diff --git a/elpa/magit-20210802.1524/magit-process.el b/elpa/magit-20220116.1908/magit-process.el similarity index 99% rename from elpa/magit-20210802.1524/magit-process.el rename to elpa/magit-20220116.1908/magit-process.el index 7fef19fd..165bd162 100644 --- a/elpa/magit-20210802.1524/magit-process.el +++ b/elpa/magit-20220116.1908/magit-process.el @@ -1,6 +1,6 @@ ;;; magit-process.el --- process functionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -97,11 +97,14 @@ When this is nil, no sections are ever removed." :type '(choice (const :tag "Never remove old sections" nil) integer)) (defvar magit-process-extreme-logging nil - "Whether `magit-process-file' logs to *Messages* buffer. + "Whether `magit-process-file' logs to the *Messages* buffer. + Only intended for temporary use when you try to figure out how Magit uses Git behind the scene. Output that normally goes to the magit-process buffer continues to go there. Not all output -goes to either of these two buffers.") +goes to either of these two buffers. + +Also see `magit-git-debug'.") (defcustom magit-process-error-tooltip-max-lines 20 "The number of lines for `magit-process-error-lines' to return. @@ -772,7 +775,9 @@ Magit status buffer." (let ((map (cl-gensym))) `(let ((,map (make-sparse-keymap))) (set-keymap-parent ,map minibuffer-local-map) - (define-key ,map "\C-g" + ;; Note: Leaving (kbd ...) unevaluated leads to the + ;; magit-process:password-prompt test failing. + (define-key ,map ,(kbd "C-g") (lambda () (interactive) (ignore-errors (kill-process ,proc)) @@ -853,8 +858,8 @@ be translated on the fly by doing this once "Authenticate using `git-credential-manager-core'. To use this function add it to the appropriate hook - (add-hook 'magit-process-prompt-functions - 'magit-process-git-credential-manager-core)" + (add-hook \\='magit-process-prompt-functions + \\='magit-process-git-credential-manager-core)" (and (string-match "^option (enter for default): $" string) (progn (magit-process-buffer) @@ -868,7 +873,7 @@ To use this function add it to the appropriate hook Use `magit-process-password-prompt-regexps' to find a known prompt. If and only if one is found, then call functions in `magit-process-find-password-functions' until one of them returns -the password. If all function return nil, then read the password +the password. If all functions return nil, then read the password from the user." (when-let ((prompt (magit-process-match-prompt magit-process-password-prompt-regexps string))) diff --git a/elpa/magit-20210802.1524/magit-pull.el b/elpa/magit-20220116.1908/magit-pull.el similarity index 97% rename from elpa/magit-20210802.1524/magit-pull.el rename to elpa/magit-20220116.1908/magit-pull.el index 333cb3ed..db8783f3 100644 --- a/elpa/magit-20210802.1524/magit-pull.el +++ b/elpa/magit-20220116.1908/magit-pull.el @@ -1,6 +1,6 @@ ;;; magit-pull.el --- update local objects and refs -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -45,8 +45,10 @@ (transient-define-prefix magit-pull () "Pull from another repository." :man-page "git-pull" + :incompatible '(("--ff-only" "--rebase")) [:description (lambda () (if magit-pull-or-fetch "Pull arguments" "Arguments")) + ("-f" "Fast-forward only" "--ff-only") ("-r" "Rebase local commits" ("-r" "--rebase")) ("-A" "Autostash" "--autostash" :level 7)] [:description diff --git a/elpa/magit-20210802.1524/magit-push.el b/elpa/magit-20220116.1908/magit-push.el similarity index 98% rename from elpa/magit-20210802.1524/magit-push.el rename to elpa/magit-20220116.1908/magit-push.el index aae8d8ce..918053ba 100644 --- a/elpa/magit-20210802.1524/magit-push.el +++ b/elpa/magit-20220116.1908/magit-push.el @@ -1,6 +1,6 @@ ;;; magit-push.el --- update remote objects and refs -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -286,8 +286,8 @@ If you add this suffix to a transient prefix without explicitly specifying the description, then an attempt is made to predict what this command will do. For example: - (transient-insert-suffix 'magit-push \"p\" - '(\"i\" magit-push-implicitly))" + (transient-insert-suffix \\='magit-push \"p\" + \\='(\"i\" magit-push-implicitly))" :description 'magit-push-implicitly--desc (interactive (list (magit-push-arguments))) (run-hooks 'magit-credential-hook) diff --git a/elpa/magit-20210802.1524/magit-reflog.el b/elpa/magit-20220116.1908/magit-reflog.el similarity index 97% rename from elpa/magit-20210802.1524/magit-reflog.el rename to elpa/magit-20220116.1908/magit-reflog.el index 384cfa40..fb79d8ef 100644 --- a/elpa/magit-20210802.1524/magit-reflog.el +++ b/elpa/magit-20220116.1908/magit-reflog.el @@ -1,6 +1,6 @@ ;;; magit-reflog.el --- inspect ref history -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -136,8 +136,8 @@ If `HEAD' is detached, then show the reflog for that instead." (defvar magit-reflog-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-log-mode-map) - (define-key map "\C-c\C-n" 'undefined) - (define-key map "L" 'magit-margin-settings) + (define-key map (kbd "C-c C-n") 'undefined) + (define-key map (kbd "L") 'magit-margin-settings) map) "Keymap for `magit-reflog-mode'.") diff --git a/elpa/magit-20210802.1524/magit-refs.el b/elpa/magit-20220116.1908/magit-refs.el similarity index 98% rename from elpa/magit-20210802.1524/magit-refs.el rename to elpa/magit-20220116.1908/magit-refs.el index 13ceec79..0117e083 100644 --- a/elpa/magit-20210802.1524/magit-refs.el +++ b/elpa/magit-20220116.1908/magit-refs.el @@ -1,6 +1,6 @@ ;;; magit-refs.el --- listing references -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -63,7 +63,7 @@ branch Show counts for branches only. nil Never show counts. To change the value in an existing buffer use the command -`magit-refs-show-commit-count'" +`magit-refs-set-show-commit-count'." :package-version '(magit . "2.1.0") :group 'magit-refs :safe (lambda (val) (memq val '(all branch nil))) @@ -277,8 +277,8 @@ the outcome. (defvar magit-refs-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map magit-mode-map) - (define-key map "\C-y" 'magit-refs-set-show-commit-count) - (define-key map "L" 'magit-margin-settings) + (define-key map (kbd "C-y") 'magit-refs-set-show-commit-count) + (define-key map (kbd "L") 'magit-margin-settings) map) "Keymap for `magit-refs-mode'.") @@ -341,7 +341,9 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point. ["Actions" ("y" "Show refs, comparing them with HEAD" magit-show-refs-head) ("c" "Show refs, comparing them with current branch" magit-show-refs-current) - ("o" "Show refs, comparing them with other branch" magit-show-refs-other)] + ("o" "Show refs, comparing them with other branch" magit-show-refs-other) + ("r" "Show refs, changing commit count display" + magit-refs-set-show-commit-count)] (interactive (list (or (derived-mode-p 'magit-refs-mode) current-prefix-arg))) (if transient @@ -651,8 +653,7 @@ line is inserted at all." (if branch (magit-refs--propertize-branch branch ref (and headp 'magit-branch-current)) - (magit--propertize-face "(detached)" - 'font-lock-warning-face))) + (magit--propertize-face "(detached)" 'magit-branch-warning))) (u:ahead (and u:track (string-match "ahead \\([0-9]+\\)" u:track) (magit--propertize-face diff --git a/elpa/magit-20210802.1524/magit-remote.el b/elpa/magit-20220116.1908/magit-remote.el similarity index 93% rename from elpa/magit-20210802.1524/magit-remote.el rename to elpa/magit-20220116.1908/magit-remote.el index a2dd42cb..4be41fcf 100644 --- a/elpa/magit-20210802.1524/magit-remote.el +++ b/elpa/magit-20220116.1908/magit-remote.el @@ -1,6 +1,6 @@ ;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -87,7 +87,8 @@ has to be used to view and change remote related variables." ("k" "Remove" magit-remote-remove)] [("C" "Configure..." magit-remote-configure) ("p" "Prune stale branches" magit-remote-prune) - ("P" "Prune stale refspecs" magit-remote-prune-refspecs)]] + ("P" "Prune stale refspecs" magit-remote-prune-refspecs) + (7 "z" "Unshallow remote" magit-remote-unshallow)]] (interactive (list (magit-get-current-remote))) (transient-setup 'magit-remote nil nil :scope remote)) @@ -257,6 +258,24 @@ 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 +(defun magit-remote-unshallow (remote) + "Convert a shallow remote into a full one. +If only a single refspec is set and it does not contain a +wildcard, then also offer to replace it with the standard +refspec." + (interactive (list (or (magit-get-current-remote) + (magit-read-remote "Delete remote")))) + (let ((refspecs (magit-get-all "remote" remote "fetch")) + (standard (format "+refs/heads/*:refs/remotes/%s/*" remote))) + (when (and (= (length refspecs) 1) + (not (string-match-p "\\*" (car refspecs))) + (yes-or-no-p (format "Also replace refspec %s with %s? " + (car refspecs) + standard))) + (magit-set standard "remote" remote "fetch")) + (magit-git-fetch "--unshallow" remote))) + ;;; Configure ;;;###autoload (autoload 'magit-remote-configure "magit-remote" nil t) diff --git a/elpa/magit-20210802.1524/magit-repos.el b/elpa/magit-20220116.1908/magit-repos.el similarity index 94% rename from elpa/magit-20210802.1524/magit-repos.el rename to elpa/magit-20220116.1908/magit-repos.el index 271b80a7..123c2edb 100644 --- a/elpa/magit-20210802.1524/magit-repos.el +++ b/elpa/magit-20220116.1908/magit-repos.el @@ -1,6 +1,6 @@ ;;; magit-repos.el --- listing repositories -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -33,7 +33,7 @@ (require 'magit-core) -(declare-function magit-status-setup-buffer "magit-status" (directory)) +(declare-function magit-status-setup-buffer "magit-status" (&optional directory)) (defvar x-stretch-cursor) @@ -213,7 +213,7 @@ repositories are displayed." (magit-list-repos))))) (message "Listing repositories...") (tabulated-list-init-header) - (tabulated-list-print) + (tabulated-list-print t) (message "Listing repositories...done")) ;;;; Columns @@ -234,15 +234,25 @@ Usually this is just its basename." (magit-git-string "show" "--no-patch" "--format=%cd-g%h" "--date=format:%Y%m%d.%H%M")))) (save-match-data - (when (string-match "-dirty\\'" v) - (magit--put-face (1+ (match-beginning 0)) (length v) 'error v)) + (when (string-match + "\\(?:-\\([0-9]*\\)-g[a-z0-9]*\\)?\\(?:-\\(dirty\\)\\)?\\'" v) + (magit--put-face (match-beginning 0) (match-end 0) 'shadow v) + (when (match-end 1) + (magit--put-face (match-beginning 1) (match-end 1) 'bold v)) + (when (match-end 2) + (magit--put-face (match-beginning 2) (match-end 2) 'error v))) (if (and v (string-match "\\`[0-9]" v)) (concat " " v) + (when (and v (string-match "\\`[^0-9]+" v)) + (magit--put-face 0 (match-end 0) 'shadow v)) v)))) (defun magit-repolist-column-branch (_) "Insert the current branch." - (magit-get-current-branch)) + (let ((branch (magit-get-current-branch))) + (if (member branch magit-main-branch-names) + (magit--propertize-face branch 'shadow) + branch))) (defun magit-repolist-column-upstream (_) "Insert the upstream branch of the current branch." diff --git a/elpa/magit-20210802.1524/magit-reset.el b/elpa/magit-20220116.1908/magit-reset.el similarity index 98% rename from elpa/magit-20210802.1524/magit-reset.el rename to elpa/magit-20220116.1908/magit-reset.el index 830e27e6..6203a69e 100644 --- a/elpa/magit-20210802.1524/magit-reset.el +++ b/elpa/magit-20220116.1908/magit-reset.el @@ -1,6 +1,6 @@ ;;; magit-reset.el --- reset fuctionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-sequence.el b/elpa/magit-20220116.1908/magit-sequence.el similarity index 96% rename from elpa/magit-20210802.1524/magit-sequence.el rename to elpa/magit-20220116.1908/magit-sequence.el index 79407594..ab6c4b17 100644 --- a/elpa/magit-20210802.1524/magit-sequence.el +++ b/elpa/magit-20220116.1908/magit-sequence.el @@ -1,6 +1,6 @@ ;;; magit-sequence.el --- history manipulation in Magit -*- lexical-binding: t -*- -;; Copyright (C) 2011-2021 The Magit Project Contributors +;; Copyright (C) 2011-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -172,14 +172,15 @@ This discards all changes made since the sequence started." (magit-read-other-branch-or-commit prompt)) (transient-args 'magit-cherry-pick))) -(defun magit--cherry-move-read-args (verb away fn) +(defun magit--cherry-move-read-args (verb away fn &optional allow-detached) (declare (indent defun)) (let ((commits (or (nreverse (magit-region-values 'commit)) (list (funcall (if away 'magit-read-branch-or-commit 'magit-read-other-branch-or-commit) (format "%s cherry" (capitalize verb)))))) - (current (magit-get-current-branch))) + (current (or (magit-get-current-branch) + (and allow-detached (magit-rev-parse "HEAD"))))) (unless current (user-error "Cannot %s cherries while HEAD is detached" verb)) (let ((reachable (magit-rev-ancestor-p (car commits) current)) @@ -230,7 +231,10 @@ process manually." (0 nil) (1 (car branches)) (_ (magit-completing-read - (format "Remove %s cherries from branch" (length commits)) + (let ((len (length commits))) + (if (= len 1) + "Remove 1 cherry from branch" + (format "Remove %s cherries from branch" len))) branches nil t)))))))) (magit--cherry-move commits branch (magit-get-current-branch) args nil t)) @@ -239,13 +243,20 @@ process manually." "Move COMMITS from the current branch onto another existing BRANCH. Remove COMMITS from the current branch and stay on that branch. If a conflict occurs, then you have to fix that and finish the -process manually." +process manually. `HEAD' is allowed to be detached initially." (interactive (magit--cherry-move-read-args "donate" t (lambda (commits) - (list (magit-read-other-branch (format "Move %s cherries to branch" - (length commits))))))) - (magit--cherry-move commits (magit-get-current-branch) branch args)) + (list (magit-read-other-branch + (let ((len (length commits))) + (if (= len 1) + "Move 1 cherry to branch" + (format "Move %s cherries to branch" len)))))) + 'allow-detached)) + (magit--cherry-move commits + (or (magit-get-current-branch) + (magit-rev-parse "HEAD")) + branch args)) ;;;###autoload (defun magit-cherry-spinout (commits branch start-point &optional args) @@ -415,7 +426,7 @@ without prompting." ("-k" "Inhibit removal of email cruft" ("-k" "--keep")) ("-b" "Limit removal of email cruft" "--keep-non-patch") ("-d" "Use author date as committer date" "--committer-date-is-author-date") - ("-D" "Use committer date as author date" "--ignore-date") + ("-t" "Use current time as author date" "--ignore-date") ("-s" "Add Signed-off-by lines" ("-s" "--signoff")) (5 magit:--gpg-sign)] ["Apply" @@ -436,6 +447,7 @@ without prompting." :description "Remove leading slashes from paths" :class 'transient-option :argument "-p" + :allow-empty t :reader 'transient-read-number-N+) ;;;###autoload @@ -498,21 +510,26 @@ This discards all changes made since the sequence started." (transient-define-prefix magit-rebase () "Transplant commits and/or modify existing commits." :man-page "git-rebase" + :value '("--autostash") ["Arguments" :if-not magit-rebase-in-progress-p ("-k" "Keep empty commits" "--keep-empty") - ("-p" "Preserve merges" ("-p" "--preserve-merges")) + ("-p" "Preserve merges" ("-p" "--preserve-merges") + :if (lambda () (magit-git-version< "2.33.0"))) + ("-r" "Rebase merges" ("-r" "--rebase-merges=") + magit-rebase-merges-select-mode + :if (lambda () (magit-git-version>= "2.18.0"))) (7 magit-merge:--strategy) (7 magit-merge:--strategy-option) (7 "=X" magit-diff:--diff-algorithm :argument "-Xdiff-algorithm=") - ("-d" "Lie about committer date" "--committer-date-is-author-date") + ("-d" "Use author date as committer date" "--committer-date-is-author-date") + ("-t" "Use current time as author date" "--ignore-date") ("-a" "Autosquash" "--autosquash") ("-A" "Autostash" "--autostash") ("-i" "Interactive" ("-i" "--interactive")) ("-h" "Disable hooks" "--no-verify") (7 magit-rebase:--exec) - (5 magit:--gpg-sign) - (5 "-r" "Rebase merges" "--rebase-merges=" magit-rebase-merges-select-mode)] + (5 magit:--gpg-sign)] [:if-not magit-rebase-in-progress-p :description (lambda () (format (propertize "Rebase %s onto" 'face 'transient-heading) diff --git a/elpa/magit-20210802.1524/magit-stash.el b/elpa/magit-20220116.1908/magit-stash.el similarity index 98% rename from elpa/magit-20210802.1524/magit-stash.el rename to elpa/magit-20220116.1908/magit-stash.el index 3ff6858f..2b80fc87 100644 --- a/elpa/magit-20210802.1524/magit-stash.el +++ b/elpa/magit-20220116.1908/magit-stash.el @@ -1,6 +1,6 @@ ;;; magit-stash.el --- stash support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -32,9 +32,6 @@ (require 'magit) (require 'magit-reflog) -;; For `magit-stash-drop'. -(defvar helm-comp-read-use-marked) - ;;; Options (defgroup magit-stash nil @@ -125,7 +122,14 @@ AUTHOR-WIDTH has to be an integer. When the name of the author Untracked files are included according to infix arguments. One prefix argument is equivalent to `--include-untracked' while two prefix arguments are equivalent to `--all'." - (interactive (magit-stash-read-args)) + (interactive + (progn (when (and (magit-merge-in-progress-p) + (not (magit-y-or-n-p "\ +Stashing and resetting during a merge conflict. \ +Applying the resulting stash won't restore the merge state. \ +Proceed anyway? "))) + (user-error "Abort")) + (magit-stash-read-args))) (magit-stash-save message t t include-untracked t)) ;;;###autoload @@ -216,6 +220,7 @@ are staged changes, apply without preserving the stash index." (magit-refresh) (magit-run-git "stash" "apply" stash))) +;;;###autoload (defun magit-stash-pop (stash) "Apply a stash to the working tree and remove it from stash list. Try to preserve the stash index. If that fails because there @@ -233,8 +238,7 @@ When the region is active offer to drop all contained stashes." (interactive (list (--if-let (magit-region-values 'stash) (magit-confirm 'drop-stashes nil "Drop %i stashes" nil it) - (let ((helm-comp-read-use-marked t)) - (magit-read-stash "Drop stash"))))) + (magit-read-stash "Drop stash")))) (dolist (stash (if (listp stash) (nreverse (prog1 stash (setq stash (car stash)))) (list stash))) diff --git a/elpa/magit-20210802.1524/magit-status.el b/elpa/magit-20220116.1908/magit-status.el similarity index 94% rename from elpa/magit-20210802.1524/magit-status.el rename to elpa/magit-20220116.1908/magit-status.el index a7cad428..eed0dcd2 100644 --- a/elpa/magit-20210802.1524/magit-status.el +++ b/elpa/magit-20220116.1908/magit-status.el @@ -1,6 +1,6 @@ ;;; magit-status.el --- the grand overview -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -309,6 +309,30 @@ also contains other useful hints.") (put 'magit-status-here 'interactive-only 'magit-status-setup-buffer) +;;;###autoload +(defun magit-status-quick () + "Show the status of the current Git repository, maybe without refreshing. + +If the status buffer of the current Git repository exists but +isn't being displayed in the selected frame, then display it +without refreshing it. + +If the status buffer is being displayed in the selected frame, +then also refresh it. + +Prefix arguments have the same meaning as for `magit-status', +and additionally cause the buffer to be refresh. + +To use this function instead of `magit-status', add this to your +init file: (global-set-key (kbd \"C-x g\") 'magit-status-quick)." + (interactive) + (if-let ((buffer + (and (not current-prefix-arg) + (not (magit-get-mode-buffer 'magit-status-mode nil 'selected)) + (magit-get-mode-buffer 'magit-status-mode)))) + (magit-display-buffer buffer) + (call-interactively #'magit-status))) + (defvar magit--remotes-using-recent-git nil) (defun magit--tramp-asserts (directory) @@ -316,7 +340,7 @@ also contains other useful hints.") (unless (member remote magit--remotes-using-recent-git) (if-let ((version (let ((default-directory directory)) (magit-git-version)))) - (if (version<= magit--minimal-git version) + (if (magit--version>= version magit--minimal-git) (push remote magit--remotes-using-recent-git) (display-warning 'magit (format "\ Magit requires Git >= %s, but on %s the version is %s. @@ -375,7 +399,8 @@ the info node `(tramp)Remote programs'." remote) :error))))) ("a " "Assumed unstaged" magit-jump-to-assume-unchanged :if (lambda () (memq 'magit-insert-assume-unchanged-files magit-status-sections-hook))) ("w " "Skip worktree" magit-jump-to-skip-worktree - :if (lambda () (memq 'magit-insert-skip-worktree-files magit-status-sections-hook)))]]) + :if (lambda () (memq 'magit-insert-skip-worktree-files magit-status-sections-hook)))] + [("i" "Using Imenu" imenu)]]) (define-derived-mode magit-status-mode magit-mode "Magit" "Mode for looking at Git status. @@ -526,8 +551,7 @@ the status buffer causes this section to disappear again." (magit-insert-section (error 'git) (insert (propertize (format "%-10s" "GitError! ") 'font-lock-face 'magit-section-heading)) - (insert (propertize magit-this-error - 'font-lock-face 'font-lock-warning-face)) + (insert (propertize magit-this-error 'font-lock-face 'error)) (when-let ((key (car (where-is-internal 'magit-process-buffer)))) (insert (format " [Type `%s' for details]" (key-description key)))) (insert ?\n)) @@ -612,17 +636,18 @@ arguments are for internal use only." ((magit--valid-upstream-p remote merge) (if (equal remote ".") (concat - (propertize merge 'font-lock-face 'magit-branch-local) - (propertize " does not exist" - 'font-lock-face 'font-lock-warning-face)) - (concat + (propertize merge 'font-lock-face 'magit-branch-local) " " + (propertize "does not exist" + 'font-lock-face 'magit-branch-warning)) + (format + "%s %s %s" (propertize merge 'font-lock-face 'magit-branch-remote) - (propertize " does not exist on " - 'font-lock-face 'font-lock-warning-face) + (propertize "does not exist on" + 'font-lock-face 'magit-branch-warning) (propertize remote 'font-lock-face 'magit-branch-remote)))) (t (propertize "invalid upstream configuration" - 'font-lock-face 'font-lock-warning-face))))) + 'font-lock-face 'magit-branch-warning))))) (insert ?\n)))))) (defun magit-insert-push-branch-header () @@ -644,12 +669,12 @@ arguments are for internal use only." "(no commit message)")))) (let ((remote (magit-get-push-remote branch))) (if (magit-remote-p remote) - (concat target - (propertize " does not exist" - 'font-lock-face 'font-lock-warning-face)) - (concat remote - (propertize " remote does not exist" - 'font-lock-face 'font-lock-warning-face)))))) + (concat target " " + (propertize "does not exist" + 'font-lock-face 'magit-branch-warning)) + (concat remote " " + (propertize "remote does not exist" + 'font-lock-face 'magit-branch-warning)))))) (insert ?\n)))) (defun magit-insert-tags-header () diff --git a/elpa/magit-20210802.1524/magit-submodule.el b/elpa/magit-20220116.1908/magit-submodule.el similarity index 97% rename from elpa/magit-20210802.1524/magit-submodule.el rename to elpa/magit-20220116.1908/magit-submodule.el index 9458f645..a6d98231 100644 --- a/elpa/magit-20210802.1524/magit-submodule.el +++ b/elpa/magit-20220116.1908/magit-submodule.el @@ -1,6 +1,6 @@ ;;; magit-submodule.el --- submodule support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2011-2021 The Magit Project Contributors +;; Copyright (C) 2011-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -225,7 +225,7 @@ it is nil, then PATH also becomes the name." (magit-process-sentinel process event) (process-put process 'inhibit-refresh t) (magit-process-sentinel process event) - (unless (version< (magit-git-version) "2.12.0") + (when (magit-git-version>= "2.12.0") (magit-call-git "submodule" "absorbgitdirs" path)) (magit-refresh))))))) @@ -360,7 +360,7 @@ to recover from making a mistake here, but don't count on it." (list (magit-read-module-path "Remove module"))) (magit-submodule-arguments "--force") current-prefix-arg)) - (when (version< (magit-git-version) "2.12.0") + (when (magit-git-version< "2.12.0") (error "This command requires Git v2.12.0")) (when magit-submodule-remove-trash-gitdirs (setq trash-gitdirs t)) @@ -383,14 +383,14 @@ to recover from making a mistake here, but don't count on it." (expand-file-name module)))) (magit-git "stash" "push" "-m" "backup before removal of this module"))) - (setq modules (cl-set-difference modules modified))) + (setq modules (cl-set-difference modules modified :test #'equal))) (if (cdr modified) (message "Omitting %s modules with uncommitted changes: %s" (length modified) (mapconcat #'identity modified ", ")) (message "Omitting module %s, it has uncommitted changes" (car modified))) - (setq modules (cl-set-difference modules modified)))) + (setq modules (cl-set-difference modules modified :test #'equal)))) (when modules (let ((alist (and trash-gitdirs @@ -621,13 +621,16 @@ These sections can be expanded to show the respective commits." (setq imenu-extract-index-name-function #'magit-imenu--submodule-extract-index-name-function)) -(defun magit-submodule-list-setup (columns) +(defvar-local magit-submodule-list-predicate nil) + +(defun magit-submodule-list-setup (columns &optional predicate) (magit-display-buffer (or (magit-get-mode-buffer 'magit-submodule-list-mode) (magit-with-toplevel (magit-generate-new-buffer 'magit-submodule-list-mode)))) (magit-submodule-list-mode) (setq-local magit-repolist-columns columns) + (setq-local magit-submodule-list-predicate predicate) (magit-submodule-list-refresh)) (defun magit-submodule-list-refresh () @@ -647,6 +650,8 @@ These sections can be expanded to show the respective commits." (let ((default-directory (expand-file-name (file-name-as-directory module)))) (and (file-exists-p ".git") + (or (not magit-submodule-list-predicate) + (funcall magit-submodule-list-predicate module)) (list module (vconcat (mapcar (pcase-lambda (`(,title ,width ,fn ,props)) @@ -659,7 +664,7 @@ These sections can be expanded to show the respective commits." (magit-list-module-paths))) (message "Listing submodules...") (tabulated-list-init-header) - (tabulated-list-print) + (tabulated-list-print t) (message "Listing submodules...done")) (defun magit-modulelist-column-path (spec) diff --git a/elpa/magit-20210802.1524/magit-subtree.el b/elpa/magit-20220116.1908/magit-subtree.el similarity index 99% rename from elpa/magit-20210802.1524/magit-subtree.el rename to elpa/magit-20220116.1908/magit-subtree.el index 34e9451e..3d0514ed 100644 --- a/elpa/magit-20210802.1524/magit-subtree.el +++ b/elpa/magit-20220116.1908/magit-subtree.el @@ -1,6 +1,6 @@ ;;; magit-subtree.el --- subtree support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2011-2021 The Magit Project Contributors +;; Copyright (C) 2011-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-tag.el b/elpa/magit-20220116.1908/magit-tag.el similarity index 99% rename from elpa/magit-20210802.1524/magit-tag.el rename to elpa/magit-20220116.1908/magit-tag.el index d19abbe7..c10a46c8 100644 --- a/elpa/magit-20210802.1524/magit-tag.el +++ b/elpa/magit-20220116.1908/magit-tag.el @@ -1,6 +1,6 @@ ;;; magit-tag.el --- tag functionality -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-transient.el b/elpa/magit-20220116.1908/magit-transient.el similarity index 99% rename from elpa/magit-20210802.1524/magit-transient.el rename to elpa/magit-20220116.1908/magit-transient.el index d03694b0..8d6d582f 100644 --- a/elpa/magit-20210802.1524/magit-transient.el +++ b/elpa/magit-20220116.1908/magit-transient.el @@ -1,6 +1,6 @@ ;;; magit-transient.el --- support for transients -*- lexical-binding: t -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. diff --git a/elpa/magit-20210802.1524/magit-utils.el b/elpa/magit-20220116.1908/magit-utils.el similarity index 96% rename from elpa/magit-20210802.1524/magit-utils.el rename to elpa/magit-20220116.1908/magit-utils.el index bfd2827d..473b7041 100644 --- a/elpa/magit-20210802.1524/magit-utils.el +++ b/elpa/magit-20220116.1908/magit-utils.el @@ -1,6 +1,6 @@ ;;; magit-utils.el --- various utilities -*- lexical-binding: t; coding: utf-8 -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -49,10 +49,6 @@ (require 'crm) (eval-when-compile (require 'ido)) -(declare-function ido-completing-read+ "ido-completing-read+" - (prompt collection &optional predicate - require-match initial-input - hist def inherit-input-method)) (declare-function Info-get-token "info" (pos start all &optional errorstring)) (eval-when-compile (require 'vc-git)) @@ -663,7 +659,8 @@ Unfortunately `ido-completing-read' is not suitable as a drop-in replacement for `completing-read', instead we use `ido-completing-read+' from the third-party package by the same name." - (if (require 'ido-completing-read+ nil t) + (if (and (require 'ido-completing-read+ nil t) + (fboundp 'ido-completing-read+)) (ido-completing-read+ prompt choices predicate require-match initial-input hist (or def (and require-match (car choices)))) @@ -1013,6 +1010,16 @@ one trailing newline is added." (and (eq trim ?\n) "\n")) str))) +(defun magit--version> (v1 v2) + "Return t if version V1 is higher (younger) than V2. +This function should be named `version>' and be part of Emacs." + (version-list-< (version-to-list v2) (version-to-list v1))) + +(defun magit--version>= (v1 v2) + "Return t if version V1 is higher (younger) than or equal to V2. +This function should be named `version>=' and be part of Emacs." + (version-list-<= (version-to-list v2) (version-to-list v1))) + ;;; Kludges for Emacs Bugs (defun magit-file-accessible-directory-p (filename) @@ -1022,7 +1029,7 @@ and https://github.com/magit/magit/issues/2295." (and (file-directory-p filename) (file-accessible-directory-p filename))) -(when (version<= "25.1" emacs-version) +(when (magit--version>= emacs-version "25.1") (with-eval-after-load 'vc-git (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." @@ -1201,6 +1208,31 @@ See ." (setq filename target)))) (file-chase-links filename)) +;;; Kludges for older Emacs versions + +(if (fboundp 'with-connection-local-variables) + (defalias 'magit--with-connection-local-variables + 'with-connection-local-variables) + (defmacro magit--with-connection-local-variables (&rest body) + "Abridged `with-connection-local-variables' for pre Emacs 27 compatibility. +Bind shell file name and switch for remote execution. +`with-connection-local-variables' isn't available until Emacs 27. +This kludge provides the minimal functionality required by +Magit." + `(if (file-remote-p default-directory) + (let* ((vec (tramp-dissect-file-name default-directory)) + (shell-file-name (tramp-get-method-parameter + vec + 'tramp-remote-shell)) + (shell-command-switch (mapconcat + #'identity + (tramp-get-method-parameter + vec + 'tramp-remote-shell-args) + " "))) + (progn ,@body)) + ,@body))) + ;;; Miscellaneous (defun magit-message (format-string &rest args) diff --git a/elpa/magit-20210802.1524/magit-wip.el b/elpa/magit-20220116.1908/magit-wip.el similarity index 89% rename from elpa/magit-20210802.1524/magit-wip.el rename to elpa/magit-20220116.1908/magit-wip.el index 2820cab8..7f42b573 100644 --- a/elpa/magit-20210802.1524/magit-wip.el +++ b/elpa/magit-20220116.1908/magit-wip.el @@ -1,6 +1,6 @@ ;;; magit-wip.el --- commit snapshots to work-in-progress refs -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -287,30 +287,34 @@ commit message." (magit-wip-update-wipref ref wipref tree parent files msg "index"))) (defun magit-wip-commit-worktree (ref files msg) - (let* ((wipref (magit--wip-wtree-ref ref)) - (parent (magit-wip-get-parent ref wipref)) - (tree (magit-with-temp-index parent (list "--reset" "-i") - (if files - ;; Note: `update-index' is used instead of `add' - ;; because `add' will fail if a file is already - ;; deleted in the temporary index. - (magit-call-git - "update-index" "--add" "--remove" - (and (pcase (magit-repository-local-get - 'update-index-has-ignore-sw-p 'unset) - (`unset - (let ((val (version<= "2.25.0" - (magit-git-version)))) - (magit-repository-local-set - 'update-index-has-ignore-sw-p val) - val)) - (val val)) - "--ignore-skip-worktree-entries") - "--" files) - (magit-with-toplevel - (magit-call-git "add" "-u" "."))) - (magit-git-string "write-tree")))) - (magit-wip-update-wipref ref wipref tree parent files msg "worktree"))) + (when (or (not files) + ;; `update-index' will either ignore (before Git v2.32.0) + ;; or fail when passed directories (relevant for the + ;; untracked files code paths). + (setq files (seq-remove #'file-directory-p files))) + (let* ((wipref (magit--wip-wtree-ref ref)) + (parent (magit-wip-get-parent ref wipref)) + (tree (magit-with-temp-index parent (list "--reset" "-i") + (if files + ;; Note: `update-index' is used instead of `add' + ;; because `add' will fail if a file is already + ;; deleted in the temporary index. + (magit-call-git + "update-index" "--add" "--remove" + (and (pcase (magit-repository-local-get + 'update-index-has-ignore-sw-p 'unset) + (`unset + (let ((val (magit-git-version>= "2.25.0"))) + (magit-repository-local-set + 'update-index-has-ignore-sw-p val) + val)) + (val val)) + "--ignore-skip-worktree-entries") + "--" files) + (magit-with-toplevel + (magit-call-git "add" "-u" "."))) + (magit-git-string "write-tree")))) + (magit-wip-update-wipref ref wipref tree parent files msg "worktree")))) (defun magit-wip-update-wipref (ref wipref tree parent files msg start-msg) (cond @@ -442,7 +446,10 @@ many \"branches\" of each wip ref are shown." (when-let ((reflog (magit-git-lines "reflog" wipref))) (let (tips) (while (and reflog (> count 1)) - (setq reflog (cl-member "^[^ ]+ [^:]+: restart autosaving" + ;; "start autosaving ..." is the current message, but it used + ;; to be "restart autosaving ...", and those messages may + ;; still be around (e.g., if gc.reflogExpire is to "never"). + (setq reflog (cl-member "^[^ ]+ [^:]+: \\(?:re\\)?start autosaving" reflog :test #'string-match-p)) (when (and (cadr reflog) (string-match "^[^ ]+ \\([^:]+\\)" (cadr reflog))) diff --git a/elpa/magit-20210802.1524/magit-worktree.el b/elpa/magit-20220116.1908/magit-worktree.el similarity index 95% rename from elpa/magit-20210802.1524/magit-worktree.el rename to elpa/magit-20220116.1908/magit-worktree.el index 47f71b6f..3e176e35 100644 --- a/elpa/magit-20210802.1524/magit-worktree.el +++ b/elpa/magit-20220116.1908/magit-worktree.el @@ -1,6 +1,6 @@ ;;; magit-worktree.el --- worktree support -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -64,7 +64,7 @@ Used by `magit-worktree-checkout' and `magit-worktree-branch'." (list (funcall magit-worktree-read-directory-name-function (format "Checkout %s in new worktree: " branch)) branch))) - (magit-run-git "worktree" "add" (expand-file-name path) branch) + (magit-run-git "worktree" "add" (magit--expand-worktree path) branch) (magit-diff-visit-directory path)) ;;;###autoload @@ -76,7 +76,7 @@ Used by `magit-worktree-checkout' and `magit-worktree-branch'." ,@(magit-branch-read-args "Create and checkout branch") ,current-prefix-arg)) (magit-run-git "worktree" "add" (if force "-B" "-b") - branch (expand-file-name path) start-point) + branch (magit--expand-worktree path) start-point) (magit-diff-visit-directory path)) ;;;###autoload @@ -93,7 +93,7 @@ Used by `magit-worktree-checkout' and `magit-worktree-branch'." (user-error "You may not move the main working tree") (let ((preexisting-directory (file-directory-p path))) (when (and (zerop (magit-call-git "worktree" "move" worktree - (expand-file-name path))) + (magit--expand-worktree path))) (not (file-exists-p default-directory)) (derived-mode-p 'magit-status-mode)) (kill-buffer) @@ -143,6 +143,9 @@ then show it in Dired instead." :test #'equal :key #'car))))) (magit-diff-visit-directory worktree)) +(defun magit--expand-worktree (path) + (magit-convert-filename-for-git (expand-file-name path))) + ;;; Sections (defvar magit-worktree-section-map diff --git a/elpa/magit-20210802.1524/magit.el b/elpa/magit-20220116.1908/magit.el similarity index 88% rename from elpa/magit-20210802.1524/magit.el rename to elpa/magit-20220116.1908/magit.el index c58e490f..83cba084 100644 --- a/elpa/magit-20210802.1524/magit.el +++ b/elpa/magit-20220116.1908/magit.el @@ -1,6 +1,6 @@ ;;; magit.el --- A Git porcelain inside Emacs -*- lexical-binding: t; coding: utf-8 -*- -;; Copyright (C) 2008-2021 The Magit Project Contributors +;; Copyright (C) 2008-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -19,6 +19,8 @@ ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit +;; Package-Requires: ((emacs "25.1") (dash "2.19.1") (git-commit "3.3.0") (magit-section "3.3.0") (transient "0.3.6") (with-editor "3.0.5")) +;; Package-Version: 3.3.0 ;; SPDX-License-Identifier: GPL-3.0-or-later ;; Magit is free software; you can redistribute it and/or modify it @@ -106,8 +108,8 @@ own faces for the `header-line', or for parts of the :group 'magit-faces) (defface magit-branch-remote-head - '((((class color) (background light)) :inherit magit-branch-remote :box t) - (((class color) (background dark)) :inherit magit-branch-remote :box t)) + '((((supports (:box t))) :inherit magit-branch-remote :box t) + (t :inherit magit-branch-remote :inverse-video t)) "Face for current branch." :group 'magit-faces) @@ -118,8 +120,8 @@ own faces for the `header-line', or for parts of the :group 'magit-faces) (defface magit-branch-current - '((((class color) (background light)) :inherit magit-branch-local :box t) - (((class color) (background dark)) :inherit magit-branch-local :box t)) + '((((supports (:box t))) :inherit magit-branch-local :box t) + (t :inherit magit-branch-local :inverse-video t)) "Face for current branch." :group 'magit-faces) @@ -131,6 +133,11 @@ This face is only used in logs and it gets combined and/or `magit-branch-remote-head'." :group 'magit-faces) +(defface magit-branch-warning + '((t :inherit warning)) + "Face for warning about (missing) branch." + :group 'magit-faces) + (defface magit-head '((((class color) (background light)) :inherit magit-branch-local) (((class color) (background dark)) :inherit magit-branch-local)) @@ -294,7 +301,10 @@ Also see info node `(magit)Commands for Buffers Visiting Files'." "Invoke a Magit command from a list of available commands." :info-manual "(magit)Top" ["Transient and dwim commands" + ;; → bound in magit-mode-map or magit-section-mode-map + ;; ↓ bound below [("A" "Apply" magit-cherry-pick) + ;; a ↓ ("b" "Branch" magit-branch) ("B" "Bisect" magit-bisect) ("c" "Commit" magit-commit) @@ -302,29 +312,51 @@ Also see info node `(magit)Commands for Buffers Visiting Files'." ("d" "Diff" magit-diff) ("D" "Diff (change)" magit-diff-refresh) ("e" "Ediff (dwim)" magit-ediff-dwim) - ("E" "Ediff" magit-ediff)] - [("f" "Fetch" magit-fetch) + ("E" "Ediff" magit-ediff) + ("f" "Fetch" magit-fetch) ("F" "Pull" magit-pull) + ;; g ↓ + ;; G → magit-refresh-all + ("h" "Help" magit-help) + ("H" "Section info" magit-describe-section :if-derived magit-mode)] + [("i" "Ignore" magit-gitignore) ("I" "Init" magit-init) + ("j" "Jump to section"magit-status-jump :if-mode magit-status-mode) + ("j" "Display status" magit-status-quick :if-not-mode magit-status-mode) + ("J" "Display buffer" magit-display-repository-buffer) + ;; k ↓ + ;; K → magit-file-untrack ("l" "Log" magit-log) ("L" "Log (change)" magit-log-refresh) ("m" "Merge" magit-merge) ("M" "Remote" magit-remote) + ;; n → magit-section-forward + ;; N reserved → forge-dispatch ("o" "Submodule" magit-submodule) - ("O" "Subtree" magit-subtree)] - [("P" "Push" magit-push) - ("r" "Rebase" magit-rebase) + ("O" "Subtree" magit-subtree) + ;; p → magit-section-backward + ("P" "Push" magit-push) + ;; q → magit-mode-bury-buffer + ("Q" "Command" magit-git-command)] + [("r" "Rebase" magit-rebase) + ;; R → magit-file-rename + ;; s ↓ + ;; S ↓ ("t" "Tag" magit-tag) ("T" "Note" magit-notes) + ;; u ↓ + ;; U ↓ + ;; v ↓ ("V" "Revert" magit-revert) ("w" "Apply patches" magit-am) ("W" "Format patches" magit-patch) - ("X" "Reset" magit-reset)] - [("y" "Show Refs" magit-show-refs) + ;; x → magit-reset-quickly + ("X" "Reset" magit-reset) + ("y" "Show Refs" magit-show-refs) ("Y" "Cherries" magit-cherry) ("z" "Stash" magit-stash) - ("!" "Run" magit-run) - ("%" "Worktree" magit-worktree)]] + ("Z" "Worktree" magit-worktree) + ("!" "Run" magit-run)]] ["Applying changes" :if-derived magit-mode [("a" "Apply" magit-apply) @@ -339,7 +371,7 @@ Also see info node `(magit)Commands for Buffers Visiting Files'." ("g" " refresh current buffer" magit-refresh) ("" " toggle section at point" magit-section-toggle) ("" "visit thing at point" magit-visit-thing) - ("C-h m" " show all key bindings" describe-mode)]) + ("C-x m" " show all key bindings" describe-mode)]) ;;; Git Popup @@ -356,8 +388,6 @@ This affects `magit-git-command', `magit-git-command-topdir', ;;;###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" ("!" "in repository root" magit-git-command-topdir) ("p" "in working directory" magit-git-command)] @@ -417,8 +447,9 @@ is run in the top-level directory of the current working tree." (let ((default-directory (or directory default-directory)) (process-environment process-environment)) (push "GIT_PAGER=cat" process-environment) - (magit-start-process shell-file-name nil - shell-command-switch command)) + (magit--with-connection-local-variables + (magit-start-process shell-file-name nil + shell-command-switch command))) (magit-process-buffer)) (defun magit-read-shell-command (&optional toplevel initial-input) @@ -471,8 +502,10 @@ and Emacs to it." (toplib (or load-file-name buffer-file-name)) debug) (unless (and toplib - (equal (file-name-nondirectory toplib) "magit.el")) - (setq toplib (locate-library "magit.el"))) + (member (file-name-nondirectory toplib) + '("magit.el" "magit.el.gz"))) + (let ((load-suffixes (reverse load-suffixes))) ; prefer .el than .elc + (setq toplib (locate-library "magit")))) (setq toplib (and toplib (magit--straight-chase-links toplib))) (push toplib debug) (when toplib @@ -532,8 +565,20 @@ and Emacs to it." (magit-git-string "rev-parse" "HEAD")))))))) (if (stringp magit-version) (when print-dest - (princ (format "Magit %s, Git %s, Emacs %s, %s" + (princ (format "Magit %s%s, Git %s, Emacs %s, %s" (or magit-version "(unknown)") + (or (and (ignore-errors + (magit--version>= magit-version "2008")) + (ignore-errors + (require 'lisp-mnt) + (and (fboundp 'lm-header) + (format + " [>= %s]" + (with-temp-buffer + (insert-file-contents + (locate-library "magit.el" t)) + (lm-header "Package-Version")))))) + "") (or (let ((magit-git-debug (lambda (err) (display-warning '(magit git) diff --git a/elpa/magit-20210802.1524/magit.info-1 b/elpa/magit-20220116.1908/magit.info similarity index 56% rename from elpa/magit-20210802.1524/magit.info-1 rename to elpa/magit-20220116.1908/magit.info index 04089936..1dac8896 100644 --- a/elpa/magit-20210802.1524/magit.info-1 +++ b/elpa/magit-20220116.1908/magit.info @@ -1,6 +1,6 @@ This is magit.info, produced by makeinfo version 6.7 from magit.texi. - Copyright (C) 2015-2021 Jonas Bernoulli + Copyright (C) 2015-2022 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -31,9 +31,9 @@ to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains. -This manual is for Magit version 3.2.0. +This manual is for Magit version v3.3.0-79-g2e73b66c2+1. - Copyright (C) 2015-2021 Jonas Bernoulli + Copyright (C) 2015-2022 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -60,8 +60,7 @@ This manual is for Magit version 3.2.0. * FAQ:: * Debugging Tools:: * Keystroke Index:: -* Command Index:: -* Function Index:: +* Function and Command Index:: * Variable Index:: — The Detailed Node Listing — @@ -235,6 +234,7 @@ Miscellaneous * Submodules:: * Subtree:: * Worktree:: +* Bundle:: * Common Commands:: * Wip Modes:: * Commands for Buffers Visiting Files:: @@ -377,7 +377,7 @@ on Magit earlier. While one has to know the basic features of Emacs to be able to make full use of Magit, acquiring just enough Emacs skills doesn’t take long and is worth it, even for users who prefer other editors. Vim users are -advised to give Evil (https://bitbucket.org/lyro/evil/wiki/Home), the +advised to give Evil (https://github.com/emacs-evil/evil), the "Extensible VI Layer for Emacs", and Spacemacs (https://github.com/syl20bnr/spacemacs), an "Emacs starter-kit focused on Evil" a try. @@ -697,8 +697,7 @@ the user invokes Git commands, or creates or visits other buffers. In this manual we often speak about "Magit buffers". By that we mean buffers whose major-modes derive from ‘magit-mode’. -‘M-x magit-toggle-buffer-lock’ (‘magit-toggle-buffer-lock’) - +‘M-x magit-toggle-buffer-lock’ This command locks the current buffer to its value or if the buffer is already locked, then it unlocks it. @@ -732,7 +731,6 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an ----------------------- -- Function: magit-display-buffer buffer &optional display-function - This function is a wrapper around ‘display-buffer’ and is used to display any Magit buffer. It displays BUFFER in some window and, unlike ‘display-buffer’, also selects that window, provided @@ -744,7 +742,6 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an 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 @@ -753,7 +750,6 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an the log buffer. -- User Option: magit-display-buffer-function - The function specified here is called by ‘magit-display-buffer’ with one argument, a buffer, to actually display that buffer. This function should call ‘display-buffer’ with that buffer as first and @@ -771,7 +767,6 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an To learn about display actions, see *note (elisp)Choosing Window::. -- Function: magit-display-buffer-traditional buffer - This function is the current default value of the option ‘magit-display-buffer-function’. Before that option and this function were added, the behavior was hard-coded in many places all @@ -779,19 +774,16 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an function (except for the "noselect" special case mentioned above). -- Function: magit-display-buffer-same-window-except-diff-v1 - This function displays most buffers in the currently selected window. If a buffer’s mode derives from ‘magit-diff-mode’ or ‘magit-process-mode’, it is displayed in another window. -- Function: magit-display-buffer-fullframe-status-v1 - This function fills the entire frame when displaying a status buffer. Otherwise, it behaves like ‘magit-display-buffer-traditional’. -- Function: magit-display-buffer-fullframe-status-topleft-v1 - This function fills the entire frame when displaying a status buffer. It behaves like ‘magit-display-buffer-fullframe-status-v1’ except that it displays buffers that derive from ‘magit-diff-mode’ @@ -801,7 +793,6 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an ‘magit-display-buffer-traditional’ were in use. -- Function: magit-display-buffer-fullcolumn-most-v1 - This function displays most buffers so that they fill the entire height of the frame. However, the buffer is displayed in another window if (1) the buffer’s mode derives from ‘magit-process-mode’, @@ -810,23 +801,19 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an or ‘magit-cherry-mode’. -- User Option: magit-pre-display-buffer-hook - This hook is run by ‘magit-display-buffer’ before displaying the buffer. -- Function: magit-save-window-configuration - This function saves the current window configuration. Later when the buffer is buried, it may be restored by ‘magit-restore-window-configuration’. -- User Option: magit-post-display-buffer-hook - This hook is run by ‘magit-display-buffer’ after displaying the buffer. -- Function: magit-maybe-set-dedicated - This function remembers if a new window had to be created to display the buffer, or whether an existing window was reused. This information is later used by ‘magit-mode-quit-window’, to determine @@ -840,7 +827,6 @@ File: magit.info, Node: Naming Buffers, Next: Quitting Windows, Prev: Switchi -------------------- -- User Option: magit-generate-buffer-name-function - The function used to generate the names of Magit buffers. Such a function should take the options @@ -851,7 +837,6 @@ File: magit.info, Node: Naming Buffers, Next: Quitting Windows, Prev: Switchi its own doc-string should describe the additions. -- Function: magit-generate-buffer-name-default-function mode - This function returns a buffer name suitable for a buffer whose major-mode is MODE and which shows information about the repository in which ‘default-directory’ is located. @@ -861,7 +846,6 @@ File: magit.info, Node: Naming Buffers, Next: Quitting Windows, Prev: Switchi also respects the option ‘magit-uniquify-buffer-names’. -- User Option: magit-buffer-name-format - The format string used to name Magit buffers. At least the following %-sequences are supported: @@ -908,7 +892,6 @@ File: magit.info, Node: Naming Buffers, Next: Quitting Windows, Prev: Switchi obsolete ‘%T’). See issue #2841. -- User Option: magit-uniquify-buffer-names - This option controls whether the names of Magit buffers are uniquified. If the names are not being uniquified, then they contain the full path of the top-level of the working tree of the @@ -926,8 +909,7 @@ File: magit.info, Node: Quitting Windows, Next: Automatic Refreshing of Magit 4.1.3 Quitting Windows ---------------------- -‘q’ (‘magit-mode-bury-buffer’) - +‘q’ (‘magit-mode-bury-buffer’) This command buries the current Magit buffer. With a prefix argument, it instead kills the buffer. With a double @@ -935,7 +917,6 @@ File: magit.info, Node: Quitting Windows, Next: Automatic Refreshing of Magit the current project. -- User Option: magit-bury-buffer-function - The function used to actually bury or kill the current buffer. ‘magit-mode-bury-buffer’ calls this function with one argument. If @@ -944,7 +925,6 @@ File: magit.info, Node: Quitting Windows, Next: Automatic Refreshing of Magit currently is ‘magit-restore-window-configuration’. -- Function: magit-restore-window-configuration kill-buffer - Bury or kill the current buffer using ‘quit-window’, which is called with KILL-BUFFER as first and the selected window as second argument. @@ -955,7 +935,6 @@ File: magit.info, Node: Quitting Windows, Next: Automatic Refreshing of Magit are being displayed in the selected frame. -- Function: magit-mode-quit-window kill-buffer - Bury or kill the current buffer using ‘quit-window’, which is called with KILL-BUFFER as first and the selected window as second argument. @@ -989,8 +968,7 @@ undesirable. that weren’t current during the last refresh and after changes were made to the repository outside of Magit. -‘g’ (‘magit-refresh’) - +‘g’ (‘magit-refresh’) This command refreshes the current buffer if its major mode derives from ‘magit-mode’ as well as the corresponding status buffer. @@ -998,8 +976,7 @@ to the repository outside of Magit. reverts all unmodified buffers that visit files being tracked in the current repository. -‘G’ (‘magit-refresh-all’) - +‘G’ (‘magit-refresh-all’) This command refreshes all Magit buffers belonging to the current repository and also reverts all unmodified buffers that visit files being tracked in the current repository. @@ -1008,13 +985,11 @@ to the repository outside of Magit. ‘magit-revert-buffers’ is nil. -- User Option: magit-refresh-buffer-hook - This hook is run in each Magit buffer that was refreshed during the current refresh - normally the current buffer and the status buffer. -- User Option: magit-refresh-status-buffer - 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 @@ -1024,7 +999,6 @@ to the repository outside of Magit. performance. -- Function: magit-after-save-refresh-status - This function is intended to be added to ‘after-save-hook’. After doing that the corresponding status buffer is refreshed whenever a buffer is saved to a file inside a repository. @@ -1048,7 +1022,6 @@ or after outside changes, type ‘g’ (‘magit-refresh’) to save and refresh explicitly. -- User Option: magit-save-repository-buffers - This option controls whether file-visiting buffers are saved before certain events. @@ -1077,12 +1050,10 @@ the buffer, then you would have to type ‘M-x revert-buffer RET RET’ in the visiting buffer before you could continue making changes. -- User Option: magit-auto-revert-mode - When this mode is enabled, then buffers that visit tracked files are automatically reverted after the visited files change on disk. -- User Option: global-auto-revert-mode - When this mode is enabled, then any file-visiting buffer is automatically reverted after the visited file changes on disk. @@ -1092,7 +1063,6 @@ the visiting buffer before you could continue making changes. enable this mode _instead of_ ‘magit-auto-revert-mode’. -- 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 @@ -1109,20 +1079,17 @@ the visiting buffer before you could continue making changes. seconds of user inactivity. That is not desirable. -- User Option: auto-revert-use-notify - This option controls whether file notification functions should be used. Note that this variable unfortunately defaults to ‘t’ even on systems on which file notifications cannot be used. -- User Option: magit-auto-revert-tracked-only - This option controls whether ‘magit-auto-revert-mode’ only reverts tracked files or all files that are located inside Git repositories, including untracked files and files located inside Git’s control directory. -- User Option: auto-revert-mode - The global mode ‘magit-auto-revert-mode’ works by turning on this local mode in the appropriate buffers (but ‘global-auto-revert-mode’ is implemented differently). You can @@ -1131,17 +1098,14 @@ the visiting buffer before you could continue making changes. tracked or vice-versa. -- User Option: auto-revert-stop-on-user-input - This option controls whether the arrival of user input suspends the automatic reverts for ‘auto-revert-interval’ seconds. -- User Option: auto-revert-interval - This option controls how many seconds Emacs waits for before resuming suspended reverts. -- User Option: auto-revert-buffer-list-filter - This option specifies an additional filter used by ‘auto-revert-buffers’ to determine whether a buffer should be reverted or not. @@ -1163,7 +1127,6 @@ the visiting buffer before you could continue making changes. enabled. -- User Option: auto-revert-verbose - This option controls whether Emacs reports when a buffer has been reverted. @@ -1256,29 +1219,24 @@ To move within a section use the usual keys (‘C-p’, ‘C-n’, ‘C-b’, etc), whose global bindings are not shadowed. To move to another section use the following commands. -‘p’ (‘magit-section-backward’) - +‘p’ (‘magit-section-backward’) When not at the beginning of a section, then move to the beginning of the current section. At the beginning of a section, instead move to the beginning of the previous visible section. -‘n’ (‘magit-section-forward’) - +‘n’ (‘magit-section-forward’) Move to the beginning of the next visible section. -‘M-p’ (‘magit-section-backward-siblings’) - +‘M-p’ (‘magit-section-backward-siblings’) Move to the beginning of the previous sibling section. If there is no previous sibling section, then move to the parent section instead. -‘M-n’ (‘magit-section-forward-siblings’) - +‘M-n’ (‘magit-section-forward-siblings’) Move to the beginning of the next sibling section. If there is no next sibling section, then move to the parent section instead. -‘^’ (‘magit-section-up’) - +‘^’ (‘magit-section-up’) Move to the beginning of the parent of the current section. The above commands all call the hook ‘magit-section-movement-hook’. @@ -1293,12 +1251,10 @@ remove function that haven’t even been added yet, for example: 'magit-hunk-set-window-start)) -- Variable: magit-section-movement-hook - This hook is run by all of the above movement commands, after arriving at the destination. -- Function: magit-hunk-set-window-start - This hook function ensures that the beginning of the current section is visible, provided it is a ‘hunk’ section. Otherwise, it does nothing. @@ -1306,14 +1262,12 @@ remove function that haven’t even been added yet, for example: Loading ‘magit-diff’ adds this function to the hook. -- Function: magit-section-set-window-start - This hook function ensures that the beginning of the current section is visible, regardless of the section’s type. If you add this to ‘magit-section-movement-hook’, then you must remove the hunk-only variant in turn. -- Function: magit-log-maybe-show-more-commits - This hook function only has an effect in log buffers, and ‘point’ is on the "show more" section. If that is the case, then it doubles the number of commits that are being shown. @@ -1321,7 +1275,6 @@ remove function that haven’t even been added yet, for example: Loading ‘magit-log’ adds this function to the hook. -- Function: magit-log-maybe-update-revision-buffer - When moving inside a log buffer, then this function updates the revision buffer, provided it is already being displayed in another window of the same frame. @@ -1329,37 +1282,31 @@ remove function that haven’t even been added yet, for example: Loading ‘magit-log’ adds this function to the hook. -- Function: magit-log-maybe-update-blob-buffer - When moving inside a log buffer and another window of the same frame displays a blob buffer, then this function instead displays the blob buffer for the commit at point in that window. -- Function: magit-status-maybe-update-revision-buffer - When moving inside a status buffer, then this function updates the revision buffer, provided it is already being displayed in another window of the same frame. -- Function: magit-status-maybe-update-stash-buffer - When moving inside a status buffer, then this function updates the stash buffer, provided it is already being displayed in another window of the same frame. -- Function: magit-status-maybe-update-blob-buffer - When moving inside a status buffer and another window of the same frame displays a blob buffer, then this function instead displays the blob buffer for the commit at point in that window. -- Function: magit-stashes-maybe-update-stash-buffer - When moving inside a buffer listing stashes, then this function updates the stash buffer, provided it is already being displayed in another window of the same frame. -- User Option: magit-update-other-window-delay - Delay before automatically updating the other window. When moving around in certain buffers, then certain other buffers, @@ -1382,35 +1329,29 @@ File: magit.info, Node: Section Visibility, Next: Section Hooks, Prev: Sectio Magit provides many commands for changing the visibility of sections, but all you need to get started are the next two. -‘TAB’ (‘magit-section-toggle’) - +‘’ (‘magit-section-toggle’) Toggle the visibility of the body of the current section. -‘C-’ (‘magit-section-cycle’) - +‘C-’ (‘magit-section-cycle’) Cycle the visibility of current section and its children. -‘M-’ (‘magit-section-cycle-diffs’) - +‘M-’ (‘magit-section-cycle-diffs’) Cycle the visibility of diff-related sections in the current buffer. -‘S-’ (‘magit-section-cycle-global’) - +‘S-’ (‘magit-section-cycle-global’) Cycle the visibility of all sections in the current buffer. -‘1’ (‘magit-section-show-level-1’) -‘2’ (‘magit-section-show-level-2’) -‘3’ (‘magit-section-show-level-3’) -‘4’ (‘magit-section-show-level-4’) - +‘1’ (‘magit-section-show-level-1’) +‘2’ (‘magit-section-show-level-2’) +‘3’ (‘magit-section-show-level-3’) +‘4’ (‘magit-section-show-level-4’) Show sections surrounding the current section up to level N. -‘M-1’ (‘magit-section-show-level-1-all’) -‘M-2’ (‘magit-section-show-level-2-all’) -‘M-3’ (‘magit-section-show-level-3-all’) -‘M-4’ (‘magit-section-show-level-4-all’) - +‘M-1’ (‘magit-section-show-level-1-all’) +‘M-2’ (‘magit-section-show-level-2-all’) +‘M-3’ (‘magit-section-show-level-3-all’) +‘M-4’ (‘magit-section-show-level-4-all’) Show all sections up to level N. Some functions, which are used to implement the above commands, are @@ -1419,30 +1360,24 @@ these commands, as they are generally perceived to be much less useful. But your mileage may vary. -- Command: magit-section-show - Show the body of the current section. -- Command: magit-section-hide - Hide the body of the current section. -- Command: magit-section-show-headings - Recursively show headings of children of the current section. Only show the headings. Previously shown text-only bodies are hidden. -- Command: magit-section-show-children - Recursively show the bodies of children of the current section. With a prefix argument show children down to the level of the current section, and hide deeper children. -- Command: magit-section-hide-children - Recursively hide the bodies of children of the current section. -- Command: magit-section-toggle-children - Toggle visibility of bodies of children of the current section. When a buffer is first created then some sections are shown expanded @@ -1452,7 +1387,6 @@ certain sections can also be overwritten using the hook ‘magit-section-set-visibility-hook’. -- User Option: magit-section-initial-visibility-alist - This options can be used to override the initial visibility of sections. In the future it will also be used to define the defaults, but currently a section’s default is still hardcoded. @@ -1469,7 +1403,6 @@ certain sections can also be overwritten using the hook Wildcards can be used, see ‘magit-section-match’. -- 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, @@ -1480,7 +1413,6 @@ certain sections can also be overwritten using the hook is a member of ‘magit-section-set-visibility-hook’. -- Variable: magit-section-set-visibility-hook - This hook is run when first creating a buffer and also when refreshing an existing buffer, and is used to determine the visibility of the section currently being inserted. @@ -1498,7 +1430,6 @@ certain sections can also be overwritten using the hook should immediately return ‘nil’. -- User Option: magit-section-visibility-indicator - This option controls whether and how to indicate that a section can be expanded/collapsed. @@ -1548,7 +1479,6 @@ this manual along with the appropriate "section inserter functions". -- Function: magit-add-section-hook hook function &optional at append local - Add the function FUNCTION to the value of section hook HOOK. Add FUNCTION at the beginning of the hook list unless optional @@ -1589,10 +1519,14 @@ section of type ‘file’, for example, is a file name. Users usually do not have to worry about a section’s type and value, but knowing them can be handy at times. -‘M-x magit-describe-section-briefly’ (‘magit-describe-section-briefly’) +‘H’ (‘magit-describe-section’) + This command shows information about the section at point in a + separate buffer. - Show information about the section at point in the echo area, as - "#". + -- Command: magit-describe-section-briefly + This command shows information about the section at point in the + echo area, as ‘#’. Many commands behave differently depending on the type of the section at point and/or somehow consume the value of that section. But that is @@ -1615,7 +1549,6 @@ This section describes options that have an effect on more than just a certain type of sections. As you can see there are not many of those. -- User Option: magit-section-show-child-count - Whether to append the number of children to section headings. This only affects sections that could benefit from this information. @@ -1637,8 +1570,7 @@ library ‘magit-key-mode’. Transient is documented in *note (transient)Top::. -‘C-c C-c’ (‘magit-dispatch’) - +‘C-c C-c’ (‘magit-dispatch’) This transient prefix command binds most of Magit’s other prefix commands as suffix commands and displays them in a temporary buffer until one of them is invoked. Invoking such a sub-prefix causes @@ -1715,7 +1647,6 @@ arguments are reset to the default. Not cool; so Magit does not do that by default. -- User Option: magit-prefix-use-buffer-arguments - This option controls whether the infix arguments initially shown in certain transient prefix commands are based on the arguments that are currently in effect in the buffer that their suffixes update. @@ -1724,7 +1655,6 @@ by default. affected by this option. -- User Option: magit-direct-use-buffer-arguments - This option controls whether certain commands, when invoked directly (i.e. not as the suffix of a transient prefix command), use the arguments that are currently active in the buffer that they @@ -1736,19 +1666,16 @@ Valid values for both of the above options are: • ‘always’: Always use the set of arguments that is currently active in the respective buffer, provided that buffer exists of course. - • ‘selected’ or ‘t’: Use the set of arguments from the respective buffer, but only if it is displayed in a window of the current frame. This is the default for both variables. - • ‘current’: Use the set of arguments from the respective buffer, but only if it is the current buffer. - • ‘never’: Never use the set of arguments from the respective buffer. I am afraid it gets more complicated still: - • The global diff and log arguments are set for each support mode + • The global diff and log arguments are set for each supported mode individually. The diff arguments for example have different values in ‘magit-diff-mode’, ‘magit-revision-mode’, ‘magit-merge-preview-mode’ and ‘magit-status-mode’ buffers. @@ -1757,7 +1684,7 @@ I am afraid it gets more complicated still: • When ‘magit-show-commit’ is invoked directly from a log buffer, then the file filter is picked up from that buffer, not from the - revision buffer and or the mode’s global diff arguments. + revision buffer or the mode’s global diff arguments. • Even though they are suffixes of the diff prefix ‘magit-show-commit’ and ‘magit-stash-show’ do not use the diff @@ -1818,7 +1745,6 @@ specific set of actions, the next section explains another way of telling Magit to ask fewer questions. -- User Option: magit-no-confirm - The value of this option is a list of symbols, representing actions that do not have to be confirmed by the user before being carried out. @@ -2010,7 +1936,6 @@ also not affected by this option and are described in the previous section. -- User Option: magit-dwim-selection - This option can be used to tell certain commands to use the thing at point instead of asking the user to select a candidate to act on, with or without confirmation. @@ -2086,7 +2011,6 @@ current section always is part of the selection, then that cannot happen. -- Variable: magit-keep-region-overlay - This variable controls whether the region is visualized as usual even when a valid Magit selection or a hunk-internal region exists. See the doc-string for more information. @@ -2143,7 +2067,6 @@ You will also have to install the ‘ido-completing-read+’ package and use ‘magit-ido-completing-read’ as ‘magit-completing-read-function’. -- User Option: magit-completing-read-function - The value of this variable is the low-level function used to perform completion by code that uses ‘magit-completing-read’ (as opposed to the built-in ‘completing-read’). @@ -2159,13 +2082,11 @@ You will also have to install the ‘ido-completing-read+’ package and use -- Function: magit-builtin-completing-read prompt choices &optional predicate require-match initial-input hist def - This function performs completion using the built-in ‘completing-read’ and does some additional magit-specific work. -- Function: magit-ido-completing-read prompt choices &optional predicate require-match initial-input hist def - This function performs completion using ‘ido-completing-read+’ from the package by the same name (which you have to explicitly install) and does some additional magit-specific work. @@ -2177,7 +2098,6 @@ You will also have to install the ‘ido-completing-read+’ package and use -- Function: magit-completing-read prompt choices &optional predicate require-match initial-input hist def fallback - This is the function that Magit commands use when they need the user to select a single thing to act on. The arguments have the same meaning as for ‘completing-read’, except for FALLBACK, which @@ -2223,7 +2143,6 @@ File: magit.info, Node: Additional Completion Options, Prev: Support for Compl ----------------------------------- -- User Option: magit-list-refs-sortby - For many commands that read a ref or refs from the user, the value of this option can be used to control the order of the refs. Valid values include any key accepted by the ‘--sort’ flag of ‘git @@ -2260,23 +2179,42 @@ per-repository log buffer, which can be consulted using the The output/errors for up to ‘magit-process-log-max’ Git commands are retained. -‘$’ (‘magit-process’) - +‘$’ (‘magit-process’) This commands displays the process buffer for the current repository. Inside that buffer, the usual key bindings for navigating and showing sections are available. There is one additional command. -‘k’ (‘magit-process-kill’) - +‘k’ (‘magit-process-kill’) This command kills the process represented by the section at point. - -- User Option: magit-git-debug + -- Variable: magit-git-debug + This option controls whether additional reporting of git errors is + enabled. + + Magit basically calls git for one of these two reasons: for + side-effects or to do something with its standard output. + + When git is run for side-effects then its output, including error + messages, go into the process buffer which is shown when using ‘$’. + + When git’s output is consumed in some way, then it would be too + expensive to also insert it into this buffer, but when this option + is non-nil and git returns with a non-zero exit status, then at + least its standard error is inserted into this buffer. - When this is non-nil then the output of all calls to git are logged - in the process buffer. This is useful when debugging, otherwise it - just negatively affects performance. + This is only intended for debugging purposes. Do not enable this + permanently, that would negatively affect performance. + + -- Variable: magit-process-extreme-logging + This option controls whether ‘magit-process-file’ logs to the + ‘*Messages*’ buffer. + + Only intended for temporary use when you try to figure out how + Magit uses Git behind the scene. Output that normally goes to the + magit-process buffer continues to go there. Not all output goes to + either of these two buffers.  File: magit.info, Node: Git Process Status, Next: Running Git Manually, Prev: Viewing Git Output, Up: Running Git @@ -2314,21 +2252,19 @@ come in handy. Magit provides some commands for running arbitrary Git commands by typing them into the minibuffer, instead of having to switch to a shell. -‘!’ (‘magit-run’) - +‘!’ (‘magit-run’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. -‘! !’ (‘magit-git-command-topdir’) - +‘! !’ (‘magit-git-command-topdir’) This command reads a command from the user and executes it in the top-level directory of the current working tree. The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command. -‘! p’ (‘magit-git-command’) - +‘:’ (‘magit-git-command’) +‘! p’ This command reads a command from the user and executes it in ‘default-directory’. With a prefix argument the command is executed in the top-level directory of the current working tree @@ -2337,39 +2273,32 @@ to a shell. The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command. -‘! s’ (‘magit-shell-command-topdir’) - +‘! s’ (‘magit-shell-command-topdir’) This command reads a command from the user and executes it in the top-level directory of the current working tree. -‘! S’ (‘magit-shell-command’) - +‘! S’ (‘magit-shell-command’) This command reads a command from the user and executes it in ‘default-directory’. With a prefix argument the command is executed in the top-level directory of the current working tree instead. -- User Option: magit-shell-command-verbose-prompt - Whether the prompt, used by the above commands when reading a shell command, shows the directory in which it will be run. These suffix commands start external gui tools. -‘! k’ (‘magit-run-gitk’) - +‘! k’ (‘magit-run-gitk’) This command runs ‘gitk’ in the current repository. -‘! a’ (‘magit-run-gitk-all’) - +‘! a’ (‘magit-run-gitk-all’) This command runs ‘gitk --all’ in the current repository. -‘! b’ (‘magit-run-gitk-branches’) - +‘! b’ (‘magit-run-gitk-branches’) This command runs ‘gitk --branches’ in the current repository. -‘! g’ (‘magit-run-git-gui’) - +‘! g’ (‘magit-run-git-gui’) This command runs ‘git gui’ in the current repository.  @@ -2399,16 +2328,15 @@ the local machine, so a separate option is used to control the name or path that is used on remote machines. -- User Option: magit-git-executable - The ‘git’ executable used by Magit on the local host. This should be either the absolute path to the executable, or the string "git" to let Emacs find the executable itself, using the standard mechanism for doing such things. -- User Option: magit-remote-git-executable - The ‘git’ executable used by Magit on remote machines over Tramp. - Normally this should be just the string "git". + Normally this should be just the string "git". Consider + customizing ‘tramp-remote-path’ instead of this option. If Emacs is unable to find the correct executable, then you can work around that by explicitly setting the value of one of these two options. @@ -2427,13 +2355,11 @@ a kludge too. The command ‘magit-debug-git-executable’ can be useful to find out where Emacs is searching for ‘git’. -‘M-x magit-debug-git-executable’ (‘magit-debug-git-executable’) - +‘M-x magit-debug-git-executable’ This command displays a buffer with information about ‘magit-git-executable’ and ‘magit-remote-git-executable’. -‘M-x magit-version’ (‘magit-version’) - +‘M-x magit-version’ This command shows the currently used versions of Magit, Git, and Emacs in the echo area. Non-interactively this just returns the Magit version. @@ -2445,7 +2371,6 @@ File: magit.info, Node: Global Git Arguments, Prev: Git Executable, Up: Runni -------------------------- -- User Option: magit-git-global-arguments - The arguments set here are used every time the git executable is run as a subprocess. They are placed right after the executable itself and before the git command - as in ‘git HERE... COMMAND @@ -2513,8 +2438,7 @@ that it should be bound globally. We recommend using ‘C-x g’: (global-set-key (kbd "C-x g") 'magit-status) -‘C-x g’ (‘magit-status’) - +‘C-x g’ (‘magit-status’) When invoked from within an existing Git repository, then this command shows the status of that repository in a buffer. @@ -2550,7 +2474,6 @@ that it should be bound globally. We recommend using ‘C-x g’: the same as with two prefix arguments. -- User Option: magit-repository-directories - List of directories that are Git repositories or contain Git repositories. @@ -2563,8 +2486,33 @@ that it should be bound globally. We recommend using ‘C-x g’: ‘magit-list-repositories’. It also affects ‘magit-status’ (which see) in potentially surprising ways (see above). - -- Command: ido-enter-magit-status + -- Command: magit-status-quick + This command is an alternative to ‘magit-status’ that usually + avoids refreshing the status buffer. + If the status buffer of the current Git repository exists but isn’t + being displayed in the selected frame, then it is displayed without + being refreshed. + + If the status buffer is being displayed in the selected frame, then + this command refreshes it. + + Prefix arguments have the same meaning as for ‘magit-status’, and + additionally cause the buffer to be refresh. + + To use this command add this to your init file: + + (global-set-key (kbd "C-x g") 'magit-status-quick). + + If you do that and then for once want to redisplay the buffer and + also immediately refresh it, then type ‘C-x g’ followed by ‘g’. + + A possible alternative command is + ‘magit-display-repository-buffer’. It supports displaying any + existing Magit buffer that belongs to the current repository; not + just the status buffer. + + -- Command: ido-enter-magit-status From an Ido prompt used to open a file, instead drop into ‘magit-status’. This is similar to ‘ido-magic-delete-char’, which, despite its name, usually causes a Dired buffer to be created. @@ -2601,7 +2549,6 @@ The contents of status buffers is controlled using the hook such hooks and how to customize them. -- User Option: magit-status-sections-hook - Hook run to insert sections into a status buffer. The first function on that hook by default is @@ -2609,39 +2556,31 @@ such hooks and how to customize them. default the following functions are also members of that hook: -- Function: magit-insert-merge-log - Insert section for the on-going merge. Display the heads that are being merged. If no merge is in progress, do nothing. -- Function: magit-insert-rebase-sequence - Insert section for the on-going rebase sequence. If no such sequence is in progress, do nothing. -- Function: magit-insert-am-sequence - Insert section for the on-going patch applying sequence. If no such sequence is in progress, do nothing. -- Function: magit-insert-sequencer-sequence - Insert section for the on-going cherry-pick or revert sequence. If no such sequence is in progress, do nothing. -- Function: magit-insert-bisect-output - While bisecting, insert section with output from ‘git bisect’. -- Function: magit-insert-bisect-rest - While bisecting, insert section visualizing the bisect state. -- Function: magit-insert-bisect-log - While bisecting, insert section logging bisect progress. -- Function: magit-insert-untracked-files - Maybe insert a list or tree of untracked files. Do so depending on the value of ‘status.showUntrackedFiles’. Note @@ -2650,48 +2589,39 @@ default the following functions are also members of that hook: ‘TAB’. -- Function: magit-insert-unstaged-changes - Insert section showing unstaged changes. -- Function: magit-insert-staged-changes - Insert section showing staged changes. -- 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:". -- Function: magit-insert-unpulled-from-upstream - Insert section showing commits that haven’t been pulled from the upstream branch yet. -- Function: magit-insert-unpulled-from-pushremote - Insert section showing commits that haven’t been pulled from the push-remote branch yet. -- Function: magit-insert-unpushed-to-upstream - Insert section showing commits that haven’t been pushed to the upstream yet. -- Function: magit-insert-unpushed-to-pushremote - Insert section showing commits that haven’t been pushed to the push-remote yet. The following functions can also be added to the above hook: -- Function: magit-insert-tracked-files - Insert a tree of tracked files. -- Function: magit-insert-ignored-files - Insert a tree of ignored files. Its possible to limit the logs in the current buffer to a certain directory using ‘D = f RET g’. If you do that, then that that also affects this command. @@ -2701,46 +2631,39 @@ default the following functions are also members of that hook: it is a directory. -- Function: magit-insert-skip-worktree-files - Insert a tree of skip-worktree files. If the first element of ‘magit-buffer-diff-files’ is a directory, then limit the list to files below that. The value of that variable can be set using ‘D -- DIRECTORY RET g’. -- Function: magit-insert-assumed-unchanged-files - Insert a tree of files that are assumed to be unchanged. If the first element of ‘magit-buffer-diff-files’ is a directory, then limit the list to files below that. The value of that variable can be set using ‘D -- DIRECTORY RET g’. -- Function: magit-insert-unpulled-or-recent-commits - Insert section showing unpulled or recent commits. If an upstream is configured for the current branch and it is ahead of the current branch, then show the missing commits. Otherwise, show the last ‘magit-log-section-commit-count’ commits. -- Function: magit-insert-recent-commits - Insert section showing the last ‘magit-log-section-commit-count’ commits. -- User Option: magit-log-section-commit-count - How many recent commits ‘magit-insert-recent-commits’ and ‘magit-insert-unpulled-or-recent-commits’ (provided there are no unpulled commits) show. -- Function: magit-insert-unpulled-cherries - Insert section showing unpulled commits. Like ‘magit-insert-unpulled-commits’ but prefix each commit that has not been applied yet (i.e. a commit with a patch-id not shared with any local commit) with "+", and all others with "-". -- Function: magit-insert-unpushed-cherries - Insert section showing unpushed commits. Like ‘magit-insert-unpushed-commits’ but prefix each commit which has not been applied to upstream yet (i.e. a commit with a patch-id @@ -2763,13 +2686,11 @@ The contents of status buffers is controlled using the hook hook variable. -- Function: magit-insert-status-headers - Insert headers sections appropriate for ‘magit-status-mode’ buffers. The sections are inserted by running the functions on the hook ‘magit-status-headers-hook’. -- User Option: magit-status-headers-hook - Hook run to insert headers sections into the status buffer. This hook is run by ‘magit-insert-status-headers’, which in turn @@ -2779,7 +2700,6 @@ hook variable. By default the following functions are members of the above hook: -- Function: magit-insert-error-header - Insert a header line showing the message about the Git error that just occurred. @@ -2789,36 +2709,29 @@ hook variable. the status buffer causes this section to disappear again. -- Function: magit-insert-diff-filter-header - Insert a header line showing the effective diff filters. -- Function: magit-insert-head-branch-header - Insert a header line about the current branch or detached ‘HEAD’. -- Function: magit-insert-upstream-branch-header - Insert a header line about the branch that is usually pulled into the current branch. -- Function: magit-insert-push-branch-header - Insert a header line about the branch that the current branch is usually pushed to. -- Function: magit-insert-tags-header - Insert a header line about the current and/or next tag, along with the number of commits between the tag and ‘HEAD’. The following functions can also be added to the above hook: -- Function: magit-insert-repo-header - Insert a header line showing the path to the repository top-level. -- Function: magit-insert-remote-header - Insert a header line about the remote of the current branch. If no remote is configured for the current branch, then fall back @@ -2826,7 +2739,6 @@ hook variable. remote in alphabetic order. -- Function: magit-insert-user-header - Insert a header line about the current user.  @@ -2842,7 +2754,6 @@ The contents of status buffers is controlled using the hook variable. -- Function: magit-insert-modules - Insert submodule sections. Hook ‘magit-module-sections-hook’ controls which module sections @@ -2850,11 +2761,9 @@ variable. whether they are wrapped in an additional section. -- User Option: magit-module-sections-hook - Hook run by ‘magit-insert-modules’. -- User Option: magit-module-sections-nested - This option controls whether ‘magit-insert-modules’ wraps inserted sections in an additional section. @@ -2863,7 +2772,6 @@ variable. ‘magit-module-sections-hook’ become top-level sections. -- Function: magit-insert-modules-overview - Insert sections for all submodules. For each section insert the path, the branch, and the output of ‘git describe --tags’, or, failing that, the abbreviated HEAD commit hash. @@ -2874,25 +2782,21 @@ variable. not displayed in the super-repository’s status buffer. -- Function: magit-insert-modules-unpulled-from-upstream - Insert sections for modules that haven’t been pulled from the upstream yet. These sections can be expanded to show the respective commits. -- Function: magit-insert-modules-unpulled-from-pushremote - Insert sections for modules that haven’t been pulled from the push-remote yet. These sections can be expanded to show the respective commits. -- Function: magit-insert-modules-unpushed-to-upstream - Insert sections for modules that haven’t been pushed to the upstream yet. These sections can be expanded to show the respective commits. -- Function: magit-insert-modules-unpushed-to-pushremote - Insert sections for modules that haven’t been pushed to the push-remote yet. These sections can be expanded to show the respective commits. @@ -2904,18 +2808,15 @@ File: magit.info, Node: Status Options, Prev: Status Module Sections, Up: Sta -------------------- -- User Option: magit-status-refresh-hook - Hook run after a status buffer has been refreshed. -- User Option: magit-status-margin - This option specifies whether the margin is initially shown in Magit-Status mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -2923,14 +2824,11 @@ File: magit.info, Node: Status Options, Prev: Status Module Sections, Up: Sta show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -2945,7 +2843,6 @@ File: magit.info, Node: Repository List, Next: Logging, Prev: Status Buffer, =================== -- Command: magit-list-repositories - This command displays a list of repositories in a separate buffer. The options ‘magit-repository-directories’ and @@ -2953,7 +2850,6 @@ File: magit.info, Node: Repository List, Next: Logging, Prev: Status Buffer, displayed. -- User Option: magit-repolist-columns - This option controls what columns are displayed by the command ‘magit-list-repositories’ and how they are displayed. @@ -2975,68 +2871,54 @@ File: magit.info, Node: Repository List, Next: Logging, Prev: Status Buffer, The following functions can be added to the above option: -- Function: magit-repolist-column-ident - This function inserts the identification of the repository. Usually this is just its basename. -- Function: magit-repolist-column-path - This function inserts the absolute path of the repository. -- Function: magit-repolist-column-version - This function inserts a description of the repository’s ‘HEAD’ revision. -- Function: magit-repolist-column-branch - This function inserts the name of the current branch. -- Function: magit-repolist-column-upstream - This function inserts the name of the upstream branch of the current branch. -- Function: magit-repolist-column-branches - This function inserts the number of branches. -- Function: magit-repolist-column-stashes - This function inserts the number of stashes. -- Function: magit-repolist-column-flag - This function inserts a flag as specified by ‘magit-repolist-column-flag-alist’. By default this indicates whether there are uncommitted changes. • ‘N’ if there is at least one untracked file. - • ‘U’ if there is at least one unstaged file. - • ‘S’ if there is at least one staged file. Only the first one of these that applies is shown. -- Function: magit-repolist-column-unpulled-from-upstream - This function inserts the number of upstream commits not in the current branch. -- Function: magit-repolist-column-unpulled-from-pushremote - This function inserts the number of commits in the push branch but not the current branch. -- Function: magit-repolist-column-unpushed-to-upstream - This function inserts the number of commits in the current branch but not its upstream. -- Function: magit-repolist-column-unpushed-to-pushremote - This function inserts the number of commits in the current branch but not its push branch. @@ -3069,39 +2951,32 @@ passed to ‘git log’. The log transient also features several reflog commands. See *note Reflog::. -‘l’ (‘magit-log’) - +‘l’ (‘magit-log’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘l l’ (‘magit-log-current’) - +‘l l’ (‘magit-log-current’) Show log for the current branch. When ‘HEAD’ is detached or with a prefix argument, show log for one or more revs read from the minibuffer. -‘l o’ (‘magit-log-other’) - +‘l o’ (‘magit-log-other’) Show log for one or more revs read from the minibuffer. The user can input any revision or revisions separated by a space, or even ranges, but only branches, tags, and a representation of the commit at point are available as completion candidates. -‘l h’ (‘magit-log-head’) - +‘l h’ (‘magit-log-head’) Show log for ‘HEAD’. -‘l L’ (‘magit-log-branches’) - +‘l L’ (‘magit-log-branches’) Show log for all local branches and ‘HEAD’. -‘l b’ (‘magit-log-all-branches’) - +‘l b’ (‘magit-log-all-branches’) Show log for all local and remote branches and ‘HEAD’. -‘l a’ (‘magit-log-all’) - +‘l a’ (‘magit-log-all’) Show log for all references and ‘HEAD’. Two additional commands that show the log for the file or blob that @@ -3129,34 +3004,29 @@ change the log arguments used in the current buffer, without changing which log is shown. This works in dedicated log buffers, but also in the status buffer. -‘L’ (‘magit-log-refresh’) - +‘L’ (‘magit-log-refresh’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘L g’ (‘magit-log-refresh’) - +‘L g’ (‘magit-log-refresh’) This suffix command sets the local log arguments for the current buffer. -‘L s’ (‘magit-log-set-default-arguments’) - +‘L s’ (‘magit-log-set-default-arguments’) This suffix command sets the default log arguments for buffers of the same type as that of the current buffer. Other existing buffers of the same type are not affected because their local values have already been initialized. -‘L w’ (‘magit-log-save-default-arguments’) - +‘L w’ (‘magit-log-save-default-arguments’) This suffix command sets the default log arguments for buffers of the same type as that of the current buffer, and saves the value for future sessions. Other existing buffers of the same type are not affected because their local values have already been initialized. -‘L t’ (‘magit-toggle-margin’) - +‘L t’ (‘magit-toggle-margin’) Show or hide the margin.  @@ -3165,37 +3035,31 @@ File: magit.info, Node: Log Buffer, Next: Log Margin, Prev: Refreshing Logs, 5.3.2 Log Buffer ---------------- -‘L’ (‘magit-log-refresh’) - +‘L’ (‘magit-log-refresh’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. See *note Refreshing Logs::. -‘q’ (‘magit-log-bury-buffer’) - +‘q’ (‘magit-log-bury-buffer’) Bury the current buffer or the revision buffer in the same frame. Like ‘magit-mode-bury-buffer’ (which see) but with a negative prefix argument instead bury the revision buffer, provided it is displayed in the current frame. -‘C-c C-b’ (‘magit-go-backward’) - +‘C-c C-b’ (‘magit-go-backward’) Move backward in current buffer’s history. -‘C-c C-f’ (‘magit-go-forward’) - +‘C-c C-f’ (‘magit-go-forward’) Move forward in current buffer’s history. -‘C-c C-n’ (‘magit-log-move-to-parent’) - +‘C-c C-n’ (‘magit-log-move-to-parent’) Move to a parent of the current commit. By default, this is the first parent, but a numeric prefix can be used to specify another parent. -‘j’ (‘magit-log-move-to-revision’) - +‘j’ (‘magit-log-move-to-revision’) Read a revision and move to it in current log buffer. If the chosen reference or revision isn’t being displayed in the @@ -3205,8 +3069,7 @@ File: magit.info, Node: Log Buffer, Next: Log Margin, Prev: Refreshing Logs, If invoked outside any log buffer, then display the log buffer of the current repository first; creating it if necessary. -‘SPC’ (‘magit-diff-show-or-scroll-up’) - +‘’ (‘magit-diff-show-or-scroll-up’) Update the commit or diff buffer for the thing at point. Either show the commit or stash at point in the appropriate buffer, @@ -3215,8 +3078,7 @@ File: magit.info, Node: Log Buffer, Next: Log Margin, Prev: Refreshing Logs, scroll the buffer up. If there is no commit or stash at point, then prompt for a commit. -‘DEL’ (‘magit-diff-show-or-scroll-down’) - +‘’ (‘magit-diff-show-or-scroll-down’) Update the commit or diff buffer for the thing at point. Either show the commit or stash at point in the appropriate buffer, @@ -3225,28 +3087,23 @@ File: magit.info, Node: Log Buffer, Next: Log Margin, Prev: Refreshing Logs, scroll the buffer down. If there is no commit or stash at point, then prompt for a commit. -‘=’ (‘magit-log-toggle-commit-limit’) - +‘=’ (‘magit-log-toggle-commit-limit’) Toggle the number of commits the current log buffer is limited to. If the number of commits is currently limited, then remove that limit. Otherwise set it to 256. -‘+’ (‘magit-log-double-commit-limit’) - +‘+’ (‘magit-log-double-commit-limit’) Double the number of commits the current log buffer is limited to. -‘-’ (‘magit-log-half-commit-limit’) - +‘-’ (‘magit-log-half-commit-limit’) Half the number of commits the current log buffer is limited to. -- User Option: magit-log-auto-more - Insert more log entries automatically when moving past the last entry. Only considered when moving past the last entry with ‘magit-goto-*-section’ commands. -- User Option: magit-log-show-refname-after-summary - Whether to show the refnames after the commit summaries. This is useful if you use really long branch names. @@ -3291,14 +3148,12 @@ is the same as in the respective major-mode ‘magit-INFIX-mode’. In regular log buffers that would be ‘magit-log-margin’. -- User Option: magit-log-margin - This option specifies whether the margin is initially shown in Magit-Log mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -3306,14 +3161,11 @@ regular log buffers that would be ‘magit-log-margin’. show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -3328,15 +3180,13 @@ re-enforcing the default for that option, does not carry to other options. -- User Option: magit-log-margin-show-committer-date - This option specifies whether to show the committer date in the margin. This option only controls whether the committer date is displayed instead of the author date. Whether some date is displayed in the margin and whether the margin is displayed at all is controlled by other options. -‘L’ (‘magit-margin-settings’) - +‘L’ (‘magit-margin-settings’) This transient prefix command binds the following suffix commands, each of which changes the appearance of the margin in some way. @@ -3344,16 +3194,13 @@ options. ‘magit-log-refresh’, but that transient features the same commands, and then some other unrelated commands. -‘L L’ (‘magit-toggle-margin’) - +‘L L’ (‘magit-toggle-margin’) This command shows or hides the margin. -‘L l’ (‘magit-cycle-margin-style’) - +‘L l’ (‘magit-cycle-margin-style’) This command cycles the style used for the margin. -‘L d’ (‘magit-toggle-margin-details’) - +‘L d’ (‘magit-toggle-margin-details’) This command shows or hides details in the margin.  @@ -3376,25 +3223,21 @@ and when selecting the commit to be squashed into. following additional key bindings are available in selection log buffers: -‘C-c C-c’ (‘magit-log-select-pick’) - +‘C-c C-c’ (‘magit-log-select-pick’) Select the commit at point and act on it. Call ‘magit-log-select-pick-function’ with the selected commit as argument. -‘C-c C-k’ (‘magit-log-select-quit’) - +‘C-c C-k’ (‘magit-log-select-quit’) Abort selecting a commit, don’t act on any commit. -- User Option: magit-log-select-margin - This option specifies whether the margin is initially shown in Magit-Log-Select mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -3402,14 +3245,11 @@ buffers: show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -3425,27 +3265,22 @@ Also see *note (gitman)git-reflog::. These reflog commands are available from the log transient. See *note Logging::. -‘l r’ (‘magit-reflog-current’) - +‘l r’ (‘magit-reflog-current’) Display the reflog of the current branch. -‘l O’ (‘magit-reflog-other’) - +‘l O’ (‘magit-reflog-other’) Display the reflog of a branch or another ref. -‘l H’ (‘magit-reflog-head’) - +‘l H’ (‘magit-reflog-head’) Display the ‘HEAD’ reflog. -- User Option: magit-reflog-margin - This option specifies whether the margin is initially shown in Magit-Reflog mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -3453,14 +3288,11 @@ Also see *note (gitman)git-reflog::. show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -3482,20 +3314,17 @@ for multiple "upstreams" at once. Also see *note (gitman)git-reflog::. -‘Y’ (‘magit-cherry’) - +‘Y’ (‘magit-cherry’) Show commits that are in a certain branch but that have not been merged in the upstream branch. -- User Option: magit-cherry-margin - This option specifies whether the margin is initially shown in Magit-Cherry mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -3503,14 +3332,11 @@ for multiple "upstreams" at once. show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -3536,18 +3362,15 @@ Buffer Variables::). Also see *note (gitman)git-diff::. -‘d’ (‘magit-diff’) - +‘d’ (‘magit-diff’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘d d’ (‘magit-diff-dwim’) - +‘d d’ (‘magit-diff-dwim’) Show changes for the thing at point. -‘d r’ (‘magit-diff-range’) - +‘d r’ (‘magit-diff-range’) Show differences between two commits. RANGE should be a range (A..B or A...B) but can also be a single @@ -3560,37 +3383,31 @@ Buffer Variables::). revisions, choose a revision to view changes along, starting at the common ancestor of both revisions (i.e., use a "..." range). -‘d w’ (‘magit-diff-working-tree’) - +‘d w’ (‘magit-diff-working-tree’) Show changes between the current working tree and the ‘HEAD’ commit. With a prefix argument show changes between the working tree and a commit read from the minibuffer. -‘d s’ (‘magit-diff-staged’) - +‘d s’ (‘magit-diff-staged’) Show changes between the index and the ‘HEAD’ commit. With a prefix argument show changes between the index and a commit read from the minibuffer. -‘d u’ (‘magit-diff-unstaged’) - +‘d u’ (‘magit-diff-unstaged’) Show changes between the working tree and the index. -‘d p’ (‘magit-diff-paths’) - +‘d p’ (‘magit-diff-paths’) Show changes between any two files on disk. All of the above suffix commands update the repository’s diff buffer. The diff transient also features two commands which show differences in another buffer: -‘d c’ (‘magit-show-commit’) - +‘d c’ (‘magit-show-commit’) Show the commit at point. If there is no commit at point or with a prefix argument, prompt for a commit. -‘d t’ (‘magit-stash-show’) - +‘d t’ (‘magit-stash-show’) Show all diffs of a stash in a buffer. Two additional commands that show the diff for the file or blob that @@ -3615,48 +3432,40 @@ to change the diff arguments used in the current buffer, without changing which diff is shown. This works in dedicated diff buffers, but also in the status buffer. -‘D’ (‘magit-diff-refresh’) - +‘D’ (‘magit-diff-refresh’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘D g’ (‘magit-diff-refresh’) - +‘D g’ (‘magit-diff-refresh’) This suffix command sets the local diff arguments for the current buffer. -‘D s’ (‘magit-diff-set-default-arguments’) - +‘D s’ (‘magit-diff-set-default-arguments’) This suffix command sets the default diff arguments for buffers of the same type as that of the current buffer. Other existing buffers of the same type are not affected because their local values have already been initialized. -‘D w’ (‘magit-diff-save-default-arguments’) - +‘D w’ (‘magit-diff-save-default-arguments’) This suffix command sets the default diff arguments for buffers of the same type as that of the current buffer, and saves the value for future sessions. Other existing buffers of the same type are not affected because their local values have already been initialized. -‘D t’ (‘magit-diff-toggle-refine-hunk’) - +‘D t’ (‘magit-diff-toggle-refine-hunk’) This command toggles hunk refinement on or off. -‘D r’ (‘magit-diff-switch-range-type’) - +‘D r’ (‘magit-diff-switch-range-type’) This command converts the diff range type from "revA..revB" to "revB...revA", or vice versa. -‘D f’ (‘magit-diff-flip-revs’) - +‘D f’ (‘magit-diff-flip-revs’) This command swaps revisions in the diff range from "revA..revB" to "revB..revA", or vice versa. -‘D F’ (‘magit-diff-toggle-file-filter’) - +‘D F’ (‘magit-diff-toggle-file-filter’) This command toggles the file restriction of the diffs in the current buffer, allowing you to quickly switch between viewing all the changes in the commit and the restricted subset. As a special @@ -3669,24 +3478,20 @@ also in the status buffer. supported arguments, there also exist some commands that change only a particular argument. -‘-’ (‘magit-diff-less-context’) - +‘-’ (‘magit-diff-less-context’) This command decreases the context for diff hunks by COUNT lines. -‘+’ (‘magit-diff-more-context’) - +‘+’ (‘magit-diff-more-context’) This command increases the context for diff hunks by COUNT lines. -‘0’ (‘magit-diff-default-context’) - +‘0’ (‘magit-diff-default-context’) This command resets the context for diff hunks to the default height. The following commands quickly change what diff is being displayed without having to using one of the diff transient. -‘C-c C-d’ (‘magit-diff-while-committing’) - +‘C-c C-d’ (‘magit-diff-while-committing’) While committing, this command shows the changes that are about to be committed. While amending, invoking the command again toggles between showing just the new changes or all the changes that will @@ -3695,12 +3500,10 @@ without having to using one of the diff transient. This binding is available in the diff buffer as well as the commit message buffer. -‘C-c C-b’ (‘magit-go-backward’) - +‘C-c C-b’ (‘magit-go-backward’) This command moves backward in current buffer’s history. -‘C-c C-f’ (‘magit-go-forward’) - +‘C-c C-f’ (‘magit-go-forward’) This command moves forward in current buffer’s history.  @@ -3717,19 +3520,16 @@ version of the file that the diff at point is about. Likewise version of the file that the diff at point is about. See *note Visiting Files and Blobs from a Diff:: for more information and the key bindings. -‘C-c C-t’ (‘magit-diff-trace-definition’) - +‘C-c C-t’ (‘magit-diff-trace-definition’) This command shows a log for the definition at point. -- User Option: magit-log-trace-definition-function - The function specified by this option is used by ‘magit-log-trace-definition’ to determine the function at point. For major-modes that have special needs, you could set the local value using the mode’s hook. -‘C-c C-e’ (‘magit-diff-edit-hunk-commit’) - +‘C-c C-e’ (‘magit-diff-edit-hunk-commit’) From a hunk, this command edits the respective commit and visits the file. @@ -3748,8 +3548,7 @@ Files and Blobs from a Diff:: for more information and the key bindings. rebase. If that is undesirable, then it might be better to use ‘magit-rebase-edit-command’ instead of this command. -‘j’ (‘magit-jump-to-diffstat-or-diff’) - +‘j’ (‘magit-jump-to-diffstat-or-diff’) This command jumps to the diffstat or diff. When point is on a file inside the diffstat section, then jump to the respective diff section. Otherwise, jump to the diffstat section or a child @@ -3759,12 +3558,10 @@ Files and Blobs from a Diff:: for more information and the key bindings. Magit buffer for that matter), but it might be worth pointing out that they are available here too. -‘SPC’ (‘scroll-up’) - +‘’ (‘scroll-up’) This command scrolls text upward. -‘DEL’ (‘scroll-down’) - +‘’ (‘scroll-down’) This command scrolls text downward.  @@ -3774,22 +3571,17 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A ------------------ -- User Option: magit-diff-refine-hunk - Whether to show word-granularity differences within diff hunks. • ‘nil’ Never show fine differences. - • ‘t’ Show fine differences for the current diff hunk only. - • ‘all’ Show fine differences for all displayed diff hunks. -- User Option: magit-diff-refine-ignore-whitespace - Whether to ignore whitespace changes in word-granularity differences. -- User Option: magit-diff-adjust-tab-width - Whether to adjust the width of tabs in diffs. Determining the correct width can be expensive if it requires @@ -3811,7 +3603,6 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A bytes. -- User Option: magit-diff-paint-whitespace - Specify where to highlight whitespace errors. See ‘magit-diff-highlight-trailing’, @@ -3820,30 +3611,23 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A nowhere. • ‘nil’ Never highlight whitespace errors. - • ‘t’ Highlight whitespace errors everywhere. - • ‘uncommitted’ Only highlight whitespace errors in diffs showing uncommitted changes. For backward compatibility ‘status’ is treated as a synonym. -- User Option: magit-diff-paint-whitespace-lines - Specify in what kind of lines to highlight whitespace errors. • ‘t’ Highlight only in added lines. - • ‘both’ Highlight in added and removed lines. - • ‘all’ Highlight in added, removed and context lines. -- 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. -- 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. @@ -3858,11 +3642,9 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A spaces. Otherwise, highlight neither. -- User Option: magit-diff-hide-trailing-cr-characters - Whether to hide ^M characters at the end of a line in diffs. -- User Option: magit-diff-highlight-hunk-region-functions - This option specifies the functions used to highlight the hunk-internal region. @@ -3888,7 +3670,6 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A calling the face function instead. -- User Option: magit-diff-unmarked-lines-keep-foreground - This option controls whether added and removed lines outside the hunk-internal region only lose their distinct background color or also the foreground color. Whether the outside of the region is @@ -3896,7 +3677,6 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Commands A ‘magit-diff-highlight-hunk-region-functions’. -- User Option: magit-diff-extra-stat-arguments - This option specifies additional arguments to be used alongside ‘--stat’. @@ -3913,20 +3693,15 @@ File: magit.info, Node: Revision Buffer, Prev: Diff Options, Up: Diffing --------------------- -- User Option: magit-revision-insert-related-refs - Whether to show related branches in revision buffers. • ‘nil’ Don’t show any related branches. - • ‘t’ Show related local branches. - • ‘all’ Show related local and remote branches. - • ‘mixed’ Show all containing branches and local merged branches. -- User Option: magit-revision-show-gravatars - Whether to show gravatar images in revision buffers. If ‘nil’, then don’t insert any gravatar images. If ‘t’, then @@ -3943,7 +3718,6 @@ File: magit.info, Node: Revision Buffer, Prev: Diff Options, Up: Diffing 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 @@ -3951,12 +3725,9 @@ File: magit.info, Node: Revision Buffer, Prev: Diff Options, Up: Diffing performance and reliability: • ‘slow’ calls git for every word to be absolutely sure. - • ‘quick’ skips words less than seven characters long. - • ‘quicker’ additionally skips words that don’t contain a number. - • ‘quickest’ uses all words that are at least seven characters long and which contain at least one number as well as at least one letter. @@ -3971,7 +3742,6 @@ file restriction as that log buffer (also see the command ‘magit-diff-toggle-file-filter’). -- User Option: magit-revision-filter-files-on-follow - Whether showing a commit from a log buffer honors the log’s file filter when the log arguments include ‘--follow’. @@ -3998,8 +3768,7 @@ File: magit.info, Node: Ediffing, Next: References Buffer, Prev: Diffing, Up This section describes how to enter Ediff from Magit buffers. For information on how to use Ediff itself, see *note (ediff)Top::. -‘e’ (‘magit-ediff-dwim’) - +‘e’ (‘magit-ediff-dwim’) Compare, stage, or resolve using Ediff. This command tries to guess what file, and what commit or range the @@ -4010,13 +3779,11 @@ information on how to use Ediff itself, see *note (ediff)Top::. be used explicitly. If it cannot read the user’s mind at all, then it asks the user for a command to run. -‘E’ (‘magit-ediff’) - +‘E’ (‘magit-ediff’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. -‘E r’ (‘magit-ediff-compare’) - +‘E r’ (‘magit-ediff-compare’) Compare two revisions of a file using Ediff. If the region is active, use the revisions on the first and last @@ -4024,8 +3791,7 @@ information on how to use Ediff itself, see *note (ediff)Top::. revisions, choose a revision to view changes along, starting at the common ancestor of both revisions (i.e., use a "..." range). -‘E m’ (‘magit-ediff-resolve’) - +‘E m’ (‘magit-ediff-resolve’) Resolve outstanding conflicts in a file using Ediff, defaulting to the file at point. @@ -4037,33 +3803,26 @@ information on how to use Ediff itself, see *note (ediff)Top::. including those already resolved by Git, use ‘ediff-merge-revisions-with-ancestor’. -‘E s’ (‘magit-ediff-stage’) - +‘E s’ (‘magit-ediff-stage’) Stage and unstage changes to a file using Ediff, defaulting to the file at point. -‘E u’ (‘magit-ediff-show-unstaged’) - +‘E u’ (‘magit-ediff-show-unstaged’) Show unstaged changes to a file using Ediff. -‘E i’ (‘magit-ediff-show-staged’) - +‘E i’ (‘magit-ediff-show-staged’) Show staged changes to a file using Ediff. -‘E w’ (‘magit-ediff-show-working-tree’) - +‘E w’ (‘magit-ediff-show-working-tree’) Show changes in a file between ‘HEAD’ and working tree using Ediff. -‘E c’ (‘magit-ediff-show-commit’) - +‘E c’ (‘magit-ediff-show-commit’) Show changes to a file introduced by a commit using Ediff. -‘E z’ (‘magit-ediff-show-stash’) - +‘E z’ (‘magit-ediff-show-stash’) Show changes to a file introduced by a stash using Ediff. -- 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 ‘magit-ediff-stage’. Otherwise, use ‘magit-ediff-show-staged’ and @@ -4071,14 +3830,12 @@ information on how to use Ediff itself, see *note (ediff)Top::. respectively. -- User Option: magit-ediff-show-stash-with-index - This option controls whether ‘magit-ediff-show-stash’ includes a buffer containing the file’s state in the index at the time the stash was created. This makes it possible to tell which changes in the stash were staged. -- User Option: magit-ediff-quit-hook - This hook is run after quitting an Ediff session that was created using a Magit command. The hook functions are run inside the Ediff control buffer, and should not change the current buffer. @@ -4093,8 +3850,7 @@ File: magit.info, Node: References Buffer, Next: Bisecting, Prev: Ediffing, 5.6 References Buffer ===================== -‘y’ (‘magit-show-refs’) - +‘y’ (‘magit-show-refs’) This command lists branches and tags in a dedicated buffer. However if this command is invoked again from this buffer or if it @@ -4108,36 +3864,32 @@ by changing the value of ‘magit-refs-show-commit-count’ (see below). These commands specify a different branch or commit against which all the other references are compared. -‘y y’ (‘magit-show-refs-head’) - +‘y y’ (‘magit-show-refs-head’) This command lists branches and tags in a dedicated buffer. Each reference is being compared with ‘HEAD’. -‘y c’ (‘magit-show-refs-current’) - +‘y c’ (‘magit-show-refs-current’) This command lists branches and tags in a dedicated buffer. Each reference is being compared with the current branch or ‘HEAD’ if it is detached. -‘y o’ (‘magit-show-refs-other’) - +‘y o’ (‘magit-show-refs-other’) This command lists branches and tags in a dedicated buffer. Each reference is being compared with a branch read from the user. - -- User Option: magit-refs-show-commit-count +‘y r’ (‘magit-refs-set-show-commit-count’) + This command changes for which refs the commit count is shown. + -- User Option: magit-refs-show-commit-count Whether to show commit counts in Magit-Refs mode buffers. • ‘all’ Show counts for branches and tags. - • ‘branch’ Show counts for branches only. - • ‘nil’ Never show counts. The default is ‘nil’ because anything else can be very expensive. -- User Option: magit-refs-pad-commit-counts - Whether to pad all commit counts on all sides in Magit-Refs mode buffers. @@ -4150,14 +3902,12 @@ the other references are compared. commit counts. -- User Option: magit-refs-show-remote-prefix - Whether to show the remote prefix in lists of remote branches. Showing the prefix is redundant because the name of the remote is already shown in the heading preceding the list of its branches. -- User Option: magit-refs-primary-column-width - Width of the primary column in ‘magit-refs-mode’ buffers. The primary column is the column that contains the name of the branch that the current row is about. @@ -4170,7 +3920,6 @@ the other references are compared. taken into account when calculating to optimal width.) -- User Option: magit-refs-focus-column-width - Width of the focus column in ‘magit-refs-mode’ buffers. The focus column is the first column, which marks one branch @@ -4185,14 +3934,12 @@ the other references are compared. the verbosity of this column. -- User Option: magit-refs-margin - This option specifies whether the margin is initially shown in Magit-Refs mode buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -4200,20 +3947,16 @@ the other references are compared. show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. -- User Option: magit-refs-margin-for-tags - This option specifies whether to show information about tags in the margin. This is disabled by default because it is slow if there are many tags. @@ -4224,30 +3967,21 @@ you should also change the others to keep things aligned. The following %-sequences are supported: • ‘%a’ Number of commits this ref has over the one we compare to. - • ‘%b’ Number of commits the ref we compare to has over this one. - • ‘%c’ Number of commits this ref has over the one we compare to. For the ref which all other refs are compared this is instead "@", if it is the current branch, or "#" otherwise. - • ‘%C’ For the ref which all other refs are compared this is "@", if it is the current branch, or "#" otherwise. For all other refs " ". - • ‘%h’ Hash of this ref’s tip. - • ‘%m’ Commit summary of the tip of this ref. - • ‘%n’ Name of this ref. - • ‘%u’ Upstream of this local branch. - • ‘%U’ Upstream of this local branch and additional local vs. upstream information. -- User Option: magit-refs-filter-alist - The purpose of this option is to forgo displaying certain refs based on their name. If you want to not display any refs of a certain type, then you should remove the appropriate function from @@ -4268,8 +4002,7 @@ you should also change the others to keep things aligned. The following displayed as just "master", however for this comparison the former is used. -‘RET’ (‘magit-visit-ref’) - +‘’ (‘magit-visit-ref’) This command visits the reference or revision at point in another buffer. If there is no revision at point or with a prefix argument then it prompts for a revision. @@ -4280,7 +4013,6 @@ you should also change the others to keep things aligned. The following you have customized the option ‘magit-visit-ref-behavior’. -- User Option: magit-visit-ref-behavior - This option controls how ‘magit-visit-ref’ behaves in ‘magit-refs-mode’ buffers. @@ -4361,19 +4093,15 @@ customize this hook than it does for the respective hook used for the status buffer. -- User Option: magit-refs-sections-hook - Hook run to insert sections into a references buffer. -- Function: magit-insert-local-branches - Insert sections showing all local branches. -- Function: magit-insert-remote-branches - Insert sections showing all remote-tracking branches. -- Function: magit-insert-tags - Insert sections showing all tags.  @@ -4384,16 +4112,14 @@ File: magit.info, Node: Bisecting, Next: Visiting Files and Blobs, Prev: Refe Also see *note (gitman)git-bisect::. -‘B’ (‘magit-bisect’) - +‘B’ (‘magit-bisect’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. When bisecting is not in progress, then the transient features the following suffix commands. -‘B B’ (‘magit-bisect-start’) - +‘B B’ (‘magit-bisect-start’) Start a bisect session. Bisecting a bug means to find the commit that introduced it. This @@ -4403,38 +4129,32 @@ following suffix commands. conceptually more fitting than "bad" and "good", but the infix arguments to do so are disabled by default. -‘B s’ (‘magit-bisect-run’) - +‘B s’ (‘magit-bisect-run’) Bisect automatically by running commands after each step. When bisecting in progress, then the transient instead features the following suffix commands. -‘B b’ (‘magit-bisect-bad’) - +‘B b’ (‘magit-bisect-bad’) Mark the current commit as bad. Use this after you have asserted that the commit does contain the bug in question. -‘B g’ (‘magit-bisect-good’) - +‘B g’ (‘magit-bisect-good’) Mark the current commit as good. Use this after you have asserted that the commit does not contain the bug in question. -‘B m’ (‘magit-bisect-mark’) - +‘B m’ (‘magit-bisect-mark’) Mark the current commit with one of the bisect terms. This command provides an alternative to ‘magit-bisect-bad’ and ‘magit-bisect-good’ and is useful when using terms other than "bad" and "good". This suffix is disabled by default. -‘B k’ (‘magit-bisect-skip’) - +‘B k’ (‘magit-bisect-skip’) Skip the current commit. Use this if for some reason the current commit is not a good one to test. This command lets Git choose a different one. -‘B r’ (‘magit-bisect-reset’) - +‘B r’ (‘magit-bisect-reset’) After bisecting, cleanup bisection state and return to original ‘HEAD’. @@ -4442,7 +4162,6 @@ following suffix commands. bisect session. -- User Option: magit-bisect-show-graph - This option controls whether a graph is displayed for the log of commits that still have to be bisected. @@ -4472,19 +4191,16 @@ These commands can be used anywhere to open any blob. Currently no keys are bound to these commands by default, but that is likely to change. -- Command: magit-find-file - This command reads a filename and revision from the user and visits the respective blob in a buffer. The buffer is displayed in the selected window. -- Command: magit-find-file-other-window - This command reads a filename and revision from the user and visits the respective blob in a buffer. The buffer is displayed in another window. -- Command: magit-find-file-other-frame - This command reads a filename and revision from the user and visits the respective blob in a buffer. The buffer is displayed in another frame. @@ -4497,8 +4213,7 @@ File: magit.info, Node: Visiting Files and Blobs from a Diff, Prev: General-Pu These commands can only be used when point is inside a diff. -‘RET’ (‘magit-diff-visit-file’) - +‘’ (‘magit-diff-visit-file’) This command visits the appropriate version of the file that the diff at point is about. @@ -4507,17 +4222,17 @@ These commands can only be used when point is inside a diff. being visited. The visited version depends on what changes the diff is about. - • If the diff shows uncommitted changes (i.e. staged or + 1. If the diff shows uncommitted changes (i.e. staged or unstaged changes), then visit the file in the working tree (i.e. the same "real" file that ‘find-file’ would visit. In all other cases visit a "blob" (i.e. the version of a file as stored in some commit). - • If point is on a removed line, then visit the blob for the + 2. If point is on a removed line, then visit the blob for the first parent of the commit that removed that line, i.e. the last commit where that line still exists. - • If point is on an added or context line, then visit the blob + 3. If point is on an added or context line, then visit the blob that adds that line, or if the diff shows from more than a single commit, then visit the blob from the last of these commits. @@ -4529,7 +4244,6 @@ These commands can only be used when point is inside a diff. argument the buffer is displayed in another window instead. -- User Option: magit-diff-visit-previous-blob - This option controls whether ‘magit-diff-visit-file’ may visit the previous blob. When this is ‘t’ (the default) and point is on a removed line in a diff for a committed change, then @@ -4540,8 +4254,7 @@ These commands can only be used when point is inside a diff. and unstaged changes ‘magit-diff-visit-file’ always visits the file in the working tree. -‘C-’ (‘magit-diff-visit-file-worktree’) - +‘C-’ (‘magit-diff-visit-file-worktree’) This command visits the worktree version of the appropriate file. The location of point inside the diff determines which file is being visited. Unlike ‘magit-diff-visit-file’ it always visits the @@ -4585,8 +4298,7 @@ to enter the blaming sub-transient first. The key bindings shown below assume that you enter the dispatch transient using the default binding. -‘C-c M-g B’ (‘magit-blame’) - +‘C-c M-g B’ (‘magit-blame’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -4596,9 +4308,8 @@ times. For example if ‘magit-blame-mode’ is not enabled, then the command whose purpose is to turn off that mode would not be of any use and therefore isn’t available. -‘C-c M-g b’ (‘magit-blame-addition’) -‘C-c M-g B b’ (‘magit-blame-addition’) - +‘C-c M-g b’ (‘magit-blame-addition’) +‘C-c M-g B b’ This command augments each line or chunk of lines in the current file-visiting or blob-visiting buffer with information about what commits last touched these lines. @@ -4612,27 +4323,24 @@ and therefore isn’t available. ‘magit-find-file’), where REVISION is a parent of the revision that added the current line or chunk of lines. -‘C-c M-g r’ (‘magit-blame-removal’) -‘C-c M-g B r’ (‘magit-blame-removal’) - +‘C-c M-g r’ (‘magit-blame-removal’) +‘C-c M-g B r’ This command augments each line or chunk of lines in the current blob-visiting buffer with information about the revision that removes it. It cannot be used in file-visiting buffers. Like ‘magit-blame-addition’, this command can be used recursively. -‘C-c M-g f’ (‘magit-blame-reverse’) -‘C-c M-g B f’ (‘magit-blame-reverse’) - +‘C-c M-g f’ (‘magit-blame-reverse’) +‘C-c M-g B f’ This command augments each line or chunk of lines in the current file-visiting or blob-visiting buffer with information about the last revision in which a line still existed. Like ‘magit-blame-addition’, this command can be used recursively. -‘C-c M-g e’ (‘magit-blame-echo’) -‘C-c M-g B e’ (‘magit-blame-echo’) - +‘C-c M-g e’ (‘magit-blame-echo’) +‘C-c M-g B e’ This command is like ‘magit-blame-addition’ except that it doesn’t turn on ‘read-only-mode’ and that it initially uses the visualization style specified by option ‘magit-blame-echo-style’. @@ -4642,12 +4350,10 @@ enabled and Read-Only mode is not enabled. These commands are also available in other buffers; here only the behavior is described that is relevant in file-visiting buffers that are being blamed. -‘RET’ (‘magit-show-commit’) - +‘’ (‘magit-show-commit’) This command shows the commit that last touched the line at point. -‘SPC’ (‘magit-diff-show-or-scroll-up’) - +‘’ (‘magit-diff-show-or-scroll-up’) This command updates the commit buffer. This either shows the commit that last touched the line at point in @@ -4656,8 +4362,7 @@ relevant in file-visiting buffers that are being blamed. information about that commit, then the buffer is scrolled up instead. -‘DEL’ (‘magit-diff-show-or-scroll-down’) - +‘’ (‘magit-diff-show-or-scroll-down’) This command updates the commit buffer. This either shows the commit that last touched the line at point in @@ -4669,41 +4374,33 @@ relevant in file-visiting buffers that are being blamed. The following key bindings are available when both Magit-Blame mode and Read-Only mode are enabled. -‘b’ (‘magit-blame’) - +‘b’ (‘magit-blame’) See above. -‘n’ (‘magit-blame-next-chunk’) - +‘n’ (‘magit-blame-next-chunk’) This command moves to the next chunk. -‘N’ (‘magit-blame-next-chunk-same-commit’) - +‘N’ (‘magit-blame-next-chunk-same-commit’) This command moves to the next chunk from the same commit. -‘p’ (‘magit-blame-previous-chunk’) - +‘p’ (‘magit-blame-previous-chunk’) This command moves to the previous chunk. -‘P’ (‘magit-blame-previous-chunk-same-commit’) - +‘P’ (‘magit-blame-previous-chunk-same-commit’) This command moves to the previous chunk from the same commit. -‘q’ (‘magit-blame-quit’) - +‘q’ (‘magit-blame-quit’) This command turns off Magit-Blame mode. If the buffer was created during a recursive blame, then it also kills the buffer. -‘M-w’ (‘magit-blame-copy-hash’) - +‘M-w’ (‘magit-blame-copy-hash’) This command saves the hash of the current chunk’s commit to the kill ring. When the region is active, the command saves the region’s content instead of the hash, like ‘kill-ring-save’ would. -‘c’ (‘magit-blame-cycle-style’) - +‘c’ (‘magit-blame-cycle-style’) This command changes how blame information is visualized in the current buffer by cycling through the styles specified using the option ‘magit-blame-styles’. @@ -4711,35 +4408,29 @@ and Read-Only mode are enabled. Blaming is also controlled using the following options. -- User Option: magit-blame-styles - This option defines a list of styles used to visualize blame information. For now see its doc-string to learn more. -- User Option: magit-blame-echo-style - This option specifies the blame visualization style used by the command ‘magit-blame-echo’. This must be a symbol that is used as the identifier for one of the styles defined in ‘magit-blame-styles’. -- User Option: magit-blame-time-format - This option specifies the format string used to display times when showing blame information. -- User Option: magit-blame-read-only - This option controls whether blaming a buffer also makes temporarily read-only. -- User Option: magit-blame-disable-modes - This option lists incompatible minor-modes that should be disabled temporarily when a buffer contains blame information. They are enabled again when the buffer no longer shows blame information. -- User Option: magit-blame-goto-chunk-hook - This hook is run when moving between chunks.  @@ -4769,8 +4460,7 @@ File: magit.info, Node: Creating Repository, Next: Cloning Repository, Up: Ma 6.1 Creating Repository ======================= -‘M-x magit-init’ (‘magit-init’) - +‘I’ (‘magit-init’) This command initializes a repository and then shows the status buffer for the new repository. @@ -4792,15 +4482,13 @@ can invoke ‘git clone’ directly, depending on whether a prefix argument is used and on the value of ‘magit-clone-always-transient’. -- User Option: magit-clone-always-transient - This option controls whether the command ‘magit-clone’ always acts as a transient prefix command, regardless of whether a prefix argument is used or not. If ‘t’, then that command always acts as a transient prefix. If ‘nil’, then a prefix argument has to be used for it to act as a transient. -‘C’ (‘magit-clone’) - +‘C’ (‘magit-clone’) This command either acts as a transient prefix command as described above or does the same thing as ‘transient-clone-regular’ as described below. @@ -4808,47 +4496,40 @@ is used and on the value of ‘magit-clone-always-transient’. If it acts as a transient prefix, then it binds the following suffix commands and several infix arguments. -‘C C’ (‘magit-clone-regular’) - +‘C C’ (‘magit-clone-regular’) This command creates a regular clone of an existing repository. The repository and the target directory are read from the user. -‘C s’ (‘magit-clone-shallow’) - +‘C s’ (‘magit-clone-shallow’) This command creates a shallow clone of an existing repository. The repository and the target directory are read from the user. By default the depth of the cloned history is a single commit, but with a prefix argument the depth is read from the user. -‘C b’ (‘magit-clone-bare’) - +‘C b’ (‘magit-clone-bare’) This command creates a bare clone of an existing repository. The repository and the target directory are read from the user. -‘C m’ (‘magit-clone-mirror’) - +‘C m’ (‘magit-clone-mirror’) This command creates a mirror of an existing repository. The repository and the target directory are read from the user. The following suffixes are disabled by default. See *note (transient)Enabling and Disabling Suffixes:: for how to enable them. -‘C d’ (‘magit-clone-shallow-since’) - +‘C d’ (‘magit-clone-shallow-since’) This command creates a shallow clone of an existing repository. Only commits that were committed after a date are cloned, which is read from the user. The repository and the target directory are also read from the user. -‘C e’ (‘magit-clone-shallow-exclude’) - +‘C e’ (‘magit-clone-shallow-exclude’) This command creates a shallow clone of an existing repository. This reads a branch or tag from the user. Commits that are reachable from that are not cloned. The repository and the target directory are also read from the user. -- User Option: magit-clone-set-remote-head - This option controls whether cloning causes the reference ‘refs/remotes//HEAD’ to be created in the clone. The default is to delete the reference after running ‘git clone’, which @@ -4858,32 +4539,25 @@ is used and on the value of ‘magit-clone-always-transient’. preserves Git’s default behavior of creating the reference. -- User Option: magit-clone-set-remote.pushDefault - This option controls whether the value of the Git variable ‘remote.pushDefault’ is set after cloning. • If ‘t’, then it is always set without asking. - • If ‘ask’, then the users are asked every time they clone a repository. - • If ‘nil’, then it is never set. -- User Option: magit-clone-default-directory - This option control the default directory name used when reading the destination for a cloning operation. • If ‘nil’ (the default), then the value of ‘default-directory’ is used. - • If a directory, then that is used. - • If a function, then that is called with the remote url as the only argument and the returned value is used. -- User Option: magit-clone-name-alist - This option maps regular expressions, which match repository names, to repository urls, making it possible for users to enter short names instead of urls when cloning repositories. @@ -4904,7 +4578,6 @@ is used and on the value of ‘magit-clone-always-transient’. the username itself. -- User Option: magit-clone-url-format - The format specified by this option is used when turning repository names into urls. ‘%h’ is the hostname and ‘%n’ is the repository name, including the name of the owner. @@ -4937,23 +4610,20 @@ apply variants are described in the next section. You can also use Ediff to stage and unstage. See *note Ediffing::. -‘s’ (‘magit-stage’) - +‘s’ (‘magit-stage’) Add the change at point to the staging area. With a prefix argument and an untracked file (or files) at point, stage the file but not its content. This makes it possible to stage only a subset of the new file’s changes. -‘S’ (‘magit-stage-modified’) - +‘S’ (‘magit-stage-modified’) Stage all changes to files modified in the worktree. Stage all new content of tracked files and remove tracked files that no longer exist in the working tree from the index also. With a prefix argument also stage previously untracked (but not ignored) files. -‘u’ (‘magit-unstage’) - +‘u’ (‘magit-unstage’) Remove the change at point from the staging area. Only staged changes can be unstaged. But by default this command @@ -4961,18 +4631,15 @@ apply variants are described in the next section. is called on a committed change: it reverses the change in the index but not in the working tree. -‘U’ (‘magit-unstage-all’) - +‘U’ (‘magit-unstage-all’) Remove all changes from the staging area. -- User Option: magit-unstage-committed - This option controls whether ‘magit-unstage’ "unstages" committed changes by reversing them in the index but not the working tree. The alternative is to raise an error. -‘M-x magit-reverse-in-index’ (‘magit-reverse-in-index’) - +‘M-x magit-reverse-in-index’ This command reverses the committed change at point in the index but not the working tree. By default no key is bound directly to this command, but it is indirectly called when ‘u’ @@ -4982,22 +4649,17 @@ apply variants are described in the next section. the working tree, so that it can later be committed using a separate commit. A typical workflow would be: - • Optionally make sure that there are no uncommitted changes. - - • Visit the ‘HEAD’ commit and navigate to the change that should + 1. Optionally make sure that there are no uncommitted changes. + 2. Visit the ‘HEAD’ commit and navigate to the change that should not have been included in that commit. - - • Type ‘u’ (‘magit-unstage’) to reverse it in the index. This + 3. Type ‘u’ (‘magit-unstage’) to reverse it in the index. This assumes that ‘magit-unstage-committed-changes’ is non-nil. - - • Type ‘c e’ to extend ‘HEAD’ with the staged changes, including + 4. Type ‘c e’ to extend ‘HEAD’ with the staged changes, including those that were already staged before. - - • Optionally stage the remaining changes using ‘s’ or ‘S’ and + 5. Optionally stage the remaining changes using ‘s’ or ‘S’ and then type ‘c c’ to create a new commit. -‘M-x magit-reset-index’ (‘magit-reset-index’) - +‘M-x magit-reset-index’ Reset the index to some commit. The commit is read from the user and defaults to the commit at point. If there is no commit at point, then it defaults to ‘HEAD’. @@ -5016,16 +4678,14 @@ Fine-grained un-/staging has to be done from the status or a diff buffer, but it’s also possible to un-/stage all changes made to the file visited in the current buffer right from inside that buffer. -‘M-x magit-stage-file’ (‘magit-stage-file’) - +‘M-x magit-stage-file’ When invoked inside a file-visiting buffer, then stage all changes to that file. In a Magit buffer, stage the file at point if any. Otherwise prompt for a file to be staged. With a prefix argument always prompt the user for a file, even in a file-visiting buffer or when there is a file section at point. -‘M-x magit-unstage-file’ (‘magit-unstage-file’) - +‘M-x magit-unstage-file’ When invoked inside a file-visiting buffer, then unstage all changes to that file. In a Magit buffer, unstage the file at point if any. Otherwise prompt for a file to be unstaged. With a prefix @@ -5065,19 +4725,20 @@ are all implemented using ‘git apply’, which is why they are called What follows are the commands which implement the remaining apply variants. -‘a’ (‘magit-apply’) - +‘a’ (‘magit-apply’) Apply the change at point to the working tree. With a prefix argument fallback to a 3-way merge. Doing so causes the change to be applied to the index as well. -‘k’ (‘magit-discard’) - +‘k’ (‘magit-discard’) Remove the change at point from the working tree. -‘v’ (‘magit-reverse’) + On a hunk or file with unresolved conflicts prompt which side to + keep (while discarding the other). If point is within the text of + a side, then keep that side without prompting. +‘v’ (‘magit-reverse’) Reverse the change at point in the working tree. With a prefix argument fallback to a 3-way merge. Doing so causes @@ -5112,23 +4773,19 @@ File: magit.info, Node: Initiating a Commit, Next: Editing Commit Messages, U Also see *note (gitman)git-commit::. -‘c’ (‘magit-commit’) - +‘c’ (‘magit-commit’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘c c’ (‘magit-commit-create’) - +‘c c’ (‘magit-commit-create’) Create a new commit on ‘HEAD’. With a prefix argument amend to the commit at ‘HEAD’ instead. -‘c a’ (‘magit-commit-amend’) - +‘c a’ (‘magit-commit-amend’) Amend the last commit. -‘c e’ (‘magit-commit-extend’) - +‘c e’ (‘magit-commit-extend’) Amend the last commit, without editing the message. With a prefix argument keep the committer date, otherwise change it. The option ‘magit-commit-extend-override-date’ can be used to inverse the @@ -5137,8 +4794,7 @@ Also see *note (gitman)git-commit::. Non-interactively respect the optional OVERRIDE-DATE argument and ignore the option. -‘c w’ (‘magit-commit-reword’) - +‘c w’ (‘magit-commit-reword’) Reword the last commit, ignoring staged changes. With a prefix argument keep the committer date, otherwise change it. The option ‘magit-commit-reword-override-date’ can be used to inverse the @@ -5147,32 +4803,27 @@ Also see *note (gitman)git-commit::. Non-interactively respect the optional OVERRIDE-DATE argument and ignore the option. -‘c f’ (‘magit-commit-fixup’) - +‘c f’ (‘magit-commit-fixup’) Create a fixup commit. With a prefix argument the target commit has to be confirmed. Otherwise the commit at point may be used without confirmation depending on the value of option ‘magit-commit-squash-confirm’. -‘c F’ (‘magit-commit-instant-fixup’) - +‘c F’ (‘magit-commit-instant-fixup’) Create a fixup commit and instantly rebase. -‘c s’ (‘magit-commit-squash’) - +‘c s’ (‘magit-commit-squash’) Create a squash commit, without editing the squash message. With a prefix argument the target commit has to be confirmed. Otherwise the commit at point may be used without confirmation depending on the value of option ‘magit-commit-squash-confirm’. -‘c S’ (‘magit-commit-instant-squash’) - +‘c S’ (‘magit-commit-instant-squash’) Create a squash commit and instantly rebase. -‘c A’ (‘magit-commit-augment’) - +‘c A’ (‘magit-commit-augment’) Create a squash commit, editing the squash message. With a prefix argument the target commit has to be confirmed. @@ -5180,24 +4831,19 @@ Also see *note (gitman)git-commit::. depending on the value of option ‘magit-commit-squash-confirm’. -- User Option: magit-commit-ask-to-stage - Whether to ask to stage all unstaged changes when committing and nothing is staged. -- User Option: magit-commit-show-diff - Whether the relevant diff is automatically shown when committing. -- User Option: magit-commit-extend-override-date - Whether using ‘magit-commit-extend’ changes the committer date. -- User Option: magit-commit-reword-override-date - Whether using ‘magit-commit-reword’ changes the committer date. -- 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. This option @@ -5206,7 +4852,6 @@ Also see *note (gitman)git-commit::. error while using those is harder to recover from. -- User Option: magit-post-commit-hook - Hook run after creating a commit without the user editing a message. @@ -5217,6 +4862,32 @@ Also see *note (gitman)git-commit::. Also see ‘git-commit-post-finish-hook’. + -- User Option: magit-commit-diff-inhibit-same-window + Whether to inhibit use of same window when showing diff while + committing. + + When writing a commit, then a diff of the changes to be committed + is automatically shown. The idea is that the diff is shown in a + different window of the same frame and for most users that just + works. In other words most users can completely ignore this option + because its value doesn’t make a difference for them. + + However for users who configured Emacs to never create a new window + even when the package explicitly tries to do so, then displaying + two new buffers necessarily means that the first is immediately + replaced by the second. In our case the message buffer is + immediately replaced by the diff buffer, which is of course highly + undesirable. + + A workaround is to suppress this user configuration in this + particular case. Users have to explicitly opt-in by toggling this + option. We cannot enable the workaround unconditionally because + that again causes issues for other users: if the frame is too tiny + or the relevant settings too aggressive, then the diff buffer would + end up being displayed in a new frame. + + Also see . +  File: magit.info, Node: Editing Commit Messages, Prev: Initiating a Commit, Up: Committing @@ -5234,13 +4905,11 @@ return. If the editor returns with a non-zero exit status then ‘git’ does not create the commit. So the most important commands are those for finishing and aborting the commit. -‘C-c C-c’ (‘with-editor-finish’) - +‘C-c C-c’ (‘with-editor-finish’) Finish the current editing session by returning with exit code 0. Git then creates the commit using the message it finds in the file. -‘C-c C-k’ (‘with-editor-cancel’) - +‘C-c C-k’ (‘with-editor-cancel’) Cancel the current editing session by returning with exit code 1. Git then cancels the commit, but leaves the file untouched. @@ -5251,18 +4920,15 @@ message is stored at the beginning and the end of an edit session canceled). It is sometimes useful to bring back messages from that ring. -‘C-c M-s’ (‘git-commit-save-message’) - +‘C-c M-s’ (‘git-commit-save-message’) Save the current buffer content to the commit message ring. -‘M-p’ (‘git-commit-prev-message’) - +‘M-p’ (‘git-commit-prev-message’) Cycle backward through the commit message ring, after saving the current message to the ring. With a numeric prefix ARG, go back ARG comments. -‘M-n’ (‘git-commit-next-message’) - +‘M-n’ (‘git-commit-next-message’) Cycle forward through the commit message ring, after saving the current message to the ring. With a numeric prefix ARG, go back ARG comments. @@ -5275,8 +4941,7 @@ remove ‘magit-commit-diff’ from ‘server-switch-hook’. the changes that are about to be added to that commit or to show those changes alongside those that have already been committed. -‘C-c C-d’ (‘magit-diff-while-committing’) - +‘C-c C-d’ (‘magit-diff-while-committing’) While committing, show the changes that are about to be committed. While amending, invoking the command again toggles between showing just the new changes or all the changes that will be committed. @@ -5294,8 +4959,7 @@ File: magit.info, Node: Using the Revision Stack, Next: Commit Pseudo Headers, Using the Revision Stack ........................ -‘C-c C-w’ (‘magit-pop-revision-stack’) - +‘C-c C-w’ (‘magit-pop-revision-stack’) This command inserts a representation of a revision into the current buffer. It can be used inside buffers used to write commit messages but also in other buffers such as buffers used to edit @@ -5324,7 +4988,6 @@ Using the Revision Stack the minibuffer too. -- User Option: magit-pop-revision-stack-format - This option controls how the command ‘magit-pop-revision-stack’ inserts a revision into the current buffer. @@ -5362,40 +5025,31 @@ Some projects use pseudo headers in commit messages. Magit colorizes such headers and provides some commands to insert such headers. -- User Option: git-commit-known-pseudo-headers - A list of Git pseudo headers to be highlighted. -‘C-c C-i’ (‘git-commit-insert-pseudo-header’) - +‘C-c C-i’ (‘git-commit-insert-pseudo-header’) Insert a commit message pseudo header. -‘C-c C-a’ (‘git-commit-ack’) - +‘C-c C-a’ (‘git-commit-ack’) Insert a header acknowledging that you have looked at the commit. -‘C-c C-r’ (‘git-commit-review’) - +‘C-c C-r’ (‘git-commit-review’) Insert a header acknowledging that you have reviewed the commit. -‘C-c C-s’ (‘git-commit-signoff’) - +‘C-c C-s’ (‘git-commit-signoff’) Insert a header to sign off the commit. -‘C-c C-t’ (‘git-commit-test’) - +‘C-c C-t’ (‘git-commit-test’) Insert a header acknowledging that you have tested the commit. -‘C-c C-o’ (‘git-commit-cc’) - +‘C-c C-o’ (‘git-commit-cc’) Insert a header mentioning someone who might be interested. -‘C-c C-p’ (‘git-commit-reported’) - +‘C-c C-p’ (‘git-commit-reported’) Insert a header mentioning the person who reported the issue being fixed by the commit. -‘C-c M-i’ (‘git-commit-suggested’) - +‘C-c M-i’ (‘git-commit-suggested’) Insert a header mentioning the person who suggested the change.  @@ -5411,7 +5065,6 @@ different major modes in different repositories, which is useful when different projects impose different commit message conventions. -- User Option: git-commit-major-mode - The value of this option is the major mode used to edit Git commit messages. @@ -5421,32 +5074,26 @@ happens in the function ‘git-commit-setup’, which among other things runs the hook ‘git-commit-setup-hook’. -- User Option: git-commit-setup-hook - Hook run at the end of ‘git-commit-setup’. The following functions are suitable for this hook: -- Function: git-commit-save-message - Save the current buffer content to the commit message ring. -- Function: git-commit-setup-changelog-support - After this function is called, ChangeLog entries are treated as paragraphs. -- Function: git-commit-turn-on-auto-fill - Turn on ‘auto-fill-mode’ and set ‘fill-column’ to the value of ‘git-commit-fill-column’. -- Function: git-commit-turn-on-flyspell - Turn on Flyspell mode. Also prevent comments from being checked and finally check current non-comment text. -- Function: git-commit-propertize-diff - Propertize the diff shown inside the commit message buffer. Git inserts such diffs into the commit message template when the ‘--verbose’ argument is used. ‘magit-commit’ by default does not @@ -5455,15 +5102,12 @@ The following functions are suitable for this hook: function exists. -- Function: bug-reference-mode - Hyperlink bug references in the buffer. -- Function: with-editor-usage-message - Show usage information in the echo area. -- User Option: git-commit-setup-hook - Hook run after the user finished writing a commit message. This hook is only run after pressing ‘C-c C-c’ in a buffer used to @@ -5493,18 +5137,15 @@ instead of some code it’s now the human who is reviewing your commits who has to waste some time telling you to fix your commits. -- User Option: git-commit-summary-max-length - The intended maximal length of the summary line of commit messages. Characters beyond this column are colorized to indicate that this preference has been violated. -- User Option: git-commit-fill-column - Column beyond which automatic line-wrapping should happen in commit message buffers. -- User Option: git-commit-finish-query-functions - List of functions called to query before performing commit. The commit message buffer is current while the functions are @@ -5520,13 +5161,11 @@ who has to waste some time telling you to fix your commits. By default the only member is ‘git-commit-check-style-conventions’. -- Function: git-commit-check-style-conventions - This function checks for violations of certain basic style conventions. For each violation it asks users if they want to proceed anyway. -- User Option: git-commit-style-convention-checks - This option controls what conventions the function by the same name tries to enforce. The value is a list of self-explanatory symbols identifying certain conventions; ‘non-empty-second-line’ and @@ -5607,8 +5246,7 @@ used to fetch, pull, merge, rebase, or push branches, i.e. this command deals with branches themselves, not with the commits reachable from them. Those features are available from separate transient command. -‘b’ (‘magit-branch’) - +‘b’ (‘magit-branch’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. @@ -5616,7 +5254,6 @@ them. Those features are available from separate transient command. branch-related Git variables and allows changing their values. -- User Option: magit-branch-direct-configure - This option controls whether the transient command ‘magit-branch’ can be used to directly change the values of Git variables. This defaults to ‘t’ (to avoid changing key bindings). When set to @@ -5624,11 +5261,10 @@ them. Those features are available from separate transient command. and its suffix command ‘magit-branch-configure’ has to be used instead to view and change branch related variables. -‘b C’ (‘magit-branch-configure’) -‘f C’ (‘magit-branch-configure’) -‘F C’ (‘magit-branch-configure’) -‘P C’ (‘magit-branch-configure’) - +‘b C’ (‘magit-branch-configure’) +‘f C’ +‘F C’ +‘P C’ This transient prefix command binds commands that set the value of branch-related variables and displays them in a temporary buffer until the transient is exited. @@ -5644,16 +5280,14 @@ them. Those features are available from separate transient command. The variables are described in *note Branch Git Variables::. -‘b b’ (‘magit-checkout’) - +‘b b’ (‘magit-checkout’) Checkout a revision read in the minibuffer and defaulting to the branch or arbitrary revision at point. If the revision is a local branch then that becomes the current branch. If it is something else then ‘HEAD’ becomes detached. Checkout fails if the working tree or the staging area contain changes. -‘b n’ (‘magit-branch-create’) - +‘b n’ (‘magit-branch-create’) Create a new branch. The user is asked for a branch or arbitrary revision to use as the starting point of the new branch. When a branch name is provided, then that becomes the upstream branch of @@ -5662,15 +5296,13 @@ them. Those features are available from separate transient command. Also see option ‘magit-branch-prefer-remote-upstream’. -‘b c’ (‘magit-branch-and-checkout’) - +‘b c’ (‘magit-branch-and-checkout’) This command creates a new branch like ‘magit-branch-create’, but then also checks it out. Also see option ‘magit-branch-prefer-remote-upstream’. -‘b l’ (‘magit-branch-checkout’) - +‘b l’ (‘magit-branch-checkout’) This command checks out an existing or new local branch. It reads a branch name from the user offering all local branches and a subset of remote branches as candidates. Remote branches for which @@ -5692,8 +5324,7 @@ them. Those features are available from separate transient command. set to the chosen starting point or something else depends on the value of ‘magit-branch-adjust-remote-upstream-alist’. -‘b s’ (‘magit-branch-spinoff’) - +‘b s’ (‘magit-branch-spinoff’) This command creates and checks out a new branch starting at and tracking the current branch. That branch in turn is reset to the last commit it shares with its upstream. If the current branch has @@ -5720,14 +5351,12 @@ them. Those features are available from separate transient command. branch. If FROM is not reachable from ‘HEAD’ or is reachable from the source branch’s upstream, then an error is raised. -‘b S’ (‘magit-branch-spinout’) - +‘b S’ (‘magit-branch-spinout’) This command behaves like ‘magit-branch-spinoff’, except that it does not change the current branch. If there are any uncommitted changes, then it behaves exactly like ‘magit-branch-spinoff’. -‘b x’ (‘magit-branch-reset’) - +‘b x’ (‘magit-branch-reset’) This command resets a branch, defaulting to the branch at point, to the tip of another branch or any other commit. @@ -5742,26 +5371,22 @@ them. Those features are available from separate transient command. then the target branch is set as the upstream of the branch that is being reset. -‘b k’ (‘magit-branch-delete’) - +‘b k’ (‘magit-branch-delete’) Delete one or multiple branches. If the region marks multiple branches, then offer to delete those. Otherwise, prompt for a single branch to be deleted, defaulting to the branch at point. -‘b r’ (‘magit-branch-rename’) - +‘b r’ (‘magit-branch-rename’) Rename a branch. The branch and the new name are read in the minibuffer. With prefix argument the branch is renamed even if that name conflicts with an existing branch. -- User Option: magit-branch-read-upstream-first - When creating a branch, whether to read the upstream branch before the name of the branch that is to be created. The default is ‘t’, and I recommend you leave it at that. -- User Option: magit-branch-prefer-remote-upstream - This option specifies whether remote upstreams are favored over local upstreams when creating new branches. @@ -5806,7 +5431,6 @@ them. Those features are available from separate transient command. ‘next’, and ‘maint’ to the value of this options. -- User Option: magit-branch-adjust-remote-upstream-alist - The value of this option is an alist of branches to be used as the upstream when branching a remote branch. @@ -5858,12 +5482,10 @@ should also account for other common names: ("master" . ("main" "master" "next" "maint"))) -- Command: magit-branch-orphan - This command creates and checks out a new orphan branch with contents from a given revision. -- Command: magit-branch-or-checkout - This command is a hybrid between ‘magit-checkout’ and ‘magit-branch-and-checkout’ and is intended as a replacement for the former in ‘magit-branch’. @@ -5893,31 +5515,25 @@ These variables can be set from the transient prefix command ‘magit-branch’. See *note Branch Commands::. -- Variable: branch.NAME.merge - Together with ‘branch.NAME.remote’ this variable defines the upstream branch of the local branch named NAME. The value of this variable is the full reference of the upstream _branch_. -- Variable: branch.NAME.remote - Together with ‘branch.NAME.merge’ this variable defines the upstream branch of the local branch named NAME. The value of this variable is the name of the upstream _remote_. -- Variable: branch.NAME.rebase - This variable controls whether pulling into the branch named NAME is done by rebasing or by merging the fetched branch. • When ‘true’ then pulling is done by rebasing. - • When ‘false’ then pulling is done by merging. - • When undefined then the value of ‘pull.rebase’ is used. The default of that variable is ‘false’. -- Variable: branch.NAME.pushRemote - This variable specifies the remote that the branch named NAME is usually pushed to. The value has to be the name of an existing remote. @@ -5931,7 +5547,6 @@ These variables can be set from the transient prefix command ‘remote.pushDefault’ is undefined. -- Variable: branch.NAME.description - This variable can be used to describe the branch named NAME. That description is used e.g. when turning the branch into a series of patches. @@ -5940,12 +5555,10 @@ These variables can be set from the transient prefix command branch-specific variables are not set. -- Variable: pull.rebase - This variable specifies whether pulling is done by rebasing or by merging. It can be overwritten using ‘branch.NAME.rebase’. • When ‘true’ then pulling is done by rebasing. - • When ‘false’ (the default) then pulling is done by merging. Since it is never a good idea to merge the upstream branch into a @@ -5954,7 +5567,6 @@ branch-specific variables are not set. to ‘false’. -- Variable: remote.pushDefault - This variable specifies what remote the local branches are usually pushed to. This can be overwritten per branch using ‘branch.NAME.pushRemote’. @@ -5964,7 +5576,6 @@ control whether the various branch-specific variables are automatically set at this time. -- Variable: branch.autoSetupMerge - This variable specifies under what circumstances creating a branch NAME should result in the variables ‘branch.NAME.merge’ and ‘branch.NAME.remote’ being set according to the starting point used @@ -5973,27 +5584,21 @@ set at this time. • When ‘always’ then the variables are set regardless of whether the starting point is a local or a remote branch. - • When ‘true’ (the default) then the variables are set when the starting point is a remote branch, but not when it is a local branch. - • When ‘false’ then the variables are never set. -- Variable: branch.autoSetupRebase - This variable specifies whether creating a branch NAME should result in the variable ‘branch.NAME.rebase’ being set to ‘true’. • When ‘always’ then the variable is set regardless of whether the starting point is a local or a remote branch. - • When ‘local’ then the variable are set when the starting point is a local branch, but not when it is a remote branch. - • When ‘remote’ then the variable are set when the starting point is a remote branch, but not when it is a local branch. - • When ‘never’ (the default) then the variable is never set. Note that the respective commands always change the repository-local @@ -6009,7 +5614,6 @@ e.g.: *note (gitman)git-checkout::. and *note Pushing::. -- User Option: magit-prefer-remote-upstream - This option controls whether commands that read a branch from the user and then set it as the upstream branch, offer a local or a remote branch as default completion candidate, when they have the @@ -6029,7 +5633,6 @@ These commands are not available from the transient ‘magit-branch’ by default. -- Command: magit-branch-shelve - This command shelves a branch. This is done by deleting the branch, and creating a new reference "refs/shelved/BRANCH-NAME" pointing at the same commit as the branch pointed at. If the @@ -6040,7 +5643,6 @@ default. not ready to completely discard it yet. -- Command: magit-branch-unshelve - This command unshelves a branch that was previously shelved using ‘magit-branch-shelve’. This is done by deleting the reference "refs/shelved/BRANCH-NAME" and creating a branch "BRANCH-NAME" @@ -6057,8 +5659,7 @@ File: magit.info, Node: Merging, Next: Resolving Conflicts, Prev: Branching, Also see *note (gitman)git-merge::. For information on how to resolve merge conflicts see the next section. -‘m’ (‘magit-merge’) - +‘m’ (‘magit-merge’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -6066,8 +5667,7 @@ merge conflicts see the next section. When no merge is in progress, then the transient features the following suffix commands. -‘m m’ (‘magit-merge-plain’) - +‘m m’ (‘magit-merge-plain’) This command merges another branch or an arbitrary revision into the current branch. The branch or revision to be merged is read in the minibuffer and defaults to the branch at point. @@ -6079,22 +5679,19 @@ following suffix commands. merge commit, which makes it possible to inspect how conflicts were resolved and to adjust the commit message. -‘m e’ (‘magit-merge-editmsg’) - +‘m e’ (‘magit-merge-editmsg’) This command merges another branch or an arbitrary revision into the current branch and opens a commit message buffer, so that the user can make adjustments. The commit is not actually created until the user finishes with ‘C-c C-c’. -‘m n’ (‘magit-merge-nocommit’) - +‘m n’ (‘magit-merge-nocommit’) This command merges another branch or an arbitrary revision into the current branch, but does not actually create the merge commit. The user can then further adjust the merge, even when automatic conflict resolution succeeded and/or adjust the commit message. -‘m a’ (‘magit-merge-absorb’) - +‘m a’ (‘magit-merge-absorb’) This command merges another local branch into the current branch and then removes the former. @@ -6106,8 +5703,7 @@ following suffix commands. the merged branch, then the respective remote branch is also removed. -‘m i’ (‘magit-merge-into’) - +‘m i’ (‘magit-merge-into’) This command merges the current branch into another local branch and then removes the former. The latter becomes the new current branch. @@ -6120,8 +5716,7 @@ following suffix commands. the merged branch, then the respective remote branch is also removed. -‘m s’ (‘magit-merge-squash’) - +‘m s’ (‘magit-merge-squash’) This command squashes the changes introduced by another branch or an arbitrary revision into the current branch. This only applies the changes made by the squashed commits. No information is @@ -6129,22 +5724,19 @@ following suffix commands. Instead of this command you should probably use a command from the apply transient. -‘m p’ (‘magit-merge-preview’) - +‘m p’ (‘magit-merge-preview’) This command shows a preview of merging another branch or an arbitrary revision into the current branch. When a merge is in progress, then the transient instead features the following suffix commands. -‘m m’ (‘magit-merge’) - +‘m m’ (‘magit-merge’) After the user resolved conflicts, this command proceeds with the merge. If some conflicts weren’t resolved, then this command fails. -‘m a’ (‘magit-merge-abort’) - +‘m a’ (‘magit-merge-abort’) This command aborts the current merge operation.  @@ -6242,6 +5834,13 @@ the Magit status buffer. The file should now be shown as "modified", no longer as "unmerged", because Smerge automatically stages the file when you save the buffer after resolving the last conflict. + Magit now wraps the mentioned Smerge commands, allowing you to use +these key bindings without having to go to the file-visiting buffer. +Additionally ‘k’ (‘magit-discard’) on a hunk with unresolved conflicts +asks which side to keep or, if point is on a side, then it keeps it +without prompting. Similarly ‘k’ on a unresolved file ask which side to +keep. + Alternatively you could use Ediff, which uses separate buffers for the different versions of the file. To resolve conflicts in a file using Ediff press ‘e’ while point is on such a file in the status @@ -6265,8 +5864,7 @@ File: magit.info, Node: Rebasing, Next: Cherry Picking, Prev: Resolving Confl Also see *note (gitman)git-rebase::. For information on how to resolve conflicts that occur during rebases see the preceding section. -‘r’ (‘magit-rebase’) - +‘r’ (‘magit-rebase’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -6284,30 +5882,26 @@ See *note Information About In-Progress Rebase::. For information about the upstream and the push-remote, see *note The Two Remotes::. -‘r p’ (‘magit-rebase-onto-pushremote’) - +‘r p’ (‘magit-rebase-onto-pushremote’) This command rebases the current branch onto its push-remote. With a prefix argument or when the push-remote is either not configured or unusable, then let the user first configure the push-remote. -‘r u’ (‘magit-rebase-onto-upstream’) - +‘r u’ (‘magit-rebase-onto-upstream’) This command rebases the current branch onto its upstream branch. With a prefix argument or when the upstream is either not configured or unusable, then let the user first configure the upstream. -‘r e’ (‘magit-rebase-branch’) - +‘r e’ (‘magit-rebase-branch’) This command rebases the current branch onto a branch read in the minibuffer. All commits that are reachable from head but not from the selected branch TARGET are being rebased. -‘r s’ (‘magit-rebase-subset’) - +‘r s’ (‘magit-rebase-subset’) This command starts a non-interactive rebase sequence to transfer commits from START to ‘HEAD’ onto NEWBASE. START has to be selected from a list of recent commits. @@ -6336,51 +5930,42 @@ only have to redo half the work. following commands as they always use that argument anyway, even if it is not enabled in the transient. -‘r i’ (‘magit-rebase-interactive’) - +‘r i’ (‘magit-rebase-interactive’) This command starts an interactive rebase sequence. -‘r f’ (‘magit-rebase-autosquash’) - +‘r f’ (‘magit-rebase-autosquash’) This command combines squash and fixup commits with their intended targets. -‘r m’ (‘magit-rebase-edit-commit’) - +‘r m’ (‘magit-rebase-edit-commit’) This command starts an interactive rebase sequence that lets the user edit a single older commit. -‘r w’ (‘magit-rebase-reword-commit’) - +‘r w’ (‘magit-rebase-reword-commit’) This command starts an interactive rebase sequence that lets the user reword a single older commit. -‘r k’ (‘magit-rebase-remove-commit’) - +‘r k’ (‘magit-rebase-remove-commit’) This command removes a single older commit using rebase. When a rebase is in progress, then the transient instead features the following suffix commands. -‘r r’ (‘magit-rebase-continue’) - +‘r r’ (‘magit-rebase-continue’) This command restart the current rebasing operation. In some cases this pops up a commit message buffer for you do edit. With a prefix argument the old message is reused as-is. -‘r s’ (‘magit-rebase-skip’) - +‘r s’ (‘magit-rebase-skip’) This command skips the current commit and restarts the current rebase operation. -‘r e’ (‘magit-rebase-edit’) - +‘r e’ (‘magit-rebase-edit’) This command lets the user edit the todo list of the current rebase operation. -‘r a’ (‘magit-rebase-abort’) - +‘r a’ (‘magit-rebase-abort’) This command aborts the current rebase operation, restoring the original branch. @@ -6395,78 +5980,62 @@ File: magit.info, Node: Editing Rebase Sequences, Next: Information About In-P 6.9.1 Editing Rebase Sequences ------------------------------ -‘C-c C-c’ (‘with-editor-finish’) - +‘C-c C-c’ (‘with-editor-finish’) Finish the current editing session by returning with exit code 0. Git then uses the rebase instructions it finds in the file. -‘C-c C-k’ (‘with-editor-cancel’) - +‘C-c C-k’ (‘with-editor-cancel’) Cancel the current editing session by returning with exit code 1. Git then forgoes starting the rebase sequence. -‘RET’ (‘git-rebase-show-commit’) - +‘’ (‘git-rebase-show-commit’) Show the commit on the current line in another buffer and select that buffer. -‘SPC’ (‘git-rebase-show-or-scroll-up’) - +‘’ (‘git-rebase-show-or-scroll-up’) Show the commit on the current line in another buffer without selecting that buffer. If the revision buffer is already visible in another window of the current frame, then instead scroll that window up. -‘DEL’ (‘git-rebase-show-or-scroll-down’) - +‘’ (‘git-rebase-show-or-scroll-down’) Show the commit on the current line in another buffer without selecting that buffer. If the revision buffer is already visible in another window of the current frame, then instead scroll that window down. -‘p’ (‘git-rebase-backward-line’) - +‘p’ (‘git-rebase-backward-line’) Move to previous line. -‘n’ (‘forward-line’) - +‘n’ (‘forward-line’) Move to next line. -‘M-p’ (‘git-rebase-move-line-up’) - +‘M-p’ (‘git-rebase-move-line-up’) Move the current commit (or command) up. -‘M-n’ (‘git-rebase-move-line-down’) - +‘M-n’ (‘git-rebase-move-line-down’) Move the current commit (or command) down. -‘r’ (‘git-rebase-reword’) - +‘r’ (‘git-rebase-reword’) Edit message of commit on current line. -‘e’ (‘git-rebase-edit’) - +‘e’ (‘git-rebase-edit’) Stop at the commit on the current line. -‘s’ (‘git-rebase-squash’) - +‘s’ (‘git-rebase-squash’) Meld commit on current line into previous commit, and edit message. -‘f’ (‘git-rebase-fixup’) - +‘f’ (‘git-rebase-fixup’) Meld commit on current line into previous commit, discarding the current commit’s message. -‘k’ (‘git-rebase-kill-line’) - +‘k’ (‘git-rebase-kill-line’) Kill the current action line. -‘c’ (‘git-rebase-pick’) - +‘c’ (‘git-rebase-pick’) Use commit on current line. -‘x’ (‘git-rebase-exec’) - +‘x’ (‘git-rebase-exec’) Insert a shell command to be run after the proceeding commit. If there already is such a command on the current line, then edit @@ -6474,55 +6043,45 @@ File: magit.info, Node: Editing Rebase Sequences, Next: Information About In-P when there already is one on the current line. With empty input remove the command on the current line, if any. -‘b’ (‘git-rebase-break’) - +‘b’ (‘git-rebase-break’) Insert a break action before the current line, instructing Git to return control to the user. -‘y’ (‘git-rebase-insert’) - +‘y’ (‘git-rebase-insert’) Read an arbitrary commit and insert it below current line. -‘C-x u’ (‘git-rebase-undo’) - +‘C-x u’ (‘git-rebase-undo’) Undo some previous changes. Like ‘undo’ but works in read-only buffers. -- User Option: git-rebase-auto-advance - Whether to move to next line after changing a line. -- User Option: git-rebase-show-instructions - Whether to show usage instructions inside the rebase buffer. -- User Option: git-rebase-confirm-cancel - Whether confirmation is required to cancel. When a rebase is performed with the ‘--rebase-merges’ option, the sequence will include a few other types of actions and the following commands become relevant. -‘l’ (‘git-rebase-label’) - +‘l’ (‘git-rebase-label’) This commands inserts a label action or edits the one at point. -‘t’ (‘git-rebase-reset’) - +‘t’ (‘git-rebase-reset’) This command inserts a reset action or edits the one at point. The prompt will offer the labels that are currently present in the buffer. -‘MM’ (‘git-rebase-merge’) - +‘MM’ (‘git-rebase-merge’) The command inserts a merge action or edits the one at point. The prompt will offer the labels that are currently present in the buffer. Specifying a message to reuse via ‘-c’ or ‘-C’ is not supported; an editor will always be invoked for the merge. -‘Mt’ (‘git-rebase-merge-toggle-editmsg’) - +‘Mt’ (‘git-rebase-merge-toggle-editmsg’) This command toggles between the ‘-C’ and ‘-c’ options of the merge action at point. These options both specify a commit whose message should be reused. The lower-case variant instructs Git to invoke @@ -6718,8 +6277,7 @@ File: magit.info, Node: Cherry Picking, Next: Resetting, Prev: Rebasing, Up: Also see *note (gitman)git-cherry-pick::. -‘A’ (‘magit-cherry-pick’) - +‘A’ (‘magit-cherry-pick’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -6727,15 +6285,13 @@ Also see *note (gitman)git-cherry-pick::. When no cherry-pick or revert is in progress, then the transient features the following suffix commands. -‘A A’ (‘magit-cherry-copy’) - +‘A A’ (‘magit-cherry-copy’) This command copies COMMITS from another branch onto the current branch. If the region selects multiple commits, then those are copied, without prompting. Otherwise the user is prompted for a commit or range, defaulting to the commit at point. -‘A a’ (‘magit-cherry-apply’) - +‘A a’ (‘magit-cherry-apply’) This command applies the changes in COMMITS from another branch onto the current branch. If the region selects multiple commits, then those are used, without prompting. Otherwise the user is @@ -6752,8 +6308,7 @@ conflicts. If that happens, then these commands abort and you not only have to resolve the conflicts but also finish the process the same way you would have to if these commands didn’t exist at all. -‘A h’ (‘magit-cherry-harvest’) - +‘A h’ (‘magit-cherry-harvest’) This command moves the selected COMMITS that must be located on another BRANCH onto the current branch instead, removing them from the former. When this command succeeds, then the same branch is @@ -6764,19 +6319,18 @@ you would have to if these commands didn’t exist at all. this command stops and you have to resolve the conflicts and then finish the process manually. -‘A d’ (‘magit-cherry-donate’) - +‘A d’ (‘magit-cherry-donate’) This command moves the selected COMMITS from the current branch onto another existing BRANCH, removing them from the former. When this command succeeds, then the same branch is current as before. + ‘HEAD’ is allowed to be detached initially. Applying the commits on the other branch or removing them from the current branch can lead to conflicts. When that happens, then this command stops and you have to resolve the conflicts and then finish the process manually. -‘A n’ (‘magit-cherry-spinout’) - +‘A n’ (‘magit-cherry-spinout’) This command moves the selected COMMITS from the current branch onto a new branch BRANCH, removing them from the former. When this command succeeds, then the same branch is current as before. @@ -6786,8 +6340,7 @@ you would have to if these commands didn’t exist at all. command stops and you have to resolve the conflicts and then finish the process manually. -‘A s’ (‘magit-cherry-spinoff’) - +‘A s’ (‘magit-cherry-spinoff’) This command moves the selected COMMITS from the current branch onto a new branch BRANCH, removing them from the former. When this command succeeds, then the new branch is checked out. @@ -6800,16 +6353,13 @@ you would have to if these commands didn’t exist at all. When a cherry-pick or revert is in progress, then the transient instead features the following suffix commands. -‘A A’ (‘magit-sequence-continue’) - +‘A A’ (‘magit-sequence-continue’) Resume the current cherry-pick or revert sequence. -‘A s’ (‘magit-sequence-skip’) - +‘A s’ (‘magit-sequence-skip’) Skip the stopped at commit during a cherry-pick or revert sequence. -‘A a’ (‘magit-sequence-abort’) - +‘A a’ (‘magit-sequence-abort’) Abort the current cherry-pick or revert sequence. This discards all changes made since the sequence started. @@ -6823,8 +6373,7 @@ File: magit.info, Node: Reverting, Up: Cherry Picking 6.10.1 Reverting ---------------- -‘V’ (‘magit-revert’) - +‘V’ (‘magit-revert’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -6832,14 +6381,12 @@ File: magit.info, Node: Reverting, Up: Cherry Picking When no cherry-pick or revert is in progress, then the transient features the following suffix commands. -‘V V’ (‘magit-revert-and-commit’) - +‘V V’ (‘magit-revert-and-commit’) Revert a commit by creating a new commit. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then revert all of them, without prompting. -‘V v’ (‘magit-revert-no-commit’) - +‘V v’ (‘magit-revert-no-commit’) Revert a commit by applying it in reverse to the working tree. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then revert all of them, without @@ -6848,16 +6395,13 @@ features the following suffix commands. When a cherry-pick or revert is in progress, then the transient instead features the following suffix commands. -‘V A’ (‘magit-sequence-continue’) - +‘V A’ (‘magit-sequence-continue’) Resume the current cherry-pick or revert sequence. -‘V s’ (‘magit-sequence-skip’) - +‘V s’ (‘magit-sequence-skip’) Skip the stopped at commit during a cherry-pick or revert sequence. -‘V a’ (‘magit-sequence-abort’) - +‘V a’ (‘magit-sequence-abort’) Abort the current cherry-pick or revert sequence. This discards all changes made since the sequence started. @@ -6869,50 +6413,42 @@ File: magit.info, Node: Resetting, Next: Stashing, Prev: Cherry Picking, Up: Also see *note (gitman)git-reset::. -‘x’ (‘magit-reset-quickly’) - +‘x’ (‘magit-reset-quickly’) Reset the ‘HEAD’ and index to some commit read from the user and defaulting to the commit at point, and possibly also reset the working tree. With a prefix argument reset the working tree otherwise don’t. -‘X m’ (‘magit-reset-mixed’) - +‘X m’ (‘magit-reset-mixed’) Reset the ‘HEAD’ and index to some commit read from the user and defaulting to the commit at point. The working tree is kept as-is. -‘X s’ (‘magit-reset-soft’) - +‘X s’ (‘magit-reset-soft’) Reset the ‘HEAD’ to some commit read from the user and defaulting to the commit at point. The index and the working tree are kept as-is. -‘X h’ (‘magit-reset-hard’) - +‘X h’ (‘magit-reset-hard’) Reset the ‘HEAD’, index, and working tree to some commit read from the user and defaulting to the commit at point. -‘X k’ (‘magit-reset-keep’) - +‘X k’ (‘magit-reset-keep’) Reset the ‘HEAD’, index, and working tree to some commit read from the user and defaulting to the commit at point. Uncommitted changes are kept as-is. -‘X i’ (‘magit-reset-index’) - +‘X i’ (‘magit-reset-index’) Reset the index to some commit read from the user and defaulting to the commit at point. Keep the ‘HEAD’ and working tree as-is, so if the commit refers to the ‘HEAD’, then this effectively unstages all changes. -‘X w’ (‘magit-reset-worktree’) - +‘X w’ (‘magit-reset-worktree’) Reset the working tree to some commit read from the user and defaulting to the commit at point. Keep the ‘HEAD’ and index as-is. -‘X f’ (‘magit-file-checkout’) - +‘X f’ (‘magit-file-checkout’) Update file in the working tree and index to the contents from a revision. Both the revision and file are read from the user. @@ -6924,111 +6460,92 @@ File: magit.info, Node: Stashing, Prev: Resetting, Up: Manipulating Also see *note (gitman)git-stash::. -‘z’ (‘magit-stash’) - +‘z’ (‘magit-stash’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘z z’ (‘magit-stash-both’) - +‘z z’ (‘magit-stash-both’) Create a stash of the index and working tree. Untracked files are included according to infix arguments. One prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’. -‘z i’ (‘magit-stash-index’) - +‘z i’ (‘magit-stash-index’) Create a stash of the index only. Unstaged and untracked changes are not stashed. -‘z w’ (‘magit-stash-worktree’) - +‘z w’ (‘magit-stash-worktree’) Create a stash of unstaged changes in the working tree. Untracked files are included according to infix arguments. One prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’. -‘z x’ (‘magit-stash-keep-index’) - +‘z x’ (‘magit-stash-keep-index’) Create a stash of the index and working tree, keeping index intact. Untracked files are included according to infix arguments. One prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’. -‘z Z’ (‘magit-snapshot-both’) - +‘z Z’ (‘magit-snapshot-both’) Create a snapshot of the index and working tree. Untracked files are included according to infix arguments. One prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’. -‘z I’ (‘magit-snapshot-index’) - +‘z I’ (‘magit-snapshot-index’) Create a snapshot of the index only. Unstaged and untracked changes are not stashed. -‘z W’ (‘magit-snapshot-worktree’) - +‘z W’ (‘magit-snapshot-worktree’) Create a snapshot of unstaged changes in the working tree. Untracked files are included according to infix arguments. One prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’-. -‘z a’ (‘magit-stash-apply’) - +‘z a’ (‘magit-stash-apply’) Apply a stash to the working tree. Try to preserve the stash index. If that fails because there are staged changes, apply without preserving the stash index. -‘z p’ (‘magit-stash-pop’) - +‘z p’ (‘magit-stash-pop’) Apply a stash to the working tree and remove it from stash list. Try to preserve the stash index. If that fails because there are staged changes, apply without preserving the stash index and forgo removing the stash. -‘z k’ (‘magit-stash-drop’) - +‘z k’ (‘magit-stash-drop’) Remove a stash from the stash list. When the region is active, offer to drop all contained stashes. -‘z v’ (‘magit-stash-show’) - +‘z v’ (‘magit-stash-show’) Show all diffs of a stash in a buffer. -‘z b’ (‘magit-stash-branch’) - +‘z b’ (‘magit-stash-branch’) Create and checkout a new BRANCH from STASH. The branch starts at the commit that was current when the stash was created. -‘z B’ (‘magit-stash-branch-here’) - +‘z B’ (‘magit-stash-branch-here’) Create and checkout a new BRANCH using ‘magit-branch’ with the current branch or ‘HEAD’ as the starting-point. Then apply STASH, dropping it if it applies cleanly. -‘z f’ (‘magit-stash-format-patch’) - +‘z f’ (‘magit-stash-format-patch’) Create a patch from STASH. -‘k’ (‘magit-stash-clear’) - +‘k’ (‘magit-stash-clear’) Remove all stashes saved in REF’s reflog by deleting REF. -‘z l’ (‘magit-stash-list’) - +‘z l’ (‘magit-stash-list’) List all stashes in a buffer. -- User Option: magit-stashes-margin - This option specifies whether the margin is initially shown in stashes buffers and how it is formatted. The value has the form ‘(INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH)’. • 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 @@ -7036,14 +6553,11 @@ Also see *note (gitman)git-stash::. show the actual date. Option ‘magit-log-margin-show-committer-date’ controls which date is being displayed. - • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed. - • AUTHOR controls whether the name of the author is also shown by default. - • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so. @@ -7087,8 +6601,7 @@ features are available from separate transient commands. Also see *note (gitman)git-remote::. -‘M’ (‘magit-remote’) - +‘M’ (‘magit-remote’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. @@ -7096,7 +6609,6 @@ features are available from separate transient commands. remote-related Git variables and allows changing their values. -- User Option: magit-remote-direct-configure - This option controls whether remote-related Git variables are accessible directly from the transient ‘magit-remote’. @@ -7107,8 +6619,7 @@ features are available from separate transient commands. If ‘nil’, then ‘magit-remote-configure’ has to be used to do so. -‘M C’ (‘magit-remote-configure’) - +‘M C’ (‘magit-remote-configure’) This transient prefix command binds commands that set the value of remote-related variables and displays them in a temporary buffer until the transient is exited. @@ -7124,32 +6635,26 @@ features are available from separate transient commands. The variables are described in *note Remote Git Variables::. -‘M a’ (‘magit-remote-add’) - +‘M a’ (‘magit-remote-add’) This command add a remote and fetches it. The remote name and url are read in the minibuffer. -‘M r’ (‘magit-remote-rename’) - +‘M r’ (‘magit-remote-rename’) This command renames a remote. Both the old and the new names are read in the minibuffer. -‘M u’ (‘magit-remote-set-url’) - +‘M u’ (‘magit-remote-set-url’) This command changes the url of a remote. Both the remote and the new url are read in the minibuffer. -‘M k’ (‘magit-remote-remove’) - +‘M k’ (‘magit-remote-remove’) This command deletes a remote, read in the minibuffer. -‘M p’ (‘magit-remote-prune’) - +‘M p’ (‘magit-remote-prune’) This command removes stale remote-tracking branches for a remote read in the minibuffer. -‘M P’ (‘magit-remote-prune-refspecs’) - +‘M P’ (‘magit-remote-prune-refspecs’) This command removes stale refspecs for a remote read in the minibuffer. @@ -7167,7 +6672,6 @@ features are available from separate transient commands. not removed. -- User Option: magit-remote-add-set-remote.pushDefault - This option controls whether the user is asked whether they want to set ‘remote.pushDefault’ after adding a remote. @@ -7189,28 +6693,23 @@ These variables can be set from the transient prefix command ‘magit-remote’. See *note Remote Commands::. -- Variable: remote.NAME.url - This variable specifies the url of the remote named NAME. It can have multiple values. -- Variable: remote.NAME.fetch - The refspec used when fetching from the remote named NAME. It can have multiple values. -- Variable: remote.NAME.pushurl - This variable specifies the url used for fetching from the remote named NAME. If it is not specified, then ‘remote.NAME.url’ is used instead. It can have multiple values. -- Variable: remote.NAME.push - The refspec used when pushing to the remote named NAME. It can have multiple values. -- Variable: remote.NAME.tagOpts - This variable specifies what tags are fetched by default. If the value is ‘--no-tags’ then no tags are fetched. If the value is ‘--tags’, then all tags are fetched. If this variable has no @@ -7226,22 +6725,19 @@ File: magit.info, Node: Fetching, Next: Pulling, Prev: Remotes, Up: Transfer Also see *note (gitman)git-fetch::. For information about the upstream and the push-remote, see *note The Two Remotes::. -‘f’ (‘magit-fetch’) - +‘f’ (‘magit-fetch’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘f p’ (‘magit-fetch-from-pushremote’) - +‘f p’ (‘magit-fetch-from-pushremote’) This command fetches from the current push-remote. With a prefix argument or when the push-remote is either not configured or unusable, then let the user first configure the push-remote. -‘f u’ (‘magit-fetch-from-upstream’) - +‘f u’ (‘magit-fetch-from-upstream’) This command fetch from the upstream of the current branch. If the upstream is configured for the current branch and names an @@ -7253,31 +6749,25 @@ and the push-remote, see *note The Two Remotes::. from the ‘magit-fetch’ transient prefix and invoking it directly results in an error. -‘f e’ (‘magit-fetch-other’) - +‘f e’ (‘magit-fetch-other’) This command fetch from a repository read from the minibuffer. -‘f o’ (‘magit-fetch-branch’) - +‘f o’ (‘magit-fetch-branch’) This command fetches a branch from a remote, both of which are read from the minibuffer. -‘f r’ (‘magit-fetch-refspec’) - +‘f r’ (‘magit-fetch-refspec’) This command fetches from a remote using an explicit refspec, both of which are read from the minibuffer. -‘f a’ (‘magit-fetch-all’) - +‘f a’ (‘magit-fetch-all’) This command fetches from all remotes. -‘f m’ (‘magit-submodule-fetch’) - +‘f m’ (‘magit-submodule-fetch’) This command fetches all submodules. With a prefix argument it fetches all remotes of all submodules. -- User Option: magit-pull-or-fetch - By default fetch and pull commands are available from separate transient prefix command. Setting this to ‘t’ adds some (but not all) of the above suffix commands to the ‘magit-pull’ transient. @@ -7298,29 +6788,25 @@ File: magit.info, Node: Pulling, Next: Pushing, Prev: Fetching, Up: Transfer Also see *note (gitman)git-pull::. For information about the upstream and the push-remote, see *note The Two Remotes::. -‘F’ (‘magit-pull’) - +‘F’ (‘magit-pull’) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. -‘F p’ (‘magit-pull-from-pushremote’) - +‘F p’ (‘magit-pull-from-pushremote’) This command pulls from the push-remote of the current branch. With a prefix argument or when the push-remote is either not configured or unusable, then let the user first configure the push-remote. -‘F u’ (‘magit-pull-from-upstream’) - +‘F u’ (‘magit-pull-from-upstream’) This command pulls from the upstream of the current branch. With a prefix argument or when the upstream is either not configured or unusable, then let the user first configure the upstream. -‘F e’ (‘magit-pull-branch’) - +‘F e’ (‘magit-pull-branch’) This command pulls from a branch read in the minibuffer.  @@ -7332,40 +6818,34 @@ File: magit.info, Node: Pushing, Next: Plain Patches, Prev: Pulling, Up: Tra Also see *note (gitman)git-push::. For information about the upstream and the push-remote, see *note The Two Remotes::. -‘P’ (‘magit-push’) - +‘P’ (‘magit-push’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘P p’ (‘magit-push-current-to-pushremote’) - +‘P p’ (‘magit-push-current-to-pushremote’) This command pushes the current branch to its push-remote. With a prefix argument or when the push-remote is either not configured or unusable, then let the user first configure the push-remote. -‘P u’ (‘magit-push-current-to-upstream’) - +‘P u’ (‘magit-push-current-to-upstream’) This command pushes the current branch to its upstream branch. With a prefix argument or when the upstream is either not configured or unusable, then let the user first configure the upstream. -‘P e’ (‘magit-push-current’) - +‘P e’ (‘magit-push-current’) This command pushes the current branch to a branch read in the minibuffer. -‘P o’ (‘magit-push-other’) - +‘P o’ (‘magit-push-other’) This command pushes an arbitrary branch or commit somewhere. Both the source and the target are read in the minibuffer. -‘P r’ (‘magit-push-refspecs’) - +‘P r’ (‘magit-push-refspecs’) This command pushes one or multiple refspecs to a remote, both of which are read in the minibuffer. @@ -7373,24 +6853,21 @@ and the push-remote, see *note The Two Remotes::. only available for the part before the colon, or when no colon is used. -‘P m’ (‘magit-push-matching’) - +‘P m’ (‘magit-push-matching’) This command pushes all matching branches to another repository. If only one remote exists, then push to that. Otherwise prompt for a remote, offering the remote configured for the current branch as default. -‘P t’ (‘magit-push-tags’) - +‘P t’ (‘magit-push-tags’) This command pushes all tags to another repository. If only one remote exists, then push to that. Otherwise prompt for a remote, offering the remote configured for the current branch as default. -‘P T’ (‘magit-push-tag’) - +‘P T’ (‘magit-push-tag’) This command pushes a tag to another repository. One of the infix arguments, ‘--force-with-lease’, deserves a word of @@ -7407,7 +6884,6 @@ the push transient. See their doc-strings for instructions on how to add them to the transient. -- Command: magit-push-implicitly args - This command pushes somewhere without using an explicit refspec. This command simply runs ‘git push -v [ARGS]’. ARGS are the infix @@ -7425,7 +6901,6 @@ add them to the transient. '(\"i\" magit-push-implicitly))" -- Command: magit-push-to-remote remote args - This command pushes to the remote REMOTE without using an explicit refspec. The remote is read in the minibuffer. @@ -7442,14 +6917,12 @@ File: magit.info, Node: Plain Patches, Next: Maildir Patches, Prev: Pushing, 7.5 Plain Patches ================= -‘W’ (‘magit-patch’) - +‘W’ (‘magit-patch’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘W c’ (‘magit-patch-create’) - +‘W c’ (‘magit-patch-create’) This command creates patches for a set commits. If the region marks several commits, then it creates patches for all of them. Otherwise it functions as a transient prefix command, which @@ -7457,15 +6930,13 @@ File: magit.info, Node: Plain Patches, Next: Maildir Patches, Prev: Pushing, command. When this command is invoked as a suffix of itself, then it creates a patch using the specified infix arguments. -‘w a’ (‘magit-patch-apply’) - +‘w a’ (‘magit-patch-apply’) This command applies a patch. This is a transient prefix command, which features several infix arguments and binds itself as a suffix command. When this command is invoked as a suffix of itself, then it applies a patch using the specified infix arguments. -‘W s’ (‘magit-patch-save’) - +‘W s’ (‘magit-patch-save’) This command creates a patch from the current diff. Inside ‘magit-diff-mode’ or ‘magit-revision-mode’ buffers, ‘C-x @@ -7482,25 +6953,21 @@ File: magit.info, Node: Maildir Patches, Prev: Plain Patches, Up: Transferrin Also see *note (gitman)git-am::. and *note (gitman)git-apply::. -‘w’ (‘magit-am’) - +‘w’ (‘magit-am’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘w w’ (‘magit-am-apply-patches’) - +‘w w’ (‘magit-am-apply-patches’) This command applies one or more patches. If the region marks files, then those are applied as patches. Otherwise this command reads a file-name in the minibuffer, defaulting to the file at point. -‘w m’ (‘magit-am-apply-maildir’) - +‘w m’ (‘magit-am-apply-maildir’) This command applies patches from a maildir. -‘w a’ (‘magit-patch-apply’) - +‘w a’ (‘magit-patch-apply’) This command applies a plain patch. For a longer description see *note Plain Patches::. This command is only available from the ‘magit-am’ transient for historic reasons. @@ -7508,17 +6975,14 @@ Also see *note (gitman)git-am::. and *note (gitman)git-apply::. When an "am" operation is in progress, then the transient instead features the following suffix commands. -‘w w’ (‘magit-am-continue’) - +‘w w’ (‘magit-am-continue’) This command resumes the current patch applying sequence. -‘w s’ (‘magit-am-skip’) - +‘w s’ (‘magit-am-skip’) This command skips the stopped at patch during a patch applying sequence. -‘w a’ (‘magit-am-abort’) - +‘w a’ (‘magit-am-abort’) This command aborts the current patch applying sequence. This discards all changes made since the sequence started. @@ -7535,6 +6999,7 @@ File: magit.info, Node: Miscellaneous, Next: Customizing, Prev: Transferring, * Submodules:: * Subtree:: * Worktree:: +* Bundle:: * Common Commands:: * Wip Modes:: * Commands for Buffers Visiting Files:: @@ -7548,19 +7013,16 @@ File: magit.info, Node: Tagging, Next: Notes, Up: Miscellaneous Also see *note (gitman)git-tag::. -‘t’ (‘magit-tag’) - +‘t’ (‘magit-tag’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘t t’ (‘magit-tag-create’) - +‘t t’ (‘magit-tag-create’) This command creates a new tag with the given NAME at REV. With a prefix argument it creates an annotated tag. -‘t r’ (‘magit-tag-release’) - +‘t r’ (‘magit-tag-release’) This commands creates a release tag. It assumes that release tags match ‘magit-release-tag-regexp’. @@ -7579,15 +7041,13 @@ Also see *note (gitman)git-tag::. TAG "v1.2.3" and a repository located at something like "/path/to/foo-bar". -‘t k’ (‘magit-tag-delete’) - +‘t k’ (‘magit-tag-delete’) This command deletes one or more tags. If the region marks multiple tags (and nothing else), then it offers to delete those. Otherwise, it prompts for a single tag to be deleted, defaulting to the tag at point. -‘t p’ (‘magit-tag-prune’) - +‘t p’ (‘magit-tag-prune’) This command offers to delete tags missing locally from REMOTE, and vice versa. @@ -7599,38 +7059,33 @@ File: magit.info, Node: Notes, Next: Submodules, Prev: Tagging, Up: Miscella Also see *note (gitman)git-notes::. -‘T’ (‘magit-notes’) - +‘T’ (‘magit-notes’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. -‘T T’ (‘magit-notes-edit’) - +‘T T’ (‘magit-notes-edit’) Edit the note attached to a commit, defaulting to the commit at point. By default use the value of Git variable ‘core.notesRef’ or "refs/notes/commits" if that is undefined. -‘T r’ (‘magit-notes-remove’) - +‘T r’ (‘magit-notes-remove’) Remove the note attached to a commit, defaulting to the commit at point. By default use the value of Git variable ‘core.notesRef’ or "refs/notes/commits" if that is undefined. -‘T p’ (‘magit-notes-prune’) - +‘T p’ (‘magit-notes-prune’) Remove notes about unreachable commits. It is possible to merge one note ref into another. That may result in conflicts which have to resolved in the temporary worktree ".git/NOTES_MERGE_WORKTREE". -‘T m’ (‘magit-notes-merge’) - +‘T m’ (‘magit-notes-merge’) Merge the notes of a ref read from the user into the current notes ref. The current notes ref is the value of Git variable ‘core.notesRef’ or "refs/notes/commits" if that is undefined. @@ -7638,13 +7093,11 @@ in conflicts which have to resolved in the temporary worktree When a notes merge is in progress then the transient features the following suffix commands, instead of those listed above. -‘T c’ (‘magit-notes-merge-commit’) - +‘T c’ (‘magit-notes-merge-commit’) Commit the current notes ref merge, after manually resolving conflicts. -‘T a’ (‘magit-notes-merge-abort’) - +‘T a’ (‘magit-notes-merge-abort’) Abort the current notes ref merge. The following variables control what notes reference ‘magit-notes-*’, @@ -7652,12 +7105,10 @@ following suffix commands, instead of those listed above. global values are displayed and can be modified. -- Variable: core.notesRef - This variable specifies the notes ref that is displayed by default and which commands act on by default. -- Variable: notes.displayRef - This variable specifies additional notes ref to be displayed in addition to the ref specified by ‘core.notesRef’. It can have multiple values and may end with ‘*’ to display all refs in the @@ -7690,7 +7141,6 @@ the super-repository by adding ‘magit-insert-modules’ to the hook Sections::. -- Command: magit-list-submodules - This command displays a list of the current repository’s submodules in a separate buffer. @@ -7698,7 +7148,6 @@ Sections::. "Modules". -- User Option: magit-submodule-list-columns - This option controls what columns are displayed by the command ‘magit-list-submodules’ and how they are displayed. @@ -7717,8 +7166,7 @@ File: magit.info, Node: Submodule Transient, Prev: Listing Submodules, Up: Su 8.3.2 Submodule Transient ------------------------- -‘o’ (‘magit-submodule’) - +‘o’ (‘magit-submodule’) This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked. @@ -7731,46 +7179,38 @@ a single module to act on. With a prefix argument these commands ignore the selection and the current module and instead act on all suitable modules. -‘o a’ (‘magit-submodule-add’) - +‘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 URL. -‘o r’ (‘magit-submodule-register’) - +‘o r’ (‘magit-submodule-register’) This command registers the selected modules by copying their urls from ".gitmodules" to "$GIT_DIR/config". These values can then be edited before running ‘magit-submodule-populate’. If you don’t need to edit any urls, then use the latter directly. -‘o p’ (‘magit-submodule-populate’) - +‘o p’ (‘magit-submodule-populate’) This command creates the working directory or directories of the selected modules, checking out the recorded commits. -‘o u’ (‘magit-submodule-update’) - +‘o u’ (‘magit-submodule-update’) This command updates the selected modules checking out the recorded commits. -‘o s’ (‘magit-submodule-synchronize’) - +‘o s’ (‘magit-submodule-synchronize’) This command synchronizes the urls of the selected modules, copying the values from ".gitmodules" to the ".git/config" of the super-project as well those of the modules. -‘o d’ (‘magit-submodule-unpopulate’) - +‘o d’ (‘magit-submodule-unpopulate’) This command removes the working directory of the selected modules. -‘o l’ (‘magit-list-submodules’) - +‘o l’ (‘magit-list-submodules’) This command displays a list of the current repository’s modules. -‘o f’ (‘magit-fetch-modules’) - +‘o f’ (‘magit-fetch-modules’) This command fetches all modules. Option ‘magit-fetch-modules-jobs’ controls how many submodules are @@ -7778,3 +7218,3778 @@ modules. because ‘git fetch’ does not support not doing that. With a prefix argument fetch all remotes. + +File: magit.info, Node: Subtree, Next: Worktree, Prev: Submodules, Up: Miscellaneous + +8.4 Subtree +=========== + +Also see *note (gitman)git-subtree::. + +‘O’ (‘magit-subtree’) + This transient prefix command binds the two sub-transients; one for + importing a subtree and one for exporting a subtree. + +‘O i’ (‘magit-subtree-import’) + This transient prefix command binds the following suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. + + The suffixes of this command import subtrees. + + If the ‘--prefix’ argument is set, then the suffix commands use + that prefix without prompting the user. If it is unset, then they + read the prefix in the minibuffer. + +‘O i a’ (‘magit-subtree-add’) + This command adds COMMIT from REPOSITORY as a new subtree at + PREFIX. + +‘O i c’ (‘magit-subtree-add-commit’) + This command add COMMIT as a new subtree at PREFIX. + +‘O i m’ (‘magit-subtree-merge’) + This command merges COMMIT into the PREFIX subtree. + +‘O i f’ (‘magit-subtree-pull’) + This command pulls COMMIT from REPOSITORY into the PREFIX subtree. + +‘O e’ (‘magit-subtree-export’) + This transient prefix command binds the following suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. + + The suffixes of this command export subtrees. + + If the ‘--prefix’ argument is set, then the suffix commands use + that prefix without prompting the user. If it is unset, then they + read the prefix in the minibuffer. + +‘O e p’ (‘magit-subtree-push’) + This command extract the history of the subtree PREFIX and pushes + it to REF on REPOSITORY. + +‘O e s’ (‘magit-subtree-split’) + This command extracts the history of the subtree PREFIX. + + +File: magit.info, Node: Worktree, Next: Bundle, Prev: Subtree, Up: Miscellaneous + +8.5 Worktree +============ + +Also see *note (gitman)git-worktree::. + +‘Z’ (‘magit-worktree’) + This transient prefix command binds the following suffix commands + and displays them in a temporary buffer until a suffix is invoked. + +‘Z b’ (‘magit-worktree-checkout’) + Checkout BRANCH in a new worktree at PATH. + +‘Z c’ (‘magit-worktree-branch’) + Create a new BRANCH and check it out in a new worktree at PATH. + +‘Z m’ (‘magit-worktree-move’) + Move an existing worktree to a new PATH. + +‘Z k’ (‘magit-worktree-delete’) + Delete a worktree, defaulting to the worktree at point. The + primary worktree cannot be deleted. + +‘Z g’ (‘magit-worktree-status’) + Show the status for the worktree at point. + + If there is no worktree at point, then read one in the minibuffer. + If the worktree at point is the one whose status is already being + displayed in the current buffer, then show it in Dired instead. + + +File: magit.info, Node: Bundle, Next: Common Commands, Prev: Worktree, Up: Miscellaneous + +8.6 Bundle +========== + +Also see *note (gitman)git-bundle::. + + -- Command: magit-bundle + This transient prefix command binds several suffix commands for + running ‘git bundle’ subcommands and displays them in a temporary + buffer until a suffix is invoked. + + +File: magit.info, Node: Common Commands, Next: Wip Modes, Prev: Bundle, Up: Miscellaneous + +8.7 Common Commands +=================== + + -- Command: magit-switch-to-repository-buffer + -- Command: magit-switch-to-repository-buffer-other-window + -- Command: magit-switch-to-repository-buffer-other-frame + -- Command: magit-display-repository-buffer + These commands read any existing Magit buffer that belongs to the + current repository from the user and then switch to the selected + buffer (without refreshing it). + + The last variant uses ‘magit-display-buffer’ to do so and thus + respects ‘magit-display-buffer-function’. + + These are some of the commands that can be used in all buffers whose +major-modes derive from ‘magit-mode’. There are other common commands +beside the ones below, but these didn’t fit well anywhere else. + +‘C-w’ (‘magit-copy-section-value’) + This command saves the value of the current section to the + ‘kill-ring’, and, provided that the current section is a commit, + branch, or tag section, it also pushes the (referenced) revision to + the ‘magit-revision-stack’. + + When the current section is a branch or a tag, and a prefix + argument is used, then it saves the revision at its tip to the + ‘kill-ring’ instead of the reference name. + + When the region is active, this command saves that to the + ‘kill-ring’, like ‘kill-ring-save’ would, instead of behaving as + described above. If a prefix argument is used and the region is + within a hunk, then it strips the diff marker column and keeps only + either the added or removed lines, depending on the sign of the + prefix argument. + +‘M-w’ (‘magit-copy-buffer-revision’) + This command saves the revision being displayed in the current + buffer to the ‘kill-ring’ and also pushes it to the + ‘magit-revision-stack’. It is mainly intended for use in + ‘magit-revision-mode’ buffers, the only buffers where it is always + unambiguous exactly which revision should be saved. + + Most other Magit buffers usually show more than one revision, in + some way or another, so this command has to select one of them, and + that choice might not always be the one you think would have been + the best pick. + + Outside of Magit ‘M-w’ and ‘C-w’ are usually bound to +‘kill-ring-save’ and ‘kill-region’, and these commands would also be +useful in Magit buffers. Therefore when the region is active, then both +of these commands behave like ‘kill-ring-save’ instead of as described +above. + + +File: magit.info, Node: Wip Modes, Next: Commands for Buffers Visiting Files, Prev: Common Commands, Up: Miscellaneous + +8.8 Wip Modes +============= + +Git keeps *committed* changes around long enough for users to recover +changes they have accidentally deleted. It does so by not garbage +collecting any committed but no longer referenced objects for a certain +period of time, by default 30 days. + + But Git does *not* keep track of *uncommitted* changes in the working +tree and not even the index (the staging area). Because Magit makes it +so convenient to modify uncommitted changes, it also makes it easy to +shoot yourself in the foot in the process. + + For that reason Magit provides a global mode that saves *tracked* +files to work-in-progress references after or before certain actions. +(At present untracked files are never saved and for technical reasons +nothing is saved before the first commit has been created). + + Two separate work-in-progress references are used to track the state +of the index and of the working tree: ‘refs/wip/index/’ and +‘refs/wip/wtree/’, where ‘’ is the full ref of the +current branch, e.g. ‘refs/heads/master’. When the ‘HEAD’ is detached +then ‘HEAD’ is used in place of ‘’. + + Checking out another branch (or detaching ‘HEAD’) causes the use of +different wip refs for subsequent changes. + + -- User Option: magit-wip-mode + When this mode is enabled, then uncommitted changes are committed + to dedicated work-in-progress refs whenever appropriate (i.e. when + dataloss would be a possibility otherwise). + + 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. + + -- Command: magit-wip-log + This command shows the log for a branch and its wip refs. With a + negative prefix argument only the worktree wip ref is shown. + + The absolute numeric value of the prefix argument controls how many + "branches" of each wip ref are shown. This is only relevant if the + value of ‘magit-wip-merge-branch’ is ‘nil’. + + -- Command: magit-wip-log-current + This command shows the log for the current branch and its wip refs. + With a negative prefix argument only the worktree wip ref is shown. + + The absolute numeric value of the prefix argument controls how many + "branches" of each wip ref are shown. This is only relevant if the + value of ‘magit-wip-merge-branch’ is ‘nil’. + +‘X w’ (‘magit-reset-worktree’) + This command resets the working tree to some commit read from the + user and defaulting to the commit at point, while keeping the + ‘HEAD’ and index as-is. + + This can be used to restore files to the state committed to a wip + ref. Note that this will discard any unstaged changes that might + have existed before invoking this command (but of course only after + committing that to the working tree wip ref). + + Note that even if you enable ‘magit-wip-mode’ this won’t give you +perfect protection. The most likely scenario for losing changes despite +the use of ‘magit-wip-mode’ is making a change outside Emacs and then +destroying it also outside Emacs. In some such a scenario, Magit, being +an Emacs package, didn’t get the opportunity to keep you from shooting +yourself in the foot. + + When you are unsure whether Magit did commit a change to the wip +refs, then you can explicitly request that all changes to all tracked +files are being committed. + +‘M-x magit-wip-commit’ + This command commits all changes to all tracked files to the index + and working tree work-in-progress refs. Like the modes described + above, it does not commit untracked files, but it does check all + tracked files for changes. Use this command when you suspect that + the modes might have overlooked a change made outside Emacs/Magit. + + -- User Option: magit-wip-namespace + The namespace used for work-in-progress refs. It has to end with a + slash. The wip refs are named ‘index/’ and + ‘wtree/’. When snapshots are created while + the ‘HEAD’ is detached then ‘HEAD’ is used in place of + ‘’. + + -- User Option: magit-wip-mode-lighter + Mode-line lighter for ‘magit-wip--mode’. + +* Menu: + +* Wip Graph:: +* Legacy Wip Modes:: + + +File: magit.info, Node: Wip Graph, Next: Legacy Wip Modes, Up: Wip Modes + +8.8.1 Wip Graph +--------------- + + -- User Option: magit-wip-merge-branch + 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 + 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. + With this setting wip commits are eventually garbage collected. + + When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like +this: + + *--*--*--*--*--* refs/wip/index/refs/heads/master + / / / + A-----B-----C refs/heads/master + + When ‘magit-wip-merge-branch’ is ‘nil’, then creating a commit on the +real branch and then making a change causes the wip refs to be recreated +to fork from the new commit. But the old commits on the wip refs are +not lost. They are still available from the reflog. To make it easier +to see when the fork point of a wip ref was changed, an additional +commit with the message "restart autosaving" is created on it (‘xxO’ +commits below are such boundary commits). + + Starting with + + BI0---BI1 refs/wip/index/refs/heads/master + / + A---B refs/heads/master + \ + BW0---BW1 refs/wip/wtree/refs/heads/master + + and committing the staged changes and editing and saving a file would +result in + + BI0---BI1 refs/wip/index/refs/heads/master + / + A---B---C refs/heads/master + \ \ + \ CW0---CW1 refs/wip/wtree/refs/heads/master + \ + BW0---BW1 refs/wip/wtree/refs/heads/master@{2} + + The fork-point of the index wip ref is not changed until some change +is being staged. Likewise just checking out a branch or creating a +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. + + +File: magit.info, Node: Legacy Wip Modes, Prev: Wip Graph, Up: Wip Modes + +8.8.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 + +8.9 Commands for Buffers Visiting Files +======================================= + +Magit defines a few global key bindings unless the user sets +‘magit-define-global-key-bindings’ to ‘nil’. This includes binding ‘C-c +M-g’ to ‘magit-file-dispatch’. ‘C-c g’ would be a much better binding +but the ‘C-c ’ namespace is reserved for users, meaning that +packages are not allowed to use it. If you want to use ‘C-c g’, then +you have to add that binding yourself. Also see *note Default +Bindings:: and *note (elisp)Key Binding Conventions::. + + If you want a better binding, you have to add it yourself: + + (global-set-key (kbd "C-c g") 'magit-file-dispatch) + + The key bindings shown below assume that you have not improved the +binding for ‘magit-file-dispatch’. + +‘C-c M-g’ (‘magit-file-dispatch’) + This transient prefix command binds the following suffix commands + and displays them in a temporary buffer until a suffix is invoked. + + When invoked in a buffer that does not visit a file, then it falls + back to regular ‘magit-dispatch’. + +‘C-c M-g s’ (‘magit-stage-file’) + Stage all changes to the file being visited in the current buffer. + +‘C-c M-g u’ (‘magit-unstage-file’) + Unstage all changes to the file being visited in the current + buffer. + +‘C-c M-g c’ (‘magit-commit’) + This transient prefix command binds the following suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. See *note Initiating a + Commit::. + +‘C-c M-g D’ (‘magit-diff’) + This transient prefix command binds several diff suffix commands + and infix arguments and displays them in a temporary buffer until a + suffix is invoked. See *note Diffing::. + + This is the same command that ‘d’ is bound to in Magit buffers. If + this command is invoked from a file-visiting buffer, then the + initial value of the option (‘--’) that limits the diff to certain + file(s) is set to the visited file. + +‘C-c M-g d’ (‘magit-diff-buffer-file’) + This command shows the diff for the file of blob that the current + buffer visits. + + -- User Option: magit-diff-buffer-file-locked + This option controls whether ‘magit-diff-buffer-file’ uses a + dedicated buffer. See *note Modes and Buffers::. + +‘C-c M-g L’ (‘magit-log’) + This transient prefix command binds several log suffix commands and + infix arguments and displays them in a temporary buffer until a + suffix is invoked. See *note Logging::. + + This is the same command that ‘l’ is bound to in Magit buffers. If + this command is invoked from a file-visiting buffer, then the + initial value of the option (‘--’) that limits the log to certain + file(s) is set to the visited file. + +‘C-c M-g l’ (‘magit-log-buffer-file’) + This command shows the log for the file of blob that the current + buffer visits. Renames are followed when a prefix argument is used + or when ‘--follow’ is an active log argument. When the region is + active, the log is restricted to the selected line range. + +‘C-c M-g t’ (‘magit-log-trace-definition’) + This command shows the log for the definition at point. + + -- User Option: magit-log-buffer-file-locked + This option controls whether ‘magit-log-buffer-file’ uses a + dedicated buffer. See *note Modes and Buffers::. + +‘C-c M-g B’ (‘magit-blame’) + This transient prefix command binds all blaming suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. + + For more information about this and the following commands also see + *note Blaming::. + + In addition to the ‘magit-blame’ sub-transient, the dispatch +transient also binds several blaming suffix commands directly. See +*note Blaming:: for information about those commands and bindings. + +‘C-c M-g e’ (‘magit-edit-line-commit’) + This command makes the commit editable that added the current line. + + With a prefix argument it makes the commit editable that removes + the line, if any. The commit is determined using ‘git blame’ and + made editable using ‘git rebase --interactive’ if it is reachable + from ‘HEAD’, or by checking out the commit (or a branch that points + at it) otherwise. + +‘C-c M-g p’ (‘magit-blob-previous’) + Visit the previous blob which modified the current file. + + There are a few additional commands that operate on a single file but +are not enabled in the file transient command by default: + + -- Command: magit-file-rename + This command renames a file read from the user. + + -- Command: magit-file-delete + This command deletes a file read from the user. + + -- Command: magit-file-untrack + This command untracks a file read from the user. + + -- Command: magit-file-checkout + This command updates a file in the working tree and index to the + contents from a revision. Both the revision and file are read from + the user. + + To enable them invoke the transient (‘C-c M-g’), enter "edit mode" +(‘C-x l’), set the "transient level" (‘C-x l’ again), enter ‘5’, and +leave edit mode (‘C-g’). Also see *note (transient)Enabling and +Disabling Suffixes::. + + +File: magit.info, Node: Minor Mode for Buffers Visiting Blobs, Prev: Commands for Buffers Visiting Files, Up: Miscellaneous + +8.10 Minor Mode for Buffers Visiting Blobs +========================================== + +The ‘magit-blob-mode’ enables certain Magit features in blob-visiting +buffers. Such buffers can be created using ‘magit-find-file’ and some +of the commands mentioned below, which also take care of turning on this +minor mode. Currently this mode only establishes a few key bindings, +but this might be extended. + +‘p’ (‘magit-blob-previous’) + Visit the previous blob which modified the current file. + +‘n’ (‘magit-blob-next’) + Visit the next blob which modified the current file. + +‘q’ (‘magit-kill-this-buffer’) + Kill the current buffer. + + +File: magit.info, Node: Customizing, Next: Plumbing, Prev: Miscellaneous, Up: Top + +9 Customizing +************* + +Both Git and Emacs are highly customizable. Magit is both a Git +porcelain as well as an Emacs package, so it makes sense to customize it +using both Git variables as well as Emacs options. However this +flexibility doesn’t come without problems, including but not limited to +the following. + + • Some Git variables automatically have an effect in Magit without + requiring any explicit support. Sometimes that is desirable - in + other cases, it breaks Magit. + + When a certain Git setting breaks Magit but you want to keep using + that setting on the command line, then that can be accomplished by + overriding the value for Magit only by appending something like + ‘("-c" "some.variable=compatible-value")’ to + ‘magit-git-global-arguments’. + + • Certain settings like ‘fetch.prune=true’ are respected by Magit + commands (because they simply call the respective Git command) but + their value is not reflected in the respective transient buffers. + In this case the ‘--prune’ argument in ‘magit-fetch’ might be + active or inactive, but that doesn’t keep the Git variable from + being honored by the suffix commands anyway. So pruning might + happen despite the ‘--prune’ arguments being displayed in a way + that seems to indicate that no pruning will happen. + + I intend to address these and similar issues in a future release. + +* Menu: + +* Per-Repository Configuration:: +* Essential Settings:: + + +File: magit.info, Node: Per-Repository Configuration, Next: Essential Settings, Up: Customizing + +9.1 Per-Repository Configuration +================================ + +Magit can be configured on a per-repository level using both Git +variables as well as Emacs options. + + To set a Git variable for one repository only, simply set it in +‘/path/to/repo/.git/config’ instead of ‘$HOME/.gitconfig’ or +‘/etc/gitconfig’. See *note (gitman)git-config::. + + Similarly, Emacs options can be set for one repository only by +editing ‘/path/to/repo/.dir-locals.el’. See *note (emacs)Directory +Variables::. For example to disable automatic refreshes of +file-visiting buffers in just one huge repository use this: + + • ‘/path/to/huge/repo/.dir-locals.el’ + + ((nil . ((magit-refresh-buffers . nil)))) + + It might only be costly to insert certain information into Magit +buffers for repositories that are exceptionally large, in which case you +can disable the respective section inserters just for that repository: + + • ‘/path/to/tag/invested/repo/.dir-locals.el’ + + ((magit-status-mode + . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header))))) + + -- Function: magit-disable-section-inserter fn + This function disables the section inserter FN in the current + repository. It is only intended for use in ‘.dir-locals.el’ and + ‘.dir-locals-2.el’. + + If you want to apply the same settings to several, but not all, +repositories then keeping the repository-local config files in sync +would quickly become annoying. To avoid that you can create config +files for certain classes of repositories (e.g. "huge repositories") +and then include those files in the per-repository config files. For +example: + + • ‘/path/to/huge/repo/.git/config’ + + [include] + path = /path/to/huge-gitconfig + + • ‘/path/to/huge-gitconfig’ + + [status] + showUntrackedFiles = no + + • ‘$HOME/.emacs.d/init.el’ + + (dir-locals-set-class-variables 'huge-git-repository + '((nil . ((magit-refresh-buffers . nil))))) + + (dir-locals-set-directory-class + "/path/to/huge/repo/" 'huge-git-repository) + + +File: magit.info, Node: Essential Settings, Prev: Per-Repository Configuration, Up: Customizing + +9.2 Essential Settings +====================== + +The next two sections list and discuss several variables that many users +might want to customize, for safety and/or performance reasons. + +* Menu: + +* Safety:: +* Performance:: +* Default Bindings:: + + +File: magit.info, Node: Safety, Next: Performance, Up: Essential Settings + +9.2.1 Safety +------------ + +This section discusses various variables that you might want to change +(or *not* change) for safety reasons. + + Git keeps *committed* changes around long enough for users to recover +changes they have accidentally been deleted. It does not do the same +for *uncommitted* changes in the working tree and not even the index +(the staging area). Because Magit makes it so easy to modify +uncommitted changes, it also makes it easy to shoot yourself in the foot +in the process. For that reason Magit provides three global modes that +save *tracked* files to work-in-progress references after or before +certain actions. See *note Wip Modes::. + + These modes are not enabled by default because of performance +concerns. Instead a lot of potentially destructive commands require +confirmation every time they are used. In many cases this can be +disabled by adding a symbol to ‘magit-no-confirm’ (see *note Completion +and Confirmation::). If you enable the various wip modes then you +should add ‘safe-with-wip’ to this list. + + Similarly it isn’t necessary to require confirmation before moving a +file to the system trash - if you trashed a file by mistake then you can +recover it from there. Option ‘magit-delete-by-moving-to-trash’ +controls whether the system trash is used, which is the case by default. +Nevertheless, ‘trash’ isn’t a member of ‘magit-no-confirm’ - you might +want to change that. + + By default buffers visiting files are automatically reverted when the +visited file changes on disk. This isn’t as risky as it might seem, but +to make an informed decision you should see *note Risk of Reverting +Automatically::. + + +File: magit.info, Node: Performance, Next: Default Bindings, Prev: Safety, Up: Essential Settings + +9.2.2 Performance +----------------- + +After Magit has run ‘git’ for side-effects, it also refreshes the +current Magit buffer and the respective status buffer. This is +necessary because otherwise outdated information might be displayed +without the user noticing. Magit buffers are updated by recreating +their content from scratch, which makes updating simpler and less +error-prone, but also more costly. Keeping it simple and just +re-creating everything from scratch is an old design decision and +departing from that will require major refactoring. + + I plan to do that in time for the next major release. I also intend +to create logs and diffs asynchronously, which should also help a lot +but also requires major refactoring. + + Meanwhile you can tell Magit to only automatically refresh the +current Magit buffer, but not the status buffer. If you do that, then +the status buffer is only refreshed automatically if it is the current +buffer. + + (setq magit-refresh-status-buffer nil) + + You should also check whether any third-party packages have added +anything to ‘magit-refresh-buffer-hook’, ‘magit-status-refresh-hook’, +‘magit-pre-refresh-hook’, and ‘magit-post-refresh-hook’. If so, then +check whether those additions impact performance significantly. + + Magit can be told to refresh buffers verbosely using ‘M-x +magit-toggle-verbose-refresh’. Enabling this helps figuring out which +sections are bottlenecks. The additional output can be found in the +‘*Messages*’ buffer. + + Magit also reverts buffers for visited files located inside the +current repository when the visited file changes on disk. That is +implemented on top of ‘auto-revert-mode’ from the built-in library +‘autorevert’. To figure out whether that impacts performance, check +whether performance is significantly worse, when many buffers exist +and/or when some buffers visit files using TRAMP. If so, then this +should help. + + (setq auto-revert-buffer-list-filter + 'magit-auto-revert-repository-buffer-p) + + For alternative approaches see *note Automatic Reverting of +File-Visiting Buffers::. + + If you have enabled any features that are disabled by default, then +you should check whether they impact performance significantly. It’s +likely that they were not enabled by default because it is known that +they reduce performance at least in large repositories. + + If performance is only slow inside certain unusually large +repositories, then you might want to disable certain features on a +per-repository or per-repository-class basis only. See *note +Per-Repository Configuration::. For example it takes a long time to +determine the next and current tag in repository with exceptional +numbers of tags. It would therefore be a good idea to disable +‘magit-insert-tags-headers’, as explained at the mentioned node. + +* Menu: + +* Microsoft Windows Performance:: +* MacOS Performance:: + +Log Performance +............... + +When showing logs, Magit limits the number of commits initially shown in +the hope that this avoids unnecessary work. When using ‘--graph’ is +used, then this unfortunately does not have the desired effect for large +histories. Junio, Git’s maintainer, said on the git mailing list +(): "‘--graph’ wants to +compute the whole history and the max-count only affects the output +phase after ‘--graph’ does its computation". + + In other words, it’s not that Git is slow at outputting the +differences, or that Magit is slow at parsing the output - the problem +is that Git first goes outside and has a smoke. + + We actually work around this issue by limiting the number of commits +not only by using ‘-’ but by also using a range. But unfortunately +that’s not always possible. + + When more than a few thousand commits are shown, then the use of +‘--graph’ can slow things down. + + Using ‘--color --graph’ is even slower. Magit uses code that is part +of Emacs to turn control characters into faces. That code is pretty +slow and this is quite noticeable when showing a log with many branches +and merges. For that reason ‘--color’ is not enabled by default +anymore. Consider leaving it at that. + +Diff Performance +................ + +If diffs are slow, then consider turning off some optional diff features +by setting all or some of the following variables to ‘nil’: +‘magit-diff-highlight-indentation’, ‘magit-diff-highlight-trailing’, +‘magit-diff-paint-whitespace’, ‘magit-diff-highlight-hunk-body’, and +‘magit-diff-refine-hunk’. + + When showing a commit instead of some arbitrary diff, then some +additional information is displayed. Calculating this information can +be quite expensive given certain circumstances. If looking at a commit +using ‘magit-revision-mode’ takes considerably more time than looking at +the same commit in ‘magit-diff-mode’, then consider setting +‘magit-revision-insert-related-refs’ to ‘nil’. + + When you are often confronted with diffs that contain deleted files, +then you might want to enable the ‘--irreversible-delete’ argument. If +you do that then diffs still show that a file was deleted but without +also showing the complete deleted content of the file. This argument is +not available by default, see *note (transient)Enabling and Disabling +Suffixes::. Once you have done that you should enable it and save that +setting, see *note (transient)Saving Values::. You should do this in +both the diff (‘d’) and the diff refresh (‘D’) transient popups. + +Refs Buffer Performance +....................... + +When refreshing the "references buffer" is slow, then that’s usually +because several hundred refs are being displayed. The best way to +address that is to display fewer refs, obviously. + + If you are not, or only mildly, interested in seeing the list of +tags, then start by not displaying them: + + (remove-hook 'magit-refs-sections-hook 'magit-insert-tags) + + Then you should also make sure that the listed remote branches +actually all exist. You can do so by pruning branches which no longer +exist using ‘f-pa’. + +Committing Performance +...................... + +When you initiate a commit, then Magit by default automatically shows a +diff of the changes you are about to commit. For large commits this can +take a long time, which is especially distracting when you are +committing large amounts of generated data which you don’t actually +intend to inspect before committing. This behavior can be turned off +using: + + (remove-hook 'server-switch-hook 'magit-commit-diff) + + Then you can type ‘C-c C-d’ to show the diff when you actually want +to see it, but only then. Alternatively you can leave the hook alone +and just type ‘C-g’ in those cases when it takes too long to generate +the diff. If you do that, then you will end up with a broken diff +buffer, but doing it this way has the advantage that you usually get to +see the diff, which is useful because it increases the odds that you +spot potential issues. + + +File: magit.info, Node: Microsoft Windows Performance, Next: MacOS Performance, Up: Performance + +Microsoft Windows Performance +............................. + +In order to update the status buffer, ‘git’ has to be run a few dozen +times. That is problematic on Microsoft Windows, because that operating +system is exceptionally slow at starting processes. Sadly this is an +issue that can only be fixed by Microsoft itself, and they don’t appear +to be particularly interested in doing so. + + Beside the subprocess issue, there are also other Windows-specific +performance issues. Some of these have workarounds. The maintainers of +"Git for Windows" try to improve performance on Windows. Always use the +latest release in order to benefit from the latest performance tweaks. +Magit too tries to work around some Windows-specific issues. + + According to some sources, setting the following Git variables can +also help. + + git config --global core.preloadindex true # default since v2.1 + git config --global core.fscache true # default since v2.8 + git config --global gc.auto 256 + + You should also check whether an anti-virus program is affecting +performance. + + +File: magit.info, Node: MacOS Performance, Prev: Microsoft Windows Performance, Up: Performance + +MacOS Performance +................. + +Before Emacs 26.1 child processes were created using ‘fork’ on macOS. +That needlessly copied GUI resources, which is expensive. The result +was that forking took about 30 times as long on Darwin than on Linux, +and because Magit starts many ‘git’ processes that made quite a +difference. + + So make sure that you are using at least Emacs 26.1, in which case +the faster ‘vfork’ will be used. (The creation of child processes still +takes about twice as long on Darwin compared to Linux.) See (1) for +more information. + + ---------- Footnotes ---------- + + (1) + + + +File: magit.info, Node: Default Bindings, Prev: Performance, Up: Essential Settings + +9.2.3 Default Bindings +---------------------- + + -- User Option: magit-define-global-key-bindings + This option controls whether some Magit commands are automatically + bound in the global keymap even before Magit is used for the first + time in the current session. + + If this variable is non-nil, which it is by default, then the + following bindings may be added to the global keymap. + + ‘C-x g’ ‘magit-status’ + ‘C-x M-g’ ‘magit-dispatch’ + ‘C-c M-g’ ‘magit-file-dispatch’ + + These bindings may be added when ‘after-init-hook’ is run. Each + binding is added if and only if at that time no other key is bound + to the same command and no other command is bound to the same key. + In other words we try to avoid adding bindings that are + unnecessary, as well as bindings that conflict with other bindings. + + Adding the above bindings is delayed until ‘after-init-hook’ is + called to allow users to set the variable anywhere in their init + file (without having to make sure to do so before ‘magit’ is loaded + or autoloaded) and to increase the likelihood that all the + potentially conflicting user bindings have already been added. + + To set this variable use either ‘setq’ or the Custom interface. Do + not use the function ‘customize-set-variable’ because doing that + would cause Magit to be loaded immediately when that form is + evaluated (this differs from ‘custom-set-variables’, which doesn’t + load the libraries that define the customized variables). + + Setting this variable to nil has no effect if that is done after + the key bindings have already been added. + + We recommend that you bind ‘C-c g’ instead of ‘C-c M-g’ to + ‘magit-file-dispatch’. The former is a much better binding but the + ‘C-c ’ namespace is strictly reserved for users; preventing + Magit from using it by default. + + (global-set-key (kbd "C-c g") 'magit-file-dispatch) + + Also see *note Commands for Buffers Visiting Files:: and *note + (elisp)Key Binding Conventions::. + + +File: magit.info, Node: Plumbing, Next: FAQ, Prev: Customizing, Up: Top + +10 Plumbing +*********** + +The following sections describe how to use several of Magit’s core +abstractions to extend Magit itself or implement a separate extension. + + A few of the low-level features used by Magit have been factored out +into separate libraries/packages, so that they can be used by other +packages, without having to depend on Magit. See *note +(with-editor)Top:: for information about ‘with-editor’. ‘transient’ +doesn’t have a manual yet. + + If you are trying to find an unused key that you can bind to a +command provided by your own Magit extension, then checkout +. + +* Menu: + +* Calling Git:: +* Section Plumbing:: +* Refreshing Buffers:: +* Conventions:: + + +File: magit.info, Node: Calling Git, Next: Section Plumbing, Up: Plumbing + +10.1 Calling Git +================ + +Magit provides many specialized functions for calling Git. All of these +functions are defined in either ‘magit-git.el’ or ‘magit-process.el’ and +have one of the prefixes ‘magit-run-’, ‘magit-call-’, ‘magit-start-’, or +‘magit-git-’ (which is also used for other things). + + All of these functions accept an indefinite number of arguments, +which are strings that specify command line arguments for Git (or in +some cases an arbitrary executable). These arguments are flattened +before being passed on to the executable; so instead of strings they can +also be lists of strings and arguments that are ‘nil’ are silently +dropped. Some of these functions also require a single mandatory +argument before these command line arguments. + + Roughly speaking, these functions run Git either to get some value or +for side-effects. The functions that return a value are useful to +collect the information necessary to populate a Magit buffer, while the +others are used to implement Magit commands. + + The functions in the value-only group always run synchronously, and +they never trigger a refresh. The function in the side-effect group can +be further divided into subgroups depending on whether they run Git +synchronously or asynchronously, and depending on whether they trigger a +refresh when the executable has finished. + +* Menu: + +* Getting a Value from Git:: +* Calling Git for Effect:: + + +File: magit.info, Node: Getting a Value from Git, Next: Calling Git for Effect, Up: Calling Git + +10.1.1 Getting a Value from Git +------------------------------- + +These functions run Git in order to get a value, an exit status, or +output. Of course you could also use them to run Git commands that have +side-effects, but that should be avoided. + + -- Function: magit-git-exit-code &rest args + Executes git with ARGS and returns its exit code. + + -- Function: magit-git-success &rest args + Executes git with ARGS and returns ‘t’ if the exit code is ‘0’, + ‘nil’ otherwise. + + -- Function: magit-git-failure &rest args + Executes git with ARGS and returns ‘t’ if the exit code is ‘1’, + ‘nil’ otherwise. + + -- Function: magit-git-true &rest args + Executes git with ARGS and returns ‘t’ if the first line printed by + git is the string "true", ‘nil’ otherwise. + + -- Function: magit-git-false &rest args + Executes git with ARGS and returns ‘t’ if the first line printed by + git is the string "false", ‘nil’ otherwise. + + -- Function: magit-git-insert &rest args + Executes git with ARGS and inserts its output at point. + + -- Function: magit-git-string &rest args + Executes git with ARGS and returns the first line of its output. + If there is no output or if it begins with a newline character, + then this returns ‘nil’. + + -- Function: magit-git-lines &rest args + Executes git with ARGS and returns its output as a list of lines. + Empty lines anywhere in the output are omitted. + + -- Function: magit-git-items &rest args + 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 + 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. + + -- Function: magit-process-git destination &rest args + Calls Git synchronously in a separate process, returning its exit + code. DESTINATION specifies how to handle the output, like for + ‘call-process’, except that file handlers are supported. Enables + Cygwin’s "noglob" option during the call and ensures unix eol + conversion. + + -- Function: magit-process-file process &optional infile buffer display + &rest args + Processes files synchronously in a separate process. Identical to + ‘process-file’ but temporarily enables Cygwin’s "noglob" option + during the call and ensures unix eol conversion. + + If an error occurs when using one of the above functions, then that +is usually due to a bug, i.e. using an argument which is not actually +supported. Such errors are usually not reported, but when they occur we +need to be able to debug them. + + -- User Option: magit-git-debug + Whether to report errors that occur when using ‘magit-git-insert’, + ‘magit-git-string’, ‘magit-git-lines’, or ‘magit-git-items’. This + does not actually raise an error. Instead a message is shown in + the echo area, and git’s standard error is insert into a new + section in the current repository’s process buffer. + + -- Function: magit-git-str &rest args + This is a variant of ‘magit-git-string’ that ignores the option + ‘magit-git-debug’. It is mainly intended to be used while handling + errors in functions that do respect that option. Using such a + function while handing an error could cause yet another error and + therefore lead to an infinite recursion. You probably won’t ever + need to use this function. + + +File: magit.info, Node: Calling Git for Effect, Prev: Getting a Value from Git, Up: Calling Git + +10.1.2 Calling Git for Effect +----------------------------- + +These functions are used to run git to produce some effect. Most Magit +commands that actually run git do so by using such a function. + + Because we do not need to consume git’s output when using these +functions, their output is instead logged into a per-repository buffer, +which can be shown using ‘$’ from a Magit buffer or ‘M-x magit-process’ +elsewhere. + + These functions can have an effect in two distinct ways. Firstly, +running git may change something, i.e. create or push a new commit. +Secondly, that change may require that Magit buffers are refreshed to +reflect the changed state of the repository. But refreshing isn’t +always desirable, so only some of these functions do perform such a +refresh after git has returned. + + Sometimes it is useful to run git asynchronously. For example, when +the user has just initiated a push, then there is no reason to make her +wait until that has completed. In other cases it makes sense to wait +for git to complete before letting the user do something else. For +example after staging a change it is useful to wait until after the +refresh because that also automatically moves to the next change. + + -- Function: magit-call-git &rest args + Calls git synchronously with ARGS. + + -- Function: magit-call-process program &rest args + Calls PROGRAM synchronously with ARGS. + + -- Function: magit-run-git &rest args + Calls git synchronously with ARGS and then refreshes. + + -- Function: magit-run-git-with-input &rest args + Calls git synchronously with ARGS and sends it the content of the + current buffer on standard input. + + If the current buffer’s ‘default-directory’ is on a remote + filesystem, this function actually runs git asynchronously. But + then it waits for the process to return, so the function itself is + synchronous. + + -- Function: magit-git &rest args + Calls git synchronously with ARGS for side-effects only. This + function does not refresh the buffer. + + -- Function: magit-git-wash washer &rest args + Execute Git with ARGS, inserting washed output at point. Actually + first insert the raw output at point. If there is no output call + ‘magit-cancel-section’. Otherwise temporarily narrow the buffer to + the inserted text, move to its beginning, and then call function + WASHER with ARGS as its sole argument. + + And now for the asynchronous variants. + + -- Function: magit-run-git-async &rest args + Start Git, prepare for refresh, and return the process object. + ARGS is flattened and then used as arguments to Git. + + Display the command line arguments in the echo area. + + After Git returns some buffers are refreshed: the buffer that was + 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. + + -- Function: magit-run-git-with-editor &rest args + Export GIT_EDITOR and start Git. Also prepare for refresh and + return the process object. ARGS is flattened and then used as + arguments to Git. + + Display the command line arguments in the echo area. + + After Git returns some buffers are refreshed: the buffer that was + current when this function was called (if it is a Magit buffer and + still alive), as well as the respective Magit status buffer. + + -- 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 + existing buffer. The buffer content becomes the processes standard + input. + + Option ‘magit-git-executable’ specifies the Git executable and + option ‘magit-git-global-arguments’ specifies constant arguments. + The remaining arguments ARGS specify arguments to Git. They are + flattened before use. + + After Git returns, some buffers are refreshed: the buffer that was + 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. + + -- 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 + processes standard input. + + The process is started using ‘start-file-process’ and then setup to + use the sentinel ‘magit-process-sentinel’ and the filter + ‘magit-process-filter’. Information required by these functions is + stored in the process object. When this function returns the + process has not started to run yet so it is possible to override + the sentinel and filter. + + After the process returns, ‘magit-process-sentinel’ refreshes the + buffer that was current when ‘magit-start-process’ 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. + + -- 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. + + +File: magit.info, Node: Section Plumbing, Next: Refreshing Buffers, Prev: Calling Git, Up: Plumbing + +10.2 Section Plumbing +===================== + +* Menu: + +* Creating Sections:: +* Section Selection:: +* Matching Sections:: + + +File: magit.info, Node: Creating Sections, Next: Section Selection, Up: Section Plumbing + +10.2.1 Creating Sections +------------------------ + + -- Macro: magit-insert-section &rest args + Insert a section at point. + + TYPE is the section type, a symbol. Many commands that act on the + current section behave differently depending on that type. Also if + a variable ‘magit-TYPE-section-map’ exists, then use that as the + text-property ‘keymap’ of all text belonging to the section (but + this may be overwritten in subsections). TYPE can also have the + form ‘(eval FORM)’ in which case FORM is evaluated at runtime. + + 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). + + BODY is any number of forms that actually insert the section’s + heading and body. Optional NAME, if specified, has to be a symbol, + which is then bound to the struct of the section being inserted. + + Before BODY is evaluated the ‘start’ of the section object is set + to the value of ‘point’ and after BODY was evaluated its ‘end’ is + set to the new value of ‘point’; BODY is responsible for moving + ‘point’ forward. + + If it turns out inside BODY that the section is empty, then + ‘magit-cancel-section’ can be used to abort and remove all traces + of the partially inserted section. This can happen when creating a + section by washing Git’s output and Git didn’t actually output + anything this time around. + + -- Function: magit-insert-heading &rest args + Insert the heading for the section currently being inserted. + + This function should only be used inside ‘magit-insert-section’. + + When called without any arguments, then just set the ‘content’ slot + of the object representing the section being inserted to a marker + 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, 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. + + 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 + 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. + + -- Function: magit-cancel-section + Cancel the section currently being inserted. This exits the + innermost call to ‘magit-insert-section’ and removes all traces of + what has already happened inside that call. + + -- Function: magit-define-section-jumper sym title &optional value + Define an interactive function to go to section SYM. TITLE is the + displayed title of the section. + + +File: magit.info, Node: Section Selection, Next: Matching Sections, Prev: Creating Sections, Up: Section Plumbing + +10.2.2 Section Selection +------------------------ + + -- Function: magit-current-section + Return the section at point. + + -- Function: magit-region-sections &optional condition multiple + Return a list of the selected sections. + + When the region is active and constitutes a valid section + 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 + begin and end in the same section. + + 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. + + When the region looks like it would in any other buffer then the + selection is invalid. When the selection is valid then the region + uses the ‘magit-section-highlight’ face. This does not apply to + diffs where things get a bit more complicated, but even here if the + 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 + to be valid; all selected sections additionally have to match + CONDITION, or nil is returned. See ‘magit-section-match’ for the + forms CONDITION can take. + + -- Function: magit-region-values &optional condition multiple + Return a list of the values of the selected sections. + + Return the values that themselves would be returned by + ‘magit-region-sections’ (which see). + + +File: magit.info, Node: Matching Sections, Prev: Section Selection, Up: Section Plumbing + +10.2.3 Matching Sections +------------------------ + +‘M-x magit-describe-section-briefly’ + Show information about the section at point. This command is + intended for debugging purposes. + + -- Function: magit-section-ident section + Return an unique identifier for SECTION. The return value has the + form ‘((TYPE . VALUE)...)’. + + -- 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’. + + -- Function: magit-section-match condition &optional section + 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’. + + CONDITION can take the following forms: + • ‘(CONDITION...)’ + + matches if any of the CONDITIONs matches. + + • ‘[CLASS...]’ + + matches if the section’s class is the same as the first CLASS + or a subclass of that; the section’s parent class matches the + second CLASS; and so on. + + • ‘[* CLASS...]’ + + matches sections that match ‘[CLASS...]’ and also recursively + all their child sections. + + • ‘CLASS’ + + matches if the section’s class is the same as CLASS or a + subclass of that; regardless of the classes of the parent + sections. + + Each CLASS should be a class symbol, identifying a class that + derives from ‘magit-section’. For backward compatibility CLASS can + also be a "type symbol". A section matches such a symbol if the + value of its ‘type’ slot is ‘eq’. If a type symbol has an entry in + ‘magit--section-type-alist’, then a section also matches that type + if its class is a subclass of the class that corresponds to the + type as per that alist. + + Note that it is not necessary to specify the complete section + lineage as printed by ‘magit-describe-section-briefly’, unless of + course you want to be that precise. + + -- 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. + + See ‘magit-section-match’ for the forms CONDITION can take. + + -- Function: magit-section-case &rest clauses + Choose among clauses on the type of the section at point. + + Each clause looks like (CONDITION BODY...). The type of the + section is compared against each CONDITION; the BODY forms of the + 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. + + See ‘magit-section-match’ for the forms CONDITION can take. + 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. + + -- Variable: magit-root-section + The root section in the current buffer. All other sections are + descendants of this section. The value of this variable is set by + ‘magit-insert-section’ and you should never modify it. + + For diff related sections a few additional tools exist. + + -- Function: magit-diff-type &optional section + Return the diff type of SECTION. + + The returned type is one of the symbols ‘staged’, ‘unstaged’, + ‘committed’, or ‘undefined’. This type serves a similar purpose as + the general type common to all sections (which is stored in the + ‘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. + + 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. + + The section has to be a ‘diff’ or ‘hunk’ section, or a section + 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 + type is always ‘committed’. + + -- Function: magit-diff-scope &optional section strict + Return the diff scope of SECTION or the selected section(s). + + A diff’s "scope" describes what part of a diff is selected, it is a + symbol, one of ‘region’, ‘hunk’, ‘hunks’, ‘file’, ‘files’, or + ‘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, + 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’. + + 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 + +10.3 Refreshing Buffers +======================= + +All commands that create a new Magit buffer or change what is being +displayed in an existing buffer do so by calling ‘magit-mode-setup’. +Among other things, that function sets the buffer local values of +‘default-directory’ (to the top-level of the repository), +‘magit-refresh-function’, and ‘magit-refresh-args’. + + Buffers are refreshed by calling the function that is the local value +of ‘magit-refresh-function’ (a function named ‘magit-*-refresh-buffer’, +where ‘*’ may be something like ‘diff’) with the value of +‘magit-refresh-args’ as arguments. + + -- Macro: magit-mode-setup buffer switch-func mode refresh-func + &optional refresh-args + This function displays and selects BUFFER, turns on MODE, and + refreshes a first time. + + This function displays and optionally selects BUFFER by calling + ‘magit-mode-display-buffer’ with BUFFER, MODE and SWITCH-FUNC as + arguments. Then it sets the local value of + ‘magit-refresh-function’ to REFRESH-FUNC and that of + ‘magit-refresh-args’ to REFRESH-ARGS. Finally it creates the + buffer content by calling REFRESH-FUNC with REFRESH-ARGS as + arguments. + + All arguments are evaluated before switching to BUFFER. + + -- Function: magit-mode-display-buffer buffer mode &optional + switch-function + This function display BUFFER in some window and select it. BUFFER + may be a buffer or a string, the name of a buffer. The buffer is + returned. + + Unless BUFFER is already displayed in the selected frame, store the + previous window configuration as a buffer local value, so that it + can later be restored by ‘magit-mode-bury-buffer’. + + The buffer is displayed and selected using SWITCH-FUNCTION. If + that is ‘nil’ then ‘pop-to-buffer’ is used if the current buffer’s + major mode derives from ‘magit-mode’. Otherwise ‘switch-to-buffer’ + is used. + + -- Variable: magit-refresh-function + The value of this buffer-local variable is the function used to + refresh the current buffer. It is called with ‘magit-refresh-args’ + as arguments. + + -- Variable: magit-refresh-args + The list of arguments used by ‘magit-refresh-function’ to refresh + the current buffer. ‘magit-refresh-function’ is called with these + arguments. + + The value is usually set using ‘magit-mode-setup’, but in some + cases it’s also useful to provide commands that can change the + value. For example, the ‘magit-diff-refresh’ transient can be used + to change any of the arguments used to display the diff, without + having to specify again which differences should be shown, but + ‘magit-diff-more-context’, ‘magit-diff-less-context’ and + ‘magit-diff-default-context’ change just the ‘-U’ argument. In + both case this is done by changing the value of this variable and + then calling this ‘magit-refresh-function’. + + +File: magit.info, Node: Conventions, Prev: Refreshing Buffers, Up: Plumbing + +10.4 Conventions +================ + +Also see *note Completion and Confirmation::. + +* Menu: + +* Theming Faces:: + + +File: magit.info, Node: Theming Faces, Up: Conventions + +10.4.1 Theming Faces +-------------------- + +The default theme uses blue for local branches, green for remote +branches, and goldenrod (brownish yellow) for tags. When creating a new +theme, you should probably follow that example. If your theme already +uses other colors, then stick to that. + + In older releases these reference faces used to have a background +color and a box around them. The basic default faces no longer do so, +to make Magit buffers much less noisy, and you should follow that +example at least with regards to boxes. (Boxes were used in the past to +work around a conflict between the highlighting overlay and text +property backgrounds. That’s no longer necessary because highlighting +no longer causes other background colors to disappear.) Alternatively +you can keep the background color and/or box, but then have to take +special care to adjust ‘magit-branch-current’ accordingly. By default +it looks mostly like ‘magit-branch-local’, but with a box (by default +the former is the only face that uses a box, exactly so that it sticks +out). If the former also uses a box, then you have to make sure that it +differs in some other way from the latter. + + The most difficult faces to theme are those related to diffs, +headings, highlighting, and the region. There are faces that fall into +all four groups - expect to spend some time getting this right. + + The ‘region’ face in the default theme, in both the light and dark +variants, as well as in many other themes, distributed with Emacs or by +third-parties, is very ugly. It is common to use a background color +that really sticks out, which is ugly but if that were the only problem +then it would be acceptable. Unfortunately many themes also set the +foreground color, which ensures that all text within the region is +readable. Without doing that there might be cases where some foreground +color is too close to the region background color to still be readable. +But it also means that text within the region loses all syntax +highlighting. + + I consider the work that went into getting the ‘region’ face right to +be a good indicator for the general quality of a theme. My +recommendation for the ‘region’ face is this: use a background color +slightly different from the background color of the ‘default’ face, and +do not set the foreground color at all. So for a light theme you might +use a light (possibly tinted) gray as the background color of ‘default’ +and a somewhat darker gray for the background of ‘region’. That should +usually be enough to not collide with the foreground color of any other +face. But if some other faces also set a light gray as background +color, then you should also make sure it doesn’t collide with those (in +some cases it might be acceptable though). + + Magit only uses the ‘region’ face when the region is "invalid" by its +own definition. In a Magit buffer the region is used to either select +multiple sibling sections, so that commands which support it act on all +of these sections instead of just the current section, or to select +lines within a single hunk section. In all other cases, the section is +considered invalid and Magit won’t act on it. But such invalid sections +happen, either because the user has not moved point enough yet to make +it valid or because she wants to use a non-magit command to act on the +region, e.g. ‘kill-region’. + + So using the regular ‘region’ face for invalid sections is a feature. +It tells the user that Magit won’t be able to act on it. It’s +acceptable if that face looks a bit odd and even (but less so) if it +collides with the background colors of section headings and other things +that have a background color. + + Magit highlights the current section. If a section has subsections, +then all of them are highlighted. This is done using faces that have +"highlight" in their names. For most sections, +‘magit-section-highlight’ is used for both the body and the heading. +Like the ‘region’ face, it should only set the background color to +something similar to that of ‘default’. The highlight background color +must be different from both the ‘region’ background color and the +‘default’ background color. + + For diff related sections Magit uses various faces to highlight +different parts of the selected section(s). Note that hunk headings, +unlike all other section headings, by default have a background color, +because it is useful to have very visible separators between hunks. +That face ‘magit-diff-hunk-heading’, should be different from both +‘magit-diff-hunk-heading-highlight’ and ‘magit-section-highlight’, as +well as from ‘magit-diff-context’ and ‘magit-diff-context-highlight’. +By default we do that by changing the foreground color. Changing the +background color would lead to complications, and there are already +enough we cannot get around. (Also note that it is generally a good +idea for section headings to always be bold, but only for sections that +have subsections). + + When there is a valid region selecting diff-related sibling sections, +i.e. multiple files or hunks, then the bodies of all these sections use +the respective highlight faces, but additionally the headings instead +use one of the faces ‘magit-diff-file-heading-selection’ or +‘magit-diff-hunk-heading-selection’. These faces have to be different +from the regular highlight variants to provide explicit visual +indication that the region is active. + + When theming diff related faces, start by setting the option +‘magit-diff-refine-hunk’ to ‘all’. You might personally prefer to only +refine the current hunk or not use hunk refinement at all, but some of +the users of your theme want all hunks to be refined, so you have to +cater to that. + + (Also turn on ‘magit-diff-highlight-indentation’, +‘magit-diff-highlight-trailing’, and ‘magit-diff-paint-whitespace’; and +insert some whitespace errors into the code you use for testing.) + + For added lines you have to adjust three faces: ‘magit-diff-added’, +‘magit-diff-added-highlight’, and ‘diff-refined-added’. Make sure that +the latter works well with both of the former, as well as ‘smerge-other’ +and ‘diff-added’. Then do the same for the removed lines, context +lines, lines added by us, and lines added by them. Also make sure the +respective added, removed, and context faces use approximately the same +saturation for both the highlighted and unhighlighted variants. Also +make sure the file and diff headings work nicely with context lines +(e.g. make them look different). Line faces should set both the +foreground and the background color. For example, for added lines use +two different greens. + + It’s best if the foreground color of both the highlighted and the +unhighlighted variants are the same, so you will need to have to find a +color that works well on the highlight and unhighlighted background, the +refine background, and the highlight context background. When there is +an hunk internal region, then the added- and removed-lines background +color is used only within that region. Outside the region the +highlighted context background color is used. This makes it easier to +see what is being staged. With an hunk internal region the hunk heading +is shown using ‘magit-diff-hunk-heading-selection’, and so are the thin +lines that are added around the lines that fall within the region. The +background color of that has to be distinct enough from the various +other involved background colors. + + Nobody said this would be easy. If your theme restricts itself to a +certain set of colors, then you should make an exception here. +Otherwise it would be impossible to make the diffs look good in each and +every variation. Actually you might want to just stick to the default +definitions for these faces. You have been warned. Also please note +that if you do not get this right, this will in some cases look to users +like bugs in Magit - so please do it right or not at all. + + +File: magit.info, Node: FAQ, Next: Debugging Tools, Prev: Plumbing, Up: Top + +Appendix A FAQ +************** + +The next two nodes lists frequently asked questions. For a list of +frequently *and recently* asked questions, i.e. questions that haven’t +made it into the manual yet, see +. + + Please also use the *note Debugging Tools::. + +* Menu: + +* FAQ - How to ...?:: +* FAQ - Issues and Errors:: + + +File: magit.info, Node: FAQ - How to ...?, Next: FAQ - Issues and Errors, Up: FAQ + +A.1 FAQ - How to ...? +===================== + +* Menu: + +* How to pronounce Magit?:: +* How to show git's output?:: +* How to install the gitman info manual?:: +* How to show diffs for gpg-encrypted files?:: +* How does branching and pushing work?:: +* Can Magit be used as ediff-version-control-package?:: +* Should I disable VC?:: + + +File: magit.info, Node: How to pronounce Magit?, Next: How to show git's output?, Up: FAQ - How to ...? + +A.1.1 How to pronounce Magit? +----------------------------- + +Either ‘mu[m's] git’ or ‘magi{c => t}’ is fine. + + The slogan is "It’s Magit! The magical Git client", so it makes +sense to pronounce Magit like magic, while taking into account that C +and T do not sound the same. + + The German "Magie" is not pronounced the same as the English "magic", +so if you speak German then you can use the above rational to justify +using the former pronunciation; ‘Mag{ie => it}’. + + You can also choose to use the former pronunciation just because you +like it better. + + Also see . Also see +. + + +File: magit.info, Node: How to show git's output?, Next: How to install the gitman info manual?, Prev: How to pronounce Magit?, Up: FAQ - How to ...? + +A.1.2 How to show git’s output? +------------------------------- + +To show the output of recently run git commands, press ‘$’ (or, if that +isn’t available, ‘M-x magit-process-buffer’). This will show a buffer +containing a section per git invocation; as always press ‘TAB’ to expand +or collapse them. + + By default, git’s output is only inserted into the process buffer if +it is run for side-effects. When the output is consumed in some way, +also inserting it into the process buffer would be too expensive. For +debugging purposes, it’s possible to do so anyway by setting +‘magit-git-debug’ to ‘t’. + + +File: magit.info, Node: How to install the gitman info manual?, Next: How to show diffs for gpg-encrypted files?, Prev: How to show git's output?, Up: FAQ - How to ...? + +A.1.3 How to install the gitman info manual? +-------------------------------------------- + +Git’s manpages can be exported as an info manual called ‘gitman’. +Magit’s own info manual links to nodes in that manual instead of the +actual manpages because Info doesn’t support linking to manpages. + + Unfortunately some distributions do not install the ‘gitman’ manual +by default and you will have to install a separate documentation package +to get it. + + Magit patches Info adding the ability to visit links to the ‘gitman’ +Info manual by instead viewing the respective manpage. If you prefer +that approach, then set the value of ‘magit-view-git-manual-method’ to +one of the supported packages ‘man’ or ‘woman’, e.g.: + + (setq magit-view-git-manual-method 'man) + + +File: magit.info, Node: How to show diffs for gpg-encrypted files?, Next: How does branching and pushing work?, Prev: How to install the gitman info manual?, Up: FAQ - How to ...? + +A.1.4 How to show diffs for gpg-encrypted files? +------------------------------------------------ + +Git supports showing diffs for encrypted files, but has to be told to do +so. Since Magit just uses Git to get the diffs, configuring Git also +affects the diffs displayed inside Magit. + + git config --global diff.gpg.textconv "gpg --no-tty --decrypt" + echo "*.gpg filter=gpg diff=gpg" > .gitattributes + + +File: magit.info, Node: How does branching and pushing work?, Next: Can Magit be used as ediff-version-control-package?, Prev: How to show diffs for gpg-encrypted files?, Up: FAQ - How to ...? + +A.1.5 How does branching and pushing work? +------------------------------------------ + +Please see *note Branching:: and + + + +File: magit.info, Node: Can Magit be used as ediff-version-control-package?, Next: Should I disable VC?, Prev: How does branching and pushing work?, Up: FAQ - How to ...? + +A.1.6 Can Magit be used as ‘ediff-version-control-package’? +----------------------------------------------------------- + +No, it cannot. For that to work the functions ‘ediff-magit-internal’ +and ‘ediff-magit-merge-internal’ would have to be implemented, and they +are not. These two functions are only used by the three commands +‘ediff-revision’, ‘ediff-merge-revisions-with-ancestor’, and +‘ediff-merge-revisions’. + + These commands only delegate the task of populating buffers with +certain revisions to the "internal" functions. The equally important +task of determining which revisions are to be compared/merged is not +delegated. Instead this is done without any support whatsoever from the +version control package/system - meaning that the user has to enter the +revisions explicitly. Instead of implementing ‘ediff-magit-internal’ we +provide ‘magit-ediff-compare’, which handles both tasks like it is 2005. + + The other commands ‘ediff-merge-revisions’ and +‘ediff-merge-revisions-with-ancestor’ are normally not what you want +when using a modern version control system like Git. Instead of letting +the user resolve only those conflicts which Git could not resolve on its +own, they throw away all work done by Git and then expect the user to +manually merge all conflicts, including those that had already been +resolved. That made sense back in the days when version control systems +couldn’t merge (or so I have been told), but not anymore. Once in a +blue moon you might actually want to see all conflicts, in which case +you *can* use these commands, which then use ‘ediff-vc-merge-internal’. +So we don’t actually have to implement ‘ediff-magit-merge-internal’. +Instead we provide the more useful command ‘magit-ediff-resolve’ which +only shows yet-to-be resolved conflicts. + + +File: magit.info, Node: Should I disable VC?, Prev: Can Magit be used as ediff-version-control-package?, Up: FAQ - How to ...? + +A.1.7 Should I disable VC? +-------------------------- + +If you don’t use VC (the built-in version control interface) then you +might be tempted to disable it, not least because we used to recommend +that you do that. + + We no longer recommend that you disable VC. Doing so would break +useful third-party packages (such as ‘diff-hl’), which depend on VC +being enabled. + + If you choose to disable VC anyway, then you can do so by changing +the value of ‘vc-handled-backends’. + + +File: magit.info, Node: FAQ - Issues and Errors, Prev: FAQ - How to ...?, Up: FAQ + +A.2 FAQ - Issues and Errors +=========================== + +* Menu: + +* Magit is slow:: +* I changed several thousand files at once and now Magit is unusable:: +* I am having problems committing:: +* I am using MS Windows and cannot push with Magit:: +* I am using OS X and SOMETHING works in shell, but not in Magit: I am using OS X and SOMETHING works in shell but not in Magit. +* Expanding a file to show the diff causes it to disappear:: +* Point is wrong in the COMMIT_EDITMSG buffer:: +* The mode-line information isn't always up-to-date:: +* A branch and tag sharing the same name breaks SOMETHING:: +* My Git hooks work on the command-line but not inside Magit:: +* git-commit-mode isn't used when committing from the command-line:: +* Point ends up inside invisible text when jumping to a file-visiting buffer:: +* I am unable to stage when using Tramp from MS Windows:: +* I am no longer able to save popup defaults:: + + +File: magit.info, Node: Magit is slow, Next: I changed several thousand files at once and now Magit is unusable, Up: FAQ - Issues and Errors + +A.2.1 Magit is slow +------------------- + +See *note Performance::. + + +File: magit.info, Node: I changed several thousand files at once and now Magit is unusable, Next: I am having problems committing, Prev: Magit is slow, Up: FAQ - Issues and Errors + +A.2.2 I changed several thousand files at once and now Magit is unusable +------------------------------------------------------------------------ + +Magit is *currently* not expected to work under such conditions. It +sure would be nice if it did, and v2.5 will hopefully be a big step into +that direction. But it might take until v3.1 to accomplish fully +satisfactory performance, because that requires some heavy refactoring. + + But for now we recommend you use the command line to complete this +one commit. Also see *note Performance::. + + +File: magit.info, Node: I am having problems committing, Next: I am using MS Windows and cannot push with Magit, Prev: I changed several thousand files at once and now Magit is unusable, Up: FAQ - Issues and Errors + +A.2.3 I am having problems committing +------------------------------------- + +That likely means that Magit is having problems finding an appropriate +emacsclient executable. See *note (with-editor)Configuring +With-Editor:: and *note (with-editor)Debugging::. + + +File: magit.info, Node: I am using MS Windows and cannot push with Magit, Next: I am using OS X and SOMETHING works in shell but not in Magit, Prev: I am having problems committing, Up: FAQ - Issues and Errors + +A.2.4 I am using MS Windows and cannot push with Magit +------------------------------------------------------ + +It’s almost certain that Magit is only incidental to this issue. It is +much more likely that this is a configuration issue, even if you can +push on the command line. + + Detailed setup instructions can be found at +. + + +File: magit.info, Node: I am using OS X and SOMETHING works in shell but not in Magit, Next: Expanding a file to show the diff causes it to disappear, Prev: I am using MS Windows and cannot push with Magit, Up: FAQ - Issues and Errors + +A.2.5 I am using OS X and SOMETHING works in shell, but not in Magit +-------------------------------------------------------------------- + +This usually occurs because Emacs doesn’t have the same environment +variables as your shell. Try installing and configuring +. By default it +synchronizes ‘$PATH’, which helps Magit find the same ‘git’ as the one +you are using on the shell. + + If SOMETHING is "passphrase caching with gpg-agent for commit and/or +tag signing", then you’ll also need to synchronize ‘$GPG_AGENT_INFO’. + + +File: magit.info, Node: Expanding a file to show the diff causes it to disappear, Next: Point is wrong in the COMMIT_EDITMSG buffer, Prev: I am using OS X and SOMETHING works in shell but not in Magit, Up: FAQ - Issues and Errors + +A.2.6 Expanding a file to show the diff causes it to disappear +-------------------------------------------------------------- + +This is probably caused by a change of a ‘diff.*’ Git variable. You +probably set that variable for a reason, and should therefore only undo +that setting in Magit by customizing ‘magit-git-global-arguments’. + + +File: magit.info, Node: Point is wrong in the COMMIT_EDITMSG buffer, Next: The mode-line information isn't always up-to-date, Prev: Expanding a file to show the diff causes it to disappear, Up: FAQ - Issues and Errors + +A.2.7 Point is wrong in the ‘COMMIT_EDITMSG’ buffer +--------------------------------------------------- + +Neither Magit nor ‘git-commit‘ fiddle with point in the buffer used to +write commit messages, so something else must be doing it. + + You have probably globally enabled a mode which does restore point in +file-visiting buffers. It might be a bit surprising, but when you write +a commit message, then you are actually editing a file. + + So you have to figure out which package is doing. ‘saveplace’, +‘pointback’, and ‘session’ are likely candidates. These snippets might +help: + + (setq session-name-disable-regexp "\\(?:\\`'\\.git/[A-Z_]+\\'\\)") + + (with-eval-after-load 'pointback + (lambda () + (when (or git-commit-mode git-rebase-mode) + (pointback-mode -1)))) + + +File: magit.info, Node: The mode-line information isn't always up-to-date, Next: A branch and tag sharing the same name breaks SOMETHING, Prev: Point is wrong in the COMMIT_EDITMSG buffer, Up: FAQ - Issues and Errors + +A.2.8 The mode-line information isn’t always up-to-date +------------------------------------------------------- + +Magit is not responsible for the version control information that is +being displayed in the mode-line and looks something like ‘Git-master’. +The built-in "Version Control" package, also known as "VC", updates that +information, and can be told to do so more often: + + (setq auto-revert-check-vc-info t) + + But doing so isn’t good for performance. For more (overly +optimistic) information see *note (emacs)VC Mode Line::. + + If you don’t really care about seeing this information in the +mode-line, but just don’t want to see _incorrect_ information, then +consider simply not displaying it in the mode-line: + + (setq-default mode-line-format + (delete '(vc-mode vc-mode) mode-line-format)) + + +File: magit.info, Node: A branch and tag sharing the same name breaks SOMETHING, Next: My Git hooks work on the command-line but not inside Magit, Prev: The mode-line information isn't always up-to-date, Up: FAQ - Issues and Errors + +A.2.9 A branch and tag sharing the same name breaks SOMETHING +------------------------------------------------------------- + +Or more generally, ambiguous refnames break SOMETHING. + + Magit assumes that refs are named non-ambiguously across the +"refs/heads/", "refs/tags/", and "refs/remotes/" namespaces (i.e., all +the names remain unique when those prefixes are stripped). We consider +ambiguous refnames unsupported and recommend that you use a +non-ambiguous naming scheme. However, if you do work with a repository +that has ambiguous refnames, please report any issues you encounter so +that we can investigate whether there is a simple fix. + + +File: magit.info, Node: My Git hooks work on the command-line but not inside Magit, Next: git-commit-mode isn't used when committing from the command-line, Prev: A branch and tag sharing the same name breaks SOMETHING, Up: FAQ - Issues and Errors + +A.2.10 My Git hooks work on the command-line but not inside Magit +----------------------------------------------------------------- + +When Magit calls ‘git’ it adds a few global arguments including +‘--literal-pathspecs’ and the ‘git’ process started by Magit then passes +that setting on to other ‘git’ process it starts itself. It does so by +setting the environment variable ‘GIT_LITERAL_PATHSPECS’, not by calling +subprocesses with the ‘--literal-pathspecs’ argument. You can therefore +override this setting in hook scripts using ‘unset +GIT_LITERAL_PATHSPECS’. + + +File: magit.info, Node: git-commit-mode isn't used when committing from the command-line, Next: Point ends up inside invisible text when jumping to a file-visiting buffer, Prev: My Git hooks work on the command-line but not inside Magit, Up: FAQ - Issues and Errors + +A.2.11 ‘git-commit-mode’ isn’t used when committing from the command-line +------------------------------------------------------------------------- + +The reason for this is that ‘git-commit.el’ has not been loaded yet +and/or that the server has not been started yet. These things have +always already been taken care of when you commit from Magit because in +order to do so, Magit has to be loaded and doing that involves loading +‘git-commit’ and starting the server. + + If you want to commit from the command-line, then you have to take +care of these things yourself. Your ‘init.el’ file should contain: + + (require 'git-commit) + (server-mode) + + Instead of ‘(require ’git-commit)‘ you may also use: + + (load "/path/to/magit-autoloads.el") + + You might want to do that because loading ‘git-commit’ causes large +parts of Magit to be loaded. + + There are also some variations of ‘(server-mode)’ that you might want +to try. Personally I use: + + (use-package server + :config (or (server-running-p) (server-mode))) + + Now you can use: + + $ emacs& + $ EDITOR=emacsclient git commit + + However you cannot use: + + $ killall emacs + $ EDITOR="emacsclient --alternate-editor emacs" git commit + + This will actually end up using ‘emacs’, not ‘emacsclient’. If you +do this, then you can still edit the commit message but +‘git-commit-mode’ won’t be used and you have to exit ‘emacs’ to finish +the process. + + Tautology ahead. If you want to be able to use ‘emacsclient’ to +connect to a running ‘emacs’ instance, even though no ‘emacs’ instance +is running, then you cannot use ‘emacsclient’ directly. + + Instead you have to create a script that does something like this: + + Try to use ‘emacsclient’ (without using ‘--alternate-editor’). If +that succeeds, do nothing else. Otherwise start ‘emacs &’ (and +‘init.el’ must call ‘server-start’) and try to use ‘emacsclient’ again. + + +File: magit.info, Node: Point ends up inside invisible text when jumping to a file-visiting buffer, Next: I am unable to stage when using Tramp from MS Windows, Prev: git-commit-mode isn't used when committing from the command-line, Up: FAQ - Issues and Errors + +A.2.12 Point ends up inside invisible text when jumping to a file-visiting buffer +--------------------------------------------------------------------------------- + +This can happen when you type ‘RET’ on a hunk to visit the respective +file at the respective position. One solution to this problem is to use +‘global-reveal-mode’. It makes sure that text around point is always +visible. If that is too drastic for your taste, then you may instead +use ‘magit-diff-visit-file-hook’ to reveal the text, possibly using +‘reveal-post-command’ or for Org buffers ‘org-reveal’. + + +File: magit.info, Node: I am unable to stage when using Tramp from MS Windows, Next: I am no longer able to save popup defaults, Prev: Point ends up inside invisible text when jumping to a file-visiting buffer, Up: FAQ - Issues and Errors + +A.2.13 I am unable to stage when using Tramp from MS Windows +------------------------------------------------------------ + +Magit may be unable to stage (or otherwise apply) individual hunks when +you are connected to remote machine using Tramp and the local machine +uses MS Windows. + + There appears to be a problem with ‘process-send-eof’ in this +scenario, as mentioned at the end of ‘tramp-tests.el’. I have contacted +the Tramp maintainer about this. For now this unfortunately means that +it just doesn’t work and we cannot do anything about it. If you have +more information, then please comment on +. + + +File: magit.info, Node: I am no longer able to save popup defaults, Prev: I am unable to stage when using Tramp from MS Windows, Up: FAQ - Issues and Errors + +A.2.14 I am no longer able to save popup defaults +------------------------------------------------- + +Magit used to use Magit-Popup to implement the transient popup menus. +Now it used Transient instead, which is Magit-Popup’s successor. + + In the older Magit-Popup menus, it was possible to save user settings +(e.g. setting the gpg signing key for commits) by using ‘C-c C-c’ in +the popup buffer. This would dismiss the popup, but save the settings +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 +for more details. + + +File: magit.info, Node: Debugging Tools, Next: Keystroke Index, Prev: FAQ, Up: Top + +B Debugging Tools +***************** + +Magit and its dependencies provide a few debugging tools, and we +appreciate it very much if you use those tools before reporting an +issue. Please include all relevant output when reporting an issue. + +‘M-x magit-version’ + This command shows the currently used versions of Magit, Git, and + Emacs in the echo area. Non-interactively this just returns the + Magit version. + +‘M-x magit-emacs-Q-command’ + This command shows a debugging shell command in the echo area and + adds it to the kill ring. Paste that command into a shell and run + it. + + This shell command starts ‘emacs’ with only ‘magit’ and its + dependencies loaded. Neither your configuration nor other + installed packages are loaded. This makes it easier to determine + whether some issue lays with Magit or something else. + + If you run Magit from its Git repository, then you should be able + to use ‘make emacs-Q’ instead of the output of this command. + +‘M-x magit-toggle-verbose-refresh’ + This command toggles whether Magit refreshes buffers verbosely. + Enabling this helps figuring out which sections are bottlenecks. + The additional output can be found in the ‘*Messages*’ buffer. + +‘M-x magit-debug-git-executable’ + This command displays a buffer containing information about the + available and used ‘git’ executable(s), and can be useful when + investigating ‘exec-path’ issues. + + Also see *note Git Executable::. + +‘M-x with-editor-debug’ + This command displays a buffer containing information about the + available and used ‘emacsclient’ executable(s), and can be useful + when investigating why Magit (or rather ‘with-editor’) cannot find + an appropriate ‘emacsclient’ executable. + + Also see *note (with-editor)Debugging::. + + Please also see the *note FAQ::. + + +File: magit.info, Node: Keystroke Index, Next: Function and Command Index, Prev: Debugging Tools, Up: Top + +Appendix C Keystroke Index +************************** + +[index] +* Menu: + +* !: Running Git Manually. + (line 13) +* ! !: Running Git Manually. + (line 17) +* ! a: Running Git Manually. + (line 53) +* ! b: Running Git Manually. + (line 56) +* ! g: Running Git Manually. + (line 59) +* ! k: Running Git Manually. + (line 50) +* ! p: Running Git Manually. + (line 25) +* ! s: Running Git Manually. + (line 34) +* ! S: Running Git Manually. + (line 38) +* $: Viewing Git Output. (line 17) +* +: Log Buffer. (line 64) +* + <1>: Refreshing Diffs. (line 61) +* -: Log Buffer. (line 67) +* - <1>: Refreshing Diffs. (line 58) +* 0: Refreshing Diffs. (line 64) +* 1: Section Visibility. (line 26) +* 2: Section Visibility. (line 26) +* 3: Section Visibility. (line 26) +* 4: Section Visibility. (line 26) +* :: Running Git Manually. + (line 25) +* =: Log Buffer. (line 59) +* ^: Section Movement. (line 28) +* a: Applying. (line 34) +* A: Cherry Picking. (line 9) +* A A: Cherry Picking. (line 17) +* A a: Cherry Picking. (line 23) +* A A <1>: Cherry Picking. (line 85) +* A a <1>: Cherry Picking. (line 91) +* A d: Cherry Picking. (line 51) +* A h: Cherry Picking. (line 40) +* A n: Cherry Picking. (line 62) +* A s: Cherry Picking. (line 72) +* A s <1>: Cherry Picking. (line 88) +* B: Bisecting. (line 9) +* b: Blaming. (line 95) +* b <1>: Branch Commands. (line 13) +* b <2>: Editing Rebase Sequences. + (line 70) +* B B: Bisecting. (line 16) +* B b: Bisecting. (line 32) +* b b: Branch Commands. (line 47) +* b C: Branch Commands. (line 31) +* b c: Branch Commands. (line 63) +* B g: Bisecting. (line 36) +* B k: Bisecting. (line 46) +* b k: Branch Commands. (line 138) +* b l: Branch Commands. (line 69) +* B m: Bisecting. (line 40) +* b n: Branch Commands. (line 54) +* B r: Bisecting. (line 51) +* b r: Branch Commands. (line 143) +* B s: Bisecting. (line 26) +* b s: Branch Commands. (line 91) +* b S: Branch Commands. (line 118) +* b x: Branch Commands. (line 123) +* c: Blaming. (line 121) +* C: Cloning Repository. (line 20) +* c <1>: Initiating a Commit. (line 9) +* c <2>: Editing Rebase Sequences. + (line 59) +* c a: Initiating a Commit. (line 18) +* c A: Initiating a Commit. (line 59) +* C b: Cloning Repository. (line 38) +* C C: Cloning Repository. (line 28) +* c c: Initiating a Commit. (line 14) +* C d: Cloning Repository. (line 49) +* C e: Cloning Repository. (line 55) +* c e: Initiating a Commit. (line 21) +* c f: Initiating a Commit. (line 39) +* c F: Initiating a Commit. (line 46) +* C m: Cloning Repository. (line 42) +* C s: Cloning Repository. (line 32) +* c s: Initiating a Commit. (line 49) +* c S: Initiating a Commit. (line 56) +* c w: Initiating a Commit. (line 30) +* C-: Visiting Files and Blobs from a Diff. + (line 50) +* C-: Section Visibility. (line 13) +* C-c C-a: Commit Pseudo Headers. + (line 16) +* C-c C-b: Log Buffer. (line 20) +* C-c C-b <1>: Refreshing Diffs. (line 80) +* C-c C-c: Transient Commands. (line 19) +* C-c C-c <1>: Select from Log. (line 21) +* C-c C-c <2>: Editing Commit Messages. + (line 18) +* C-c C-c <3>: Editing Rebase Sequences. + (line 7) +* C-c C-d: Refreshing Diffs. (line 71) +* C-c C-d <1>: Editing Commit Messages. + (line 54) +* C-c C-e: Commands Available in Diffs. + (line 24) +* C-c C-f: Log Buffer. (line 23) +* C-c C-f <1>: Refreshing Diffs. (line 83) +* C-c C-i: Commit Pseudo Headers. + (line 13) +* C-c C-k: Select from Log. (line 26) +* C-c C-k <1>: Editing Commit Messages. + (line 22) +* C-c C-k <2>: Editing Rebase Sequences. + (line 11) +* C-c C-n: Log Buffer. (line 26) +* C-c C-o: Commit Pseudo Headers. + (line 28) +* C-c C-p: Commit Pseudo Headers. + (line 31) +* C-c C-r: Commit Pseudo Headers. + (line 19) +* C-c C-s: Commit Pseudo Headers. + (line 22) +* C-c C-t: Commands Available in Diffs. + (line 15) +* C-c C-t <1>: Commit Pseudo Headers. + (line 25) +* C-c C-w: Using the Revision Stack. + (line 7) +* C-c M-g: Commands for Buffers Visiting Files. + (line 22) +* C-c M-g B: Blaming. (line 19) +* C-c M-g b: Blaming. (line 30) +* C-c M-g B <1>: Commands for Buffers Visiting Files. + (line 83) +* C-c M-g B b: Blaming. (line 30) +* C-c M-g B e: Blaming. (line 61) +* C-c M-g B f: Blaming. (line 53) +* C-c M-g B r: Blaming. (line 45) +* C-c M-g c: Commands for Buffers Visiting Files. + (line 36) +* C-c M-g D: Commands for Buffers Visiting Files. + (line 42) +* C-c M-g d: Commands for Buffers Visiting Files. + (line 52) +* C-c M-g e: Blaming. (line 61) +* C-c M-g e <1>: Commands for Buffers Visiting Files. + (line 95) +* C-c M-g f: Blaming. (line 53) +* C-c M-g L: Commands for Buffers Visiting Files. + (line 60) +* C-c M-g l: Commands for Buffers Visiting Files. + (line 70) +* C-c M-g p: Commands for Buffers Visiting Files. + (line 104) +* C-c M-g r: Blaming. (line 45) +* C-c M-g s: Commands for Buffers Visiting Files. + (line 29) +* C-c M-g t: Commands for Buffers Visiting Files. + (line 76) +* C-c M-g u: Commands for Buffers Visiting Files. + (line 32) +* C-c M-i: Commit Pseudo Headers. + (line 35) +* C-c M-s: Editing Commit Messages. + (line 33) +* C-w: Common Commands. (line 22) +* C-x g: Status Buffer. (line 23) +* C-x u: Editing Rebase Sequences. + (line 77) +* d: Diffing. (line 22) +* D: Refreshing Diffs. (line 12) +* d c: Diffing. (line 63) +* d d: Diffing. (line 27) +* D f: Refreshing Diffs. (line 41) +* D F: Refreshing Diffs. (line 45) +* D g: Refreshing Diffs. (line 17) +* d p: Diffing. (line 56) +* d r: Diffing. (line 30) +* D r: Refreshing Diffs. (line 37) +* d s: Diffing. (line 48) +* D s: Refreshing Diffs. (line 21) +* d t: Diffing. (line 67) +* D t: Refreshing Diffs. (line 34) +* d u: Diffing. (line 53) +* d w: Diffing. (line 43) +* D w: Refreshing Diffs. (line 27) +* DEL: Log Buffer. (line 50) +* DEL <1>: Commands Available in Diffs. + (line 56) +* DEL <2>: Blaming. (line 83) +* DEL <3>: Editing Rebase Sequences. + (line 25) +* e: Ediffing. (line 10) +* E: Ediffing. (line 21) +* e <1>: Editing Rebase Sequences. + (line 46) +* E c: Ediffing. (line 58) +* E i: Ediffing. (line 52) +* E m: Ediffing. (line 33) +* E r: Ediffing. (line 25) +* E s: Ediffing. (line 45) +* E u: Ediffing. (line 49) +* E w: Ediffing. (line 55) +* E z: Ediffing. (line 61) +* f: Editing Rebase Sequences. + (line 52) +* f <1>: Fetching. (line 10) +* F: Pulling. (line 10) +* f a: Fetching. (line 45) +* f C: Branch Commands. (line 31) +* F C: Branch Commands. (line 31) +* f e: Fetching. (line 34) +* F e: Pulling. (line 28) +* f m: Fetching. (line 48) +* f o: Fetching. (line 37) +* f p: Fetching. (line 15) +* F p: Pulling. (line 14) +* f r: Fetching. (line 41) +* f u: Fetching. (line 22) +* F u: Pulling. (line 21) +* g: Automatic Refreshing of Magit Buffers. + (line 26) +* G: Automatic Refreshing of Magit Buffers. + (line 34) +* H: Section Types and Values. + (line 14) +* I: Creating Repository. (line 7) +* j: Log Buffer. (line 31) +* j <1>: Commands Available in Diffs. + (line 43) +* k: Viewing Git Output. (line 24) +* k <1>: Applying. (line 40) +* k <2>: Editing Rebase Sequences. + (line 56) +* k <3>: Stashing. (line 82) +* l: Logging. (line 30) +* L: Refreshing Logs. (line 12) +* L <1>: Log Buffer. (line 7) +* L <2>: Log Margin. (line 52) +* l <1>: Editing Rebase Sequences. + (line 94) +* l a: Logging. (line 55) +* l b: Logging. (line 52) +* L d: Log Margin. (line 66) +* L g: Refreshing Logs. (line 17) +* l h: Logging. (line 46) +* l H: Reflog. (line 18) +* l l: Logging. (line 35) +* l L: Logging. (line 49) +* L L: Log Margin. (line 60) +* L l: Log Margin. (line 63) +* l o: Logging. (line 40) +* l O: Reflog. (line 15) +* l r: Reflog. (line 12) +* L s: Refreshing Logs. (line 21) +* L t: Refreshing Logs. (line 34) +* L w: Refreshing Logs. (line 27) +* m: Merging. (line 10) +* M: Remote Commands. (line 14) +* m a: Merging. (line 42) +* m a <1>: Merging. (line 87) +* M a: Remote Commands. (line 48) +* M C: Remote Commands. (line 32) +* m e: Merging. (line 30) +* m i: Merging. (line 54) +* M k: Remote Commands. (line 60) +* m m: Merging. (line 18) +* m m <1>: Merging. (line 82) +* m n: Merging. (line 36) +* m p: Merging. (line 75) +* M p: Remote Commands. (line 63) +* M P: Remote Commands. (line 67) +* M r: Remote Commands. (line 52) +* m s: Merging. (line 67) +* M u: Remote Commands. (line 56) +* M-1: Section Visibility. (line 32) +* M-2: Section Visibility. (line 32) +* M-3: Section Visibility. (line 32) +* M-4: Section Visibility. (line 32) +* M-: Section Visibility. (line 16) +* M-n: Section Movement. (line 24) +* M-n <1>: Editing Commit Messages. + (line 41) +* M-n <2>: Editing Rebase Sequences. + (line 40) +* M-p: Section Movement. (line 19) +* M-p <1>: Editing Commit Messages. + (line 36) +* M-p <2>: Editing Rebase Sequences. + (line 37) +* M-w: Blaming. (line 114) +* M-w <1>: Common Commands. (line 39) +* MM: Editing Rebase Sequences. + (line 102) +* Mt: Editing Rebase Sequences. + (line 108) +* n: Section Movement. (line 16) +* n <1>: Blaming. (line 98) +* N: Blaming. (line 101) +* n <2>: Editing Rebase Sequences. + (line 34) +* n <3>: Minor Mode for Buffers Visiting Blobs. + (line 16) +* o: Submodule Transient. (line 7) +* O: Subtree. (line 9) +* o a: Submodule Transient. (line 20) +* o d: Submodule Transient. (line 45) +* O e: Subtree. (line 37) +* O e p: Subtree. (line 48) +* O e s: Subtree. (line 52) +* o f: Submodule Transient. (line 51) +* 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: Submodule Transient. (line 48) +* o p: Submodule Transient. (line 32) +* o r: Submodule Transient. (line 26) +* o s: Submodule Transient. (line 40) +* o u: Submodule Transient. (line 36) +* p: Section Movement. (line 11) +* p <1>: Blaming. (line 104) +* P: Blaming. (line 107) +* p <2>: Editing Rebase Sequences. + (line 31) +* P <1>: Pushing. (line 10) +* p <3>: Minor Mode for Buffers Visiting Blobs. + (line 13) +* P C: Branch Commands. (line 31) +* P e: Pushing. (line 29) +* P m: Pushing. (line 45) +* P o: Pushing. (line 33) +* P p: Pushing. (line 15) +* P r: Pushing. (line 37) +* P t: Pushing. (line 52) +* P T: Pushing. (line 59) +* P u: Pushing. (line 22) +* q: Quitting Windows. (line 7) +* q <1>: Log Buffer. (line 14) +* q <2>: Blaming. (line 110) +* q <3>: Minor Mode for Buffers Visiting Blobs. + (line 19) +* r: Rebasing. (line 10) +* r <1>: Editing Rebase Sequences. + (line 43) +* r a: Rebasing. (line 111) +* r e: Rebasing. (line 42) +* r e <1>: Rebasing. (line 107) +* r f: Rebasing. (line 79) +* r i: Rebasing. (line 76) +* r k: Rebasing. (line 91) +* r m: Rebasing. (line 83) +* r p: Rebasing. (line 28) +* r r: Rebasing. (line 97) +* r s: Rebasing. (line 47) +* r s <1>: Rebasing. (line 103) +* r u: Rebasing. (line 35) +* r w: Rebasing. (line 87) +* RET: References Buffer. (line 159) +* RET <1>: Visiting Files and Blobs from a Diff. + (line 9) +* RET <2>: Blaming. (line 71) +* RET <3>: Editing Rebase Sequences. + (line 15) +* s: Staging and Unstaging. + (line 29) +* S: Staging and Unstaging. + (line 36) +* s <1>: Editing Rebase Sequences. + (line 49) +* S-: Section Visibility. (line 20) +* SPC: Log Buffer. (line 41) +* SPC <1>: Commands Available in Diffs. + (line 53) +* SPC <2>: Blaming. (line 74) +* SPC <3>: Editing Rebase Sequences. + (line 19) +* t: Editing Rebase Sequences. + (line 97) +* t <1>: Tagging. (line 9) +* T: Notes. (line 9) +* T a: Notes. (line 47) +* T c: Notes. (line 43) +* t k: Tagging. (line 37) +* T m: Notes. (line 35) +* t p: Tagging. (line 43) +* T p: Notes. (line 28) +* t r: Tagging. (line 18) +* T r: Notes. (line 21) +* t t: Tagging. (line 14) +* T T: Notes. (line 14) +* TAB: Section Visibility. (line 10) +* u: Staging and Unstaging. + (line 42) +* U: Staging and Unstaging. + (line 50) +* v: Applying. (line 47) +* V: Reverting. (line 7) +* V A: Reverting. (line 29) +* V a: Reverting. (line 35) +* V s: Reverting. (line 32) +* V V: Reverting. (line 15) +* V v: Reverting. (line 20) +* W: Plain Patches. (line 7) +* w: Maildir Patches. (line 9) +* w a: Plain Patches. (line 20) +* w a <1>: Maildir Patches. (line 23) +* w a <2>: Maildir Patches. (line 38) +* W c: Plain Patches. (line 12) +* w m: Maildir Patches. (line 20) +* W s: Plain Patches. (line 26) +* w s: Maildir Patches. (line 34) +* w w: Maildir Patches. (line 14) +* w w <1>: Maildir Patches. (line 31) +* x: Editing Rebase Sequences. + (line 62) +* x <1>: Resetting. (line 9) +* X f: Resetting. (line 44) +* X h: Resetting. (line 24) +* X i: Resetting. (line 33) +* X k: Resetting. (line 28) +* X m: Resetting. (line 15) +* X s: Resetting. (line 19) +* X w: Resetting. (line 39) +* X w <1>: Wip Modes. (line 64) +* Y: Cherries. (line 18) +* y: References Buffer. (line 7) +* y <1>: Editing Rebase Sequences. + (line 74) +* y c: References Buffer. (line 25) +* y o: References Buffer. (line 30) +* y r: References Buffer. (line 34) +* y y: References Buffer. (line 21) +* z: Stashing. (line 9) +* Z: Worktree. (line 9) +* z a: Stashing. (line 52) +* z b: Stashing. (line 70) +* z B: Stashing. (line 74) +* Z b: Worktree. (line 13) +* Z c: Worktree. (line 16) +* z f: Stashing. (line 79) +* Z g: Worktree. (line 26) +* z i: Stashing. (line 20) +* z I: Stashing. (line 42) +* z k: Stashing. (line 63) +* Z k: Worktree. (line 22) +* z l: Stashing. (line 85) +* Z m: Worktree. (line 19) +* z p: Stashing. (line 57) +* z v: Stashing. (line 67) +* z w: Stashing. (line 24) +* z W: Stashing. (line 46) +* z x: Stashing. (line 30) +* z z: Stashing. (line 14) +* z Z: Stashing. (line 36) + + +File: magit.info, Node: Function and Command Index, Next: Variable Index, Prev: Keystroke Index, Up: Top + +Appendix D Function and Command Index +************************************* + +[index] +* Menu: + +* bug-reference-mode: Commit Mode and Hooks. + (line 49) +* forward-line: Editing Rebase Sequences. + (line 34) +* git-commit-ack: Commit Pseudo Headers. + (line 16) +* git-commit-cc: Commit Pseudo Headers. + (line 28) +* git-commit-check-style-conventions: Commit Message Conventions. + (line 37) +* git-commit-insert-pseudo-header: Commit Pseudo Headers. + (line 13) +* git-commit-next-message: Editing Commit Messages. + (line 41) +* git-commit-prev-message: Editing Commit Messages. + (line 36) +* git-commit-propertize-diff: Commit Mode and Hooks. + (line 41) +* git-commit-reported: Commit Pseudo Headers. + (line 31) +* git-commit-review: Commit Pseudo Headers. + (line 19) +* git-commit-save-message: Editing Commit Messages. + (line 33) +* git-commit-save-message <1>: Commit Mode and Hooks. + (line 26) +* git-commit-setup-changelog-support: Commit Mode and Hooks. + (line 29) +* git-commit-signoff: Commit Pseudo Headers. + (line 22) +* git-commit-suggested: Commit Pseudo Headers. + (line 35) +* git-commit-test: Commit Pseudo Headers. + (line 25) +* git-commit-turn-on-auto-fill: Commit Mode and Hooks. + (line 33) +* git-commit-turn-on-flyspell: Commit Mode and Hooks. + (line 37) +* git-rebase-backward-line: Editing Rebase Sequences. + (line 31) +* git-rebase-break: Editing Rebase Sequences. + (line 70) +* git-rebase-edit: Editing Rebase Sequences. + (line 46) +* git-rebase-exec: Editing Rebase Sequences. + (line 62) +* git-rebase-fixup: Editing Rebase Sequences. + (line 52) +* git-rebase-insert: Editing Rebase Sequences. + (line 74) +* git-rebase-kill-line: Editing Rebase Sequences. + (line 56) +* git-rebase-label: Editing Rebase Sequences. + (line 94) +* git-rebase-merge: Editing Rebase Sequences. + (line 102) +* git-rebase-merge-toggle-editmsg: Editing Rebase Sequences. + (line 108) +* git-rebase-move-line-down: Editing Rebase Sequences. + (line 40) +* git-rebase-move-line-up: Editing Rebase Sequences. + (line 37) +* git-rebase-pick: Editing Rebase Sequences. + (line 59) +* git-rebase-reset: Editing Rebase Sequences. + (line 97) +* git-rebase-reword: Editing Rebase Sequences. + (line 43) +* git-rebase-show-commit: Editing Rebase Sequences. + (line 15) +* git-rebase-show-or-scroll-down: Editing Rebase Sequences. + (line 25) +* git-rebase-show-or-scroll-up: Editing Rebase Sequences. + (line 19) +* git-rebase-squash: Editing Rebase Sequences. + (line 49) +* git-rebase-undo: Editing Rebase Sequences. + (line 77) +* ido-enter-magit-status: Status Buffer. (line 96) +* magit-add-section-hook: Section Hooks. (line 20) +* magit-after-save-refresh-status: Automatic Refreshing of Magit Buffers. + (line 55) +* magit-am: Maildir Patches. (line 9) +* magit-am-abort: Maildir Patches. (line 38) +* magit-am-apply-maildir: Maildir Patches. (line 20) +* magit-am-apply-patches: Maildir Patches. (line 14) +* magit-am-continue: Maildir Patches. (line 31) +* magit-am-skip: Maildir Patches. (line 34) +* magit-apply: Applying. (line 34) +* magit-bisect: Bisecting. (line 9) +* magit-bisect-bad: Bisecting. (line 32) +* magit-bisect-good: Bisecting. (line 36) +* magit-bisect-mark: Bisecting. (line 40) +* magit-bisect-reset: Bisecting. (line 51) +* magit-bisect-run: Bisecting. (line 26) +* magit-bisect-skip: Bisecting. (line 46) +* magit-bisect-start: Bisecting. (line 16) +* magit-blame: Blaming. (line 19) +* magit-blame <1>: Blaming. (line 95) +* magit-blame <2>: Commands for Buffers Visiting Files. + (line 83) +* magit-blame-addition: Blaming. (line 30) +* magit-blame-copy-hash: Blaming. (line 114) +* magit-blame-cycle-style: Blaming. (line 121) +* magit-blame-echo: Blaming. (line 61) +* magit-blame-next-chunk: Blaming. (line 98) +* magit-blame-next-chunk-same-commit: Blaming. (line 101) +* magit-blame-previous-chunk: Blaming. (line 104) +* magit-blame-previous-chunk-same-commit: Blaming. (line 107) +* magit-blame-quit: Blaming. (line 110) +* magit-blame-removal: Blaming. (line 45) +* magit-blame-reverse: Blaming. (line 53) +* magit-blob-next: Minor Mode for Buffers Visiting Blobs. + (line 16) +* magit-blob-previous: Commands for Buffers Visiting Files. + (line 104) +* magit-blob-previous <1>: Minor Mode for Buffers Visiting Blobs. + (line 13) +* magit-branch: Branch Commands. (line 13) +* magit-branch-and-checkout: Branch Commands. (line 63) +* magit-branch-checkout: Branch Commands. (line 69) +* magit-branch-configure: Branch Commands. (line 31) +* magit-branch-create: Branch Commands. (line 54) +* magit-branch-delete: Branch Commands. (line 138) +* magit-branch-or-checkout: Branch Commands. (line 251) +* magit-branch-orphan: Branch Commands. (line 247) +* magit-branch-rename: Branch Commands. (line 143) +* magit-branch-reset: Branch Commands. (line 123) +* magit-branch-shelve: Auxiliary Branch Commands. + (line 9) +* magit-branch-spinoff: Branch Commands. (line 91) +* magit-branch-spinout: Branch Commands. (line 118) +* magit-branch-unshelve: Auxiliary Branch Commands. + (line 19) +* magit-builtin-completing-read: Support for Completion Frameworks. + (line 41) +* magit-bundle: Bundle. (line 8) +* magit-call-git: Calling Git for Effect. + (line 28) +* magit-call-process: Calling Git for Effect. + (line 31) +* magit-cancel-section: Creating Sections. (line 69) +* magit-checkout: Branch Commands. (line 47) +* magit-cherry: Cherries. (line 18) +* magit-cherry-apply: Cherry Picking. (line 23) +* magit-cherry-copy: Cherry Picking. (line 17) +* magit-cherry-donate: Cherry Picking. (line 51) +* magit-cherry-harvest: Cherry Picking. (line 40) +* magit-cherry-pick: Cherry Picking. (line 9) +* magit-cherry-spinoff: Cherry Picking. (line 72) +* magit-cherry-spinout: Cherry Picking. (line 62) +* magit-clone: Cloning Repository. (line 20) +* magit-clone-bare: Cloning Repository. (line 38) +* magit-clone-mirror: Cloning Repository. (line 42) +* magit-clone-regular: Cloning Repository. (line 28) +* magit-clone-shallow: Cloning Repository. (line 32) +* magit-clone-shallow-exclude: Cloning Repository. (line 55) +* magit-clone-shallow-since: Cloning Repository. (line 49) +* magit-commit: Initiating a Commit. (line 9) +* magit-commit <1>: Commands for Buffers Visiting Files. + (line 36) +* magit-commit-amend: Initiating a Commit. (line 18) +* magit-commit-augment: Initiating a Commit. (line 59) +* magit-commit-create: Initiating a Commit. (line 14) +* magit-commit-extend: Initiating a Commit. (line 21) +* magit-commit-fixup: Initiating a Commit. (line 39) +* magit-commit-instant-fixup: Initiating a Commit. (line 46) +* magit-commit-instant-squash: Initiating a Commit. (line 56) +* magit-commit-reword: Initiating a Commit. (line 30) +* magit-commit-squash: Initiating a Commit. (line 49) +* magit-completing-read: Support for Completion Frameworks. + (line 57) +* magit-copy-buffer-revision: Common Commands. (line 39) +* magit-copy-section-value: Common Commands. (line 22) +* magit-current-section: Section Selection. (line 6) +* magit-cycle-margin-style: Log Margin. (line 63) +* magit-debug-git-executable: Git Executable. (line 55) +* magit-debug-git-executable <1>: Debugging Tools. (line 34) +* magit-define-section-jumper: Creating Sections. (line 74) +* magit-describe-section: Section Types and Values. + (line 14) +* magit-describe-section-briefly: Section Types and Values. + (line 17) +* magit-describe-section-briefly <1>: Matching Sections. (line 7) +* magit-diff: Diffing. (line 22) +* magit-diff <1>: Commands for Buffers Visiting Files. + (line 42) +* magit-diff-buffer-file: Commands for Buffers Visiting Files. + (line 52) +* magit-diff-default-context: Refreshing Diffs. (line 64) +* magit-diff-dwim: Diffing. (line 27) +* magit-diff-edit-hunk-commit: Commands Available in Diffs. + (line 24) +* magit-diff-flip-revs: Refreshing Diffs. (line 41) +* magit-diff-less-context: Refreshing Diffs. (line 58) +* magit-diff-more-context: Refreshing Diffs. (line 61) +* magit-diff-paths: Diffing. (line 56) +* magit-diff-range: Diffing. (line 30) +* magit-diff-refresh: Refreshing Diffs. (line 12) +* magit-diff-refresh <1>: Refreshing Diffs. (line 17) +* magit-diff-save-default-arguments: Refreshing Diffs. (line 27) +* magit-diff-scope: Matching Sections. (line 110) +* magit-diff-set-default-arguments: Refreshing Diffs. (line 21) +* magit-diff-show-or-scroll-down: Log Buffer. (line 50) +* magit-diff-show-or-scroll-down <1>: Blaming. (line 83) +* magit-diff-show-or-scroll-up: Log Buffer. (line 41) +* magit-diff-show-or-scroll-up <1>: Blaming. (line 74) +* magit-diff-staged: Diffing. (line 48) +* magit-diff-switch-range-type: Refreshing Diffs. (line 37) +* magit-diff-toggle-file-filter: Refreshing Diffs. (line 45) +* magit-diff-toggle-refine-hunk: Refreshing Diffs. (line 34) +* magit-diff-trace-definition: Commands Available in Diffs. + (line 15) +* magit-diff-type: Matching Sections. (line 88) +* magit-diff-unstaged: Diffing. (line 53) +* magit-diff-visit-file: Visiting Files and Blobs from a Diff. + (line 9) +* magit-diff-visit-file-other-frame: Visiting Files and Blobs from a Diff. + (line 71) +* magit-diff-visit-file-other-window: Visiting Files and Blobs from a Diff. + (line 70) +* magit-diff-visit-file-worktree: Visiting Files and Blobs from a Diff. + (line 50) +* magit-diff-visit-worktree-file-other-frame: Visiting Files and Blobs from a Diff. + (line 73) +* magit-diff-visit-worktree-file-other-window: Visiting Files and Blobs from a Diff. + (line 72) +* magit-diff-while-committing: Refreshing Diffs. (line 71) +* magit-diff-while-committing <1>: Editing Commit Messages. + (line 54) +* magit-diff-working-tree: Diffing. (line 43) +* magit-disable-section-inserter: Per-Repository Configuration. + (line 31) +* magit-discard: Applying. (line 40) +* magit-dispatch: Transient Commands. (line 19) +* magit-display-buffer: Switching Buffers. (line 6) +* magit-display-buffer-fullcolumn-most-v1: Switching Buffers. (line 68) +* magit-display-buffer-fullframe-status-topleft-v1: Switching Buffers. + (line 59) +* magit-display-buffer-fullframe-status-v1: Switching Buffers. + (line 54) +* magit-display-buffer-same-window-except-diff-v1: Switching Buffers. + (line 49) +* magit-display-buffer-traditional: Switching Buffers. (line 42) +* magit-display-repository-buffer: Common Commands. (line 9) +* magit-ediff: Ediffing. (line 21) +* magit-ediff-compare: Ediffing. (line 25) +* magit-ediff-dwim: Ediffing. (line 10) +* magit-ediff-resolve: Ediffing. (line 33) +* magit-ediff-show-commit: Ediffing. (line 58) +* magit-ediff-show-staged: Ediffing. (line 52) +* magit-ediff-show-stash: Ediffing. (line 61) +* magit-ediff-show-unstaged: Ediffing. (line 49) +* magit-ediff-show-working-tree: Ediffing. (line 55) +* magit-ediff-stage: Ediffing. (line 45) +* magit-edit-line-commit: Commands for Buffers Visiting Files. + (line 95) +* magit-emacs-Q-command: Debugging Tools. (line 16) +* magit-fetch: Fetching. (line 10) +* magit-fetch-all: Fetching. (line 45) +* magit-fetch-branch: Fetching. (line 37) +* magit-fetch-from-pushremote: Fetching. (line 15) +* magit-fetch-from-upstream: Fetching. (line 22) +* magit-fetch-modules: Submodule Transient. (line 51) +* magit-fetch-other: Fetching. (line 34) +* magit-fetch-refspec: Fetching. (line 41) +* magit-file-checkout: Resetting. (line 44) +* magit-file-checkout <1>: Commands for Buffers Visiting Files. + (line 118) +* magit-file-delete: Commands for Buffers Visiting Files. + (line 112) +* magit-file-dispatch: Commands for Buffers Visiting Files. + (line 22) +* magit-file-rename: Commands for Buffers Visiting Files. + (line 109) +* magit-file-untrack: Commands for Buffers Visiting Files. + (line 115) +* magit-find-file: General-Purpose Visit Commands. + (line 9) +* magit-find-file-other-frame: General-Purpose Visit Commands. + (line 19) +* magit-find-file-other-window: General-Purpose Visit Commands. + (line 14) +* magit-generate-buffer-name-default-function: Naming Buffers. + (line 16) +* magit-get-section: Matching Sections. (line 14) +* magit-git: Calling Git for Effect. + (line 46) +* magit-git-command: Running Git Manually. + (line 25) +* magit-git-command-topdir: Running Git Manually. + (line 17) +* magit-git-exit-code: Getting a Value from Git. + (line 10) +* magit-git-failure: Getting a Value from Git. + (line 17) +* magit-git-false: Getting a Value from Git. + (line 25) +* magit-git-insert: Getting a Value from Git. + (line 29) +* magit-git-items: Getting a Value from Git. + (line 41) +* magit-git-lines: Getting a Value from Git. + (line 37) +* magit-git-str: Getting a Value from Git. + (line 75) +* magit-git-string: Getting a Value from Git. + (line 32) +* magit-git-success: Getting a Value from Git. + (line 13) +* magit-git-true: Getting a Value from Git. + (line 21) +* magit-git-wash: Calling Git for Effect. + (line 50) +* magit-go-backward: Log Buffer. (line 20) +* magit-go-backward <1>: Refreshing Diffs. (line 80) +* magit-go-forward: Log Buffer. (line 23) +* magit-go-forward <1>: Refreshing Diffs. (line 83) +* magit-hunk-set-window-start: Section Movement. (line 45) +* magit-ido-completing-read: Support for Completion Frameworks. + (line 46) +* magit-init: Creating Repository. (line 7) +* magit-insert-am-sequence: Status Sections. (line 25) +* magit-insert-assumed-unchanged-files: Status Sections. (line 98) +* magit-insert-bisect-log: Status Sections. (line 39) +* magit-insert-bisect-output: Status Sections. (line 33) +* magit-insert-bisect-rest: Status Sections. (line 36) +* magit-insert-diff-filter-header: Status Header Sections. + (line 35) +* magit-insert-error-header: Status Header Sections. + (line 26) +* magit-insert-head-branch-header: Status Header Sections. + (line 38) +* magit-insert-heading: Creating Sections. (line 41) +* magit-insert-ignored-files: Status Sections. (line 83) +* magit-insert-local-branches: References Sections. (line 16) +* magit-insert-merge-log: Status Sections. (line 17) +* magit-insert-modules: Status Module Sections. + (line 12) +* magit-insert-modules-overview: Status Module Sections. + (line 30) +* magit-insert-modules-unpulled-from-pushremote: Status Module Sections. + (line 45) +* magit-insert-modules-unpulled-from-upstream: Status Module Sections. + (line 40) +* magit-insert-modules-unpushed-to-pushremote: Status Module Sections. + (line 55) +* magit-insert-modules-unpushed-to-upstream: Status Module Sections. + (line 50) +* magit-insert-push-branch-header: Status Header Sections. + (line 45) +* magit-insert-rebase-sequence: Status Sections. (line 21) +* magit-insert-recent-commits: Status Sections. (line 110) +* magit-insert-remote-branches: References Sections. (line 19) +* magit-insert-remote-header: Status Header Sections. + (line 58) +* magit-insert-repo-header: Status Header Sections. + (line 55) +* magit-insert-section: Creating Sections. (line 6) +* magit-insert-sequencer-sequence: Status Sections. (line 29) +* magit-insert-skip-worktree-files: Status Sections. (line 92) +* magit-insert-staged-changes: Status Sections. (line 53) +* magit-insert-stashes: Status Sections. (line 56) +* magit-insert-status-headers: Status Header Sections. + (line 12) +* magit-insert-tags: References Sections. (line 22) +* magit-insert-tags-header: Status Header Sections. + (line 49) +* magit-insert-tracked-files: Status Sections. (line 80) +* magit-insert-unpulled-cherries: Status Sections. (line 119) +* magit-insert-unpulled-from-pushremote: Status Sections. (line 66) +* magit-insert-unpulled-from-upstream: Status Sections. (line 62) +* magit-insert-unpulled-or-recent-commits: Status Sections. (line 104) +* magit-insert-unpushed-cherries: Status Sections. (line 125) +* magit-insert-unpushed-to-pushremote: Status Sections. (line 74) +* magit-insert-unpushed-to-upstream: Status Sections. (line 70) +* magit-insert-unstaged-changes: Status Sections. (line 50) +* magit-insert-untracked-files: Status Sections. (line 42) +* magit-insert-upstream-branch-header: Status Header Sections. + (line 41) +* magit-insert-user-header: Status Header Sections. + (line 65) +* magit-jump-to-diffstat-or-diff: Commands Available in Diffs. + (line 43) +* magit-kill-this-buffer: Minor Mode for Buffers Visiting Blobs. + (line 19) +* magit-list-repositories: Repository List. (line 6) +* magit-list-submodules: Listing Submodules. (line 13) +* magit-list-submodules <1>: Submodule Transient. (line 48) +* magit-log: Logging. (line 30) +* magit-log <1>: Commands for Buffers Visiting Files. + (line 60) +* magit-log-all: Logging. (line 55) +* magit-log-all-branches: Logging. (line 52) +* magit-log-branches: Logging. (line 49) +* magit-log-buffer-file: Commands for Buffers Visiting Files. + (line 70) +* magit-log-bury-buffer: Log Buffer. (line 14) +* magit-log-current: Logging. (line 35) +* magit-log-double-commit-limit: Log Buffer. (line 64) +* magit-log-half-commit-limit: Log Buffer. (line 67) +* magit-log-head: Logging. (line 46) +* magit-log-maybe-show-more-commits: Section Movement. (line 58) +* magit-log-maybe-update-blob-buffer: Section Movement. (line 72) +* magit-log-maybe-update-revision-buffer: Section Movement. (line 65) +* magit-log-move-to-parent: Log Buffer. (line 26) +* magit-log-move-to-revision: Log Buffer. (line 31) +* magit-log-other: Logging. (line 40) +* magit-log-refresh: Refreshing Logs. (line 12) +* magit-log-refresh <1>: Refreshing Logs. (line 17) +* magit-log-refresh <2>: Log Buffer. (line 7) +* magit-log-save-default-arguments: Refreshing Logs. (line 27) +* magit-log-select-pick: Select from Log. (line 21) +* magit-log-select-quit: Select from Log. (line 26) +* magit-log-set-default-arguments: Refreshing Logs. (line 21) +* magit-log-toggle-commit-limit: Log Buffer. (line 59) +* magit-log-trace-definition: Commands for Buffers Visiting Files. + (line 76) +* magit-margin-settings: Log Margin. (line 52) +* magit-maybe-set-dedicated: Switching Buffers. (line 89) +* magit-merge: Merging. (line 10) +* magit-merge <1>: Merging. (line 82) +* magit-merge-abort: Merging. (line 87) +* magit-merge-absorb: Merging. (line 42) +* magit-merge-editmsg: Merging. (line 30) +* magit-merge-into: Merging. (line 54) +* magit-merge-nocommit: Merging. (line 36) +* magit-merge-plain: Merging. (line 18) +* magit-merge-preview: Merging. (line 75) +* magit-merge-squash: Merging. (line 67) +* magit-mode-bury-buffer: Quitting Windows. (line 7) +* magit-mode-display-buffer: Refreshing Buffers. (line 32) +* magit-mode-quit-window: Quitting Windows. (line 31) +* magit-mode-setup: Refreshing Buffers. (line 17) +* magit-notes: Notes. (line 9) +* magit-notes-edit: Notes. (line 14) +* magit-notes-merge: Notes. (line 35) +* magit-notes-merge-abort: Notes. (line 47) +* magit-notes-merge-commit: Notes. (line 43) +* magit-notes-prune: Notes. (line 28) +* magit-notes-remove: Notes. (line 21) +* magit-patch: Plain Patches. (line 7) +* magit-patch-apply: Plain Patches. (line 20) +* magit-patch-apply <1>: Maildir Patches. (line 23) +* magit-patch-create: Plain Patches. (line 12) +* magit-patch-save: Plain Patches. (line 26) +* magit-pop-revision-stack: Using the Revision Stack. + (line 7) +* magit-process: Viewing Git Output. (line 17) +* magit-process-file: Getting a Value from Git. + (line 57) +* magit-process-git: Getting a Value from Git. + (line 50) +* magit-process-kill: Viewing Git Output. (line 24) +* magit-pull: Pulling. (line 10) +* magit-pull-branch: Pulling. (line 28) +* magit-pull-from-pushremote: Pulling. (line 14) +* magit-pull-from-upstream: Pulling. (line 21) +* magit-push: Pushing. (line 10) +* magit-push-current: Pushing. (line 29) +* magit-push-current-to-pushremote: Pushing. (line 15) +* magit-push-current-to-upstream: Pushing. (line 22) +* magit-push-implicitly: Pushing. (line 74) +* magit-push-matching: Pushing. (line 45) +* magit-push-other: Pushing. (line 33) +* magit-push-refspecs: Pushing. (line 37) +* magit-push-tag: Pushing. (line 59) +* magit-push-tags: Pushing. (line 52) +* magit-push-to-remote: Pushing. (line 91) +* magit-rebase: Rebasing. (line 10) +* magit-rebase-abort: Rebasing. (line 111) +* magit-rebase-autosquash: Rebasing. (line 79) +* magit-rebase-branch: Rebasing. (line 42) +* magit-rebase-continue: Rebasing. (line 97) +* magit-rebase-edit: Rebasing. (line 107) +* magit-rebase-edit-commit: Rebasing. (line 83) +* magit-rebase-interactive: Rebasing. (line 76) +* magit-rebase-onto-pushremote: Rebasing. (line 28) +* magit-rebase-onto-upstream: Rebasing. (line 35) +* magit-rebase-remove-commit: Rebasing. (line 91) +* magit-rebase-reword-commit: Rebasing. (line 87) +* magit-rebase-skip: Rebasing. (line 103) +* magit-rebase-subset: Rebasing. (line 47) +* magit-reflog-current: Reflog. (line 12) +* magit-reflog-head: Reflog. (line 18) +* magit-reflog-other: Reflog. (line 15) +* magit-refresh: Automatic Refreshing of Magit Buffers. + (line 26) +* magit-refresh-all: Automatic Refreshing of Magit Buffers. + (line 34) +* magit-refs-set-show-commit-count: References Buffer. (line 34) +* magit-region-sections: Section Selection. (line 9) +* magit-region-values: Section Selection. (line 35) +* magit-remote: Remote Commands. (line 14) +* magit-remote-add: Remote Commands. (line 48) +* magit-remote-configure: Remote Commands. (line 32) +* magit-remote-prune: Remote Commands. (line 63) +* magit-remote-prune-refspecs: Remote Commands. (line 67) +* magit-remote-remove: Remote Commands. (line 60) +* magit-remote-rename: Remote Commands. (line 52) +* magit-remote-set-url: Remote Commands. (line 56) +* magit-repolist-column-branch: Repository List. (line 45) +* magit-repolist-column-branches: Repository List. (line 52) +* magit-repolist-column-flag: Repository List. (line 58) +* magit-repolist-column-ident: Repository List. (line 34) +* magit-repolist-column-path: Repository List. (line 38) +* magit-repolist-column-stashes: Repository List. (line 55) +* magit-repolist-column-unpulled-from-pushremote: Repository List. + (line 74) +* magit-repolist-column-unpulled-from-upstream: Repository List. + (line 70) +* magit-repolist-column-unpushed-to-pushremote: Repository List. + (line 82) +* magit-repolist-column-unpushed-to-upstream: Repository List. + (line 78) +* magit-repolist-column-upstream: Repository List. (line 48) +* magit-repolist-column-version: Repository List. (line 41) +* magit-reset-hard: Resetting. (line 24) +* magit-reset-index: Staging and Unstaging. + (line 78) +* magit-reset-index <1>: Resetting. (line 33) +* magit-reset-keep: Resetting. (line 28) +* magit-reset-mixed: Resetting. (line 15) +* 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-restore-window-configuration: Quitting Windows. (line 21) +* magit-reverse: Applying. (line 47) +* magit-reverse-in-index: Staging and Unstaging. + (line 58) +* magit-revert: Reverting. (line 7) +* magit-revert-and-commit: Reverting. (line 15) +* magit-revert-no-commit: Reverting. (line 20) +* magit-run: Running Git Manually. + (line 13) +* magit-run-git: Calling Git for Effect. + (line 34) +* magit-run-git-async: Calling Git for Effect. + (line 59) +* magit-run-git-gui: Running Git Manually. + (line 59) +* magit-run-git-with-editor: Calling Git for Effect. + (line 71) +* magit-run-git-with-input: Calling Git for Effect. + (line 37) +* magit-run-gitk: Running Git Manually. + (line 50) +* magit-run-gitk-all: Running Git Manually. + (line 53) +* magit-run-gitk-branches: Running Git Manually. + (line 56) +* magit-save-window-configuration: Switching Buffers. (line 80) +* magit-section-backward: Section Movement. (line 11) +* magit-section-backward-siblings: Section Movement. (line 19) +* magit-section-case: Matching Sections. (line 66) +* magit-section-cycle: Section Visibility. (line 13) +* magit-section-cycle-diffs: Section Visibility. (line 16) +* magit-section-cycle-global: Section Visibility. (line 20) +* magit-section-forward: Section Movement. (line 16) +* magit-section-forward-siblings: Section Movement. (line 24) +* magit-section-hide: Section Visibility. (line 42) +* magit-section-hide-children: Section Visibility. (line 54) +* magit-section-ident: Matching Sections. (line 10) +* magit-section-match: Matching Sections. (line 18) +* magit-section-set-window-start: Section Movement. (line 52) +* magit-section-show: Section Visibility. (line 39) +* magit-section-show-children: Section Visibility. (line 49) +* magit-section-show-headings: Section Visibility. (line 45) +* magit-section-show-level-1: Section Visibility. (line 26) +* magit-section-show-level-1-all: Section Visibility. (line 32) +* magit-section-show-level-2: Section Visibility. (line 26) +* magit-section-show-level-2-all: Section Visibility. (line 32) +* magit-section-show-level-3: Section Visibility. (line 26) +* magit-section-show-level-3-all: Section Visibility. (line 32) +* magit-section-show-level-4: Section Visibility. (line 26) +* magit-section-show-level-4-all: Section Visibility. (line 32) +* magit-section-toggle: Section Visibility. (line 10) +* magit-section-toggle-children: Section Visibility. (line 57) +* magit-section-up: Section Movement. (line 28) +* magit-section-value-if: Matching Sections. (line 57) +* magit-sequence-abort: Cherry Picking. (line 91) +* magit-sequence-abort <1>: Reverting. (line 35) +* magit-sequence-continue: Cherry Picking. (line 85) +* magit-sequence-continue <1>: Reverting. (line 29) +* magit-sequence-skip: Cherry Picking. (line 88) +* magit-sequence-skip <1>: Reverting. (line 32) +* magit-shell-command: Running Git Manually. + (line 38) +* magit-shell-command-topdir: Running Git Manually. + (line 34) +* magit-show-commit: Diffing. (line 63) +* magit-show-commit <1>: Blaming. (line 71) +* magit-show-refs: References Buffer. (line 7) +* magit-show-refs-current: References Buffer. (line 25) +* magit-show-refs-head: References Buffer. (line 21) +* magit-show-refs-other: References Buffer. (line 30) +* magit-snapshot-both: Stashing. (line 36) +* magit-snapshot-index: Stashing. (line 42) +* magit-snapshot-worktree: Stashing. (line 46) +* magit-stage: Staging and Unstaging. + (line 29) +* magit-stage-file: Staging from File-Visiting Buffers. + (line 11) +* magit-stage-file <1>: Commands for Buffers Visiting Files. + (line 29) +* magit-stage-modified: Staging and Unstaging. + (line 36) +* magit-start-git: Calling Git for Effect. + (line 82) +* magit-start-process: Calling Git for Effect. + (line 100) +* magit-stash: Stashing. (line 9) +* magit-stash-apply: Stashing. (line 52) +* magit-stash-both: Stashing. (line 14) +* magit-stash-branch: Stashing. (line 70) +* magit-stash-branch-here: Stashing. (line 74) +* magit-stash-clear: Stashing. (line 82) +* magit-stash-drop: Stashing. (line 63) +* magit-stash-format-patch: Stashing. (line 79) +* magit-stash-index: Stashing. (line 20) +* magit-stash-keep-index: Stashing. (line 30) +* magit-stash-list: Stashing. (line 85) +* magit-stash-pop: Stashing. (line 57) +* magit-stash-show: Diffing. (line 67) +* magit-stash-show <1>: Stashing. (line 67) +* magit-stash-worktree: Stashing. (line 24) +* magit-stashes-maybe-update-stash-buffer: Section Movement. (line 92) +* magit-status: Status Buffer. (line 23) +* magit-status-maybe-update-blob-buffer: Section Movement. (line 87) +* magit-status-maybe-update-revision-buffer: Section Movement. + (line 77) +* magit-status-maybe-update-stash-buffer: Section Movement. (line 82) +* magit-status-quick: Status Buffer. (line 70) +* magit-submodule: Submodule Transient. (line 7) +* magit-submodule-add: Submodule Transient. (line 20) +* magit-submodule-fetch: Fetching. (line 48) +* magit-submodule-populate: Submodule Transient. (line 32) +* magit-submodule-register: Submodule Transient. (line 26) +* magit-submodule-synchronize: Submodule Transient. (line 40) +* magit-submodule-unpopulate: Submodule Transient. (line 45) +* magit-submodule-update: Submodule Transient. (line 36) +* magit-subtree: Subtree. (line 9) +* magit-subtree-add: Subtree. (line 24) +* magit-subtree-add-commit: Subtree. (line 28) +* magit-subtree-export: Subtree. (line 37) +* magit-subtree-import: Subtree. (line 13) +* magit-subtree-merge: Subtree. (line 31) +* magit-subtree-pull: Subtree. (line 34) +* magit-subtree-push: Subtree. (line 48) +* magit-subtree-split: Subtree. (line 52) +* magit-switch-to-repository-buffer: Common Commands. (line 6) +* magit-switch-to-repository-buffer-other-frame: Common Commands. + (line 8) +* magit-switch-to-repository-buffer-other-window: Common Commands. + (line 7) +* magit-tag: Tagging. (line 9) +* magit-tag-create: Tagging. (line 14) +* magit-tag-delete: Tagging. (line 37) +* magit-tag-prune: Tagging. (line 43) +* magit-tag-release: Tagging. (line 18) +* magit-toggle-buffer-lock: Modes and Buffers. (line 18) +* magit-toggle-margin: Refreshing Logs. (line 34) +* magit-toggle-margin <1>: Log Margin. (line 60) +* magit-toggle-margin-details: Log Margin. (line 66) +* magit-toggle-verbose-refresh: Debugging Tools. (line 29) +* magit-unstage: Staging and Unstaging. + (line 42) +* magit-unstage-all: Staging and Unstaging. + (line 50) +* magit-unstage-file: Staging from File-Visiting Buffers. + (line 18) +* magit-unstage-file <1>: Commands for Buffers Visiting Files. + (line 32) +* magit-version: Git Executable. (line 59) +* 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-worktree: Worktree. (line 9) +* magit-worktree-branch: Worktree. (line 16) +* magit-worktree-checkout: Worktree. (line 13) +* magit-worktree-delete: Worktree. (line 22) +* magit-worktree-move: Worktree. (line 19) +* magit-worktree-status: Worktree. (line 26) +* scroll-down: Commands Available in Diffs. + (line 56) +* scroll-up: Commands Available in Diffs. + (line 53) +* with-editor-cancel: Editing Commit Messages. + (line 22) +* with-editor-cancel <1>: Editing Rebase Sequences. + (line 11) +* with-editor-debug: Debugging Tools. (line 41) +* with-editor-finish: Editing Commit Messages. + (line 18) +* with-editor-finish <1>: Editing Rebase Sequences. + (line 7) +* with-editor-usage-message: Commit Mode and Hooks. + (line 52) + + +File: magit.info, Node: Variable Index, Prev: Function and Command Index, Up: Top + +Appendix E Variable Index +************************* + +[index] +* Menu: + +* auto-revert-buffer-list-filter: Automatic Reverting of File-Visiting Buffers. + (line 73) +* auto-revert-interval: Automatic Reverting of File-Visiting Buffers. + (line 69) +* auto-revert-mode: Automatic Reverting of File-Visiting Buffers. + (line 57) +* auto-revert-stop-on-user-input: Automatic Reverting of File-Visiting Buffers. + (line 65) +* auto-revert-use-notify: Automatic Reverting of File-Visiting Buffers. + (line 46) +* auto-revert-verbose: Automatic Reverting of File-Visiting Buffers. + (line 94) +* branch.autoSetupMerge: Branch Git Variables. + (line 71) +* branch.autoSetupRebase: Branch Git Variables. + (line 85) +* branch.NAME.description: Branch Git Variables. + (line 42) +* branch.NAME.merge: Branch Git Variables. + (line 10) +* branch.NAME.pushRemote: Branch Git Variables. + (line 29) +* branch.NAME.rebase: Branch Git Variables. + (line 20) +* branch.NAME.remote: Branch Git Variables. + (line 15) +* core.notesRef: Notes. (line 53) +* git-commit-fill-column: Commit Message Conventions. + (line 18) +* git-commit-finish-query-functions: Commit Message Conventions. + (line 22) +* git-commit-known-pseudo-headers: Commit Pseudo Headers. + (line 9) +* git-commit-major-mode: Commit Mode and Hooks. + (line 12) +* git-commit-setup-hook: Commit Mode and Hooks. + (line 21) +* git-commit-setup-hook <1>: Commit Mode and Hooks. + (line 55) +* git-commit-style-convention-checks: Commit Message Conventions. + (line 42) +* git-commit-summary-max-length: Commit Message Conventions. + (line 13) +* git-rebase-auto-advance: Editing Rebase Sequences. + (line 80) +* git-rebase-confirm-cancel: Editing Rebase Sequences. + (line 86) +* git-rebase-show-instructions: Editing Rebase Sequences. + (line 83) +* global-auto-revert-mode: Automatic Reverting of File-Visiting Buffers. + (line 21) +* magit-auto-revert-immediately: Automatic Reverting of File-Visiting Buffers. + (line 30) +* magit-auto-revert-mode: Automatic Reverting of File-Visiting Buffers. + (line 17) +* magit-auto-revert-tracked-only: Automatic Reverting of File-Visiting Buffers. + (line 51) +* magit-bisect-show-graph: Bisecting. (line 57) +* magit-blame-disable-modes: Blaming. (line 145) +* magit-blame-echo-style: Blaming. (line 131) +* magit-blame-goto-chunk-hook: Blaming. (line 150) +* magit-blame-read-only: Blaming. (line 141) +* magit-blame-styles: Blaming. (line 127) +* magit-blame-time-format: Blaming. (line 137) +* magit-branch-adjust-remote-upstream-alist: Branch Commands. (line 196) +* magit-branch-direct-configure: Branch Commands. (line 19) +* magit-branch-prefer-remote-upstream: Branch Commands. (line 152) +* magit-branch-read-upstream-first: Branch Commands. (line 147) +* magit-buffer-name-format: Naming Buffers. (line 25) +* magit-bury-buffer-function: Quitting Windows. (line 13) +* magit-cherry-margin: Cherries. (line 21) +* magit-clone-always-transient: Cloning Repository. (line 12) +* magit-clone-default-directory: Cloning Repository. (line 78) +* magit-clone-name-alist: Cloning Repository. (line 88) +* magit-clone-set-remote-head: Cloning Repository. (line 60) +* magit-clone-set-remote.pushDefault: Cloning Repository. (line 69) +* magit-clone-url-format: Cloning Repository. (line 108) +* magit-commit-ask-to-stage: Initiating a Commit. (line 65) +* magit-commit-diff-inhibit-same-window: Initiating a Commit. (line 97) +* magit-commit-extend-override-date: Initiating a Commit. (line 72) +* magit-commit-reword-override-date: Initiating a Commit. (line 75) +* magit-commit-show-diff: Initiating a Commit. (line 69) +* magit-commit-squash-confirm: Initiating a Commit. (line 78) +* magit-completing-read-function: Support for Completion Frameworks. + (line 27) +* magit-define-global-key-bindings: Default Bindings. (line 6) +* magit-diff-adjust-tab-width: Diff Options. (line 17) +* magit-diff-buffer-file-locked: Commands for Buffers Visiting Files. + (line 55) +* magit-diff-extra-stat-arguments: Diff Options. (line 112) +* magit-diff-hide-trailing-cr-characters: Diff Options. (line 77) +* magit-diff-highlight-hunk-region-functions: Diff Options. (line 80) +* magit-diff-highlight-indentation: Diff Options. (line 63) +* magit-diff-highlight-trailing: Diff Options. (line 59) +* magit-diff-paint-whitespace: Diff Options. (line 38) +* magit-diff-paint-whitespace-lines: Diff Options. (line 52) +* magit-diff-refine-hunk: Diff Options. (line 6) +* magit-diff-refine-ignore-whitespace: Diff Options. (line 13) +* magit-diff-unmarked-lines-keep-foreground: Diff Options. (line 105) +* magit-diff-visit-previous-blob: Visiting Files and Blobs from a Diff. + (line 38) +* magit-direct-use-buffer-arguments: Transient Arguments and Buffer Variables. + (line 72) +* magit-display-buffer-function: Switching Buffers. (line 25) +* magit-display-buffer-noselect: Switching Buffers. (line 17) +* magit-dwim-selection: Completion and Confirmation. + (line 42) +* magit-ediff-dwim-show-on-hunks: Ediffing. (line 63) +* magit-ediff-quit-hook: Ediffing. (line 76) +* magit-ediff-show-stash-with-index: Ediffing. (line 70) +* magit-generate-buffer-name-function: Naming Buffers. (line 6) +* magit-git-debug: Viewing Git Output. (line 26) +* magit-git-debug <1>: Getting a Value from Git. + (line 68) +* magit-git-executable: Git Executable. (line 26) +* magit-git-global-arguments: Global Git Arguments. + (line 6) +* magit-keep-region-overlay: The Selection. (line 52) +* magit-list-refs-sortby: Additional Completion Options. + (line 6) +* magit-log-auto-more: Log Buffer. (line 69) +* magit-log-buffer-file-locked: Commands for Buffers Visiting Files. + (line 78) +* magit-log-margin: Log Margin. (line 12) +* magit-log-margin-show-committer-date: Log Margin. (line 44) +* magit-log-section-commit-count: Status Sections. (line 114) +* magit-log-select-margin: Select from Log. (line 28) +* magit-log-show-refname-after-summary: Log Buffer. (line 74) +* magit-log-trace-definition-function: Commands Available in Diffs. + (line 17) +* magit-module-sections-hook: Status Module Sections. + (line 19) +* magit-module-sections-nested: Status Module Sections. + (line 22) +* magit-no-confirm: Action Confirmation. (line 18) +* magit-pop-revision-stack-format: Using the Revision Stack. + (line 34) +* magit-post-commit-hook: Initiating a Commit. (line 86) +* magit-post-display-buffer-hook: Switching Buffers. (line 85) +* magit-pre-display-buffer-hook: Switching Buffers. (line 76) +* magit-prefer-remote-upstream: Branch Git Variables. + (line 109) +* magit-prefix-use-buffer-arguments: Transient Arguments and Buffer Variables. + (line 64) +* magit-process-extreme-logging: Viewing Git Output. (line 44) +* magit-process-raise-error: Calling Git for Effect. + (line 125) +* magit-pull-or-fetch: Fetching. (line 51) +* magit-reflog-margin: Reflog. (line 20) +* magit-refresh-args: Refreshing Buffers. (line 52) +* magit-refresh-buffer-hook: Automatic Refreshing of Magit Buffers. + (line 41) +* magit-refresh-function: Refreshing Buffers. (line 47) +* magit-refresh-status-buffer: Automatic Refreshing of Magit Buffers. + (line 46) +* magit-refs-filter-alist: References Buffer. (line 137) +* magit-refs-focus-column-width: References Buffer. (line 75) +* magit-refs-margin: References Buffer. (line 89) +* magit-refs-margin-for-tags: References Buffer. (line 112) +* magit-refs-pad-commit-counts: References Buffer. (line 45) +* magit-refs-primary-column-width: References Buffer. (line 63) +* magit-refs-sections-hook: References Sections. (line 13) +* magit-refs-show-commit-count: References Buffer. (line 36) +* magit-refs-show-remote-prefix: References Buffer. (line 57) +* magit-remote-add-set-remote.pushDefault: Remote Commands. (line 83) +* magit-remote-direct-configure: Remote Commands. (line 20) +* magit-remote-git-executable: Git Executable. (line 32) +* magit-repolist-columns: Repository List. (line 13) +* magit-repository-directories: Status Buffer. (line 57) +* magit-revision-filter-files-on-follow: Revision Buffer. (line 55) +* magit-revision-insert-related-refs: Revision Buffer. (line 6) +* magit-revision-show-gravatars: Revision Buffer. (line 15) +* magit-revision-use-hash-sections: Revision Buffer. (line 31) +* magit-root-section: Matching Sections. (line 81) +* magit-save-repository-buffers: Automatic Saving of File-Visiting Buffers. + (line 13) +* magit-section-cache-visibility: Section Visibility. (line 82) +* magit-section-initial-visibility-alist: Section Visibility. (line 66) +* magit-section-movement-hook: Section Movement. (line 41) +* magit-section-set-visibility-hook: Section Visibility. (line 92) +* magit-section-show-child-count: Section Options. (line 9) +* magit-section-visibility-indicator: Section Visibility. (line 109) +* magit-shell-command-verbose-prompt: Running Git Manually. + (line 43) +* magit-stashes-margin: Stashing. (line 87) +* magit-status-headers-hook: Status Header Sections. + (line 17) +* magit-status-margin: Status Options. (line 9) +* magit-status-refresh-hook: Status Options. (line 6) +* magit-status-sections-hook: Status Sections. (line 10) +* magit-submodule-list-columns: Listing Submodules. (line 20) +* magit-this-process: Calling Git for Effect. + (line 121) +* magit-uniquify-buffer-names: Naming Buffers. (line 71) +* magit-unstage-committed: Staging and Unstaging. + (line 52) +* magit-update-other-window-delay: Section Movement. (line 97) +* magit-visit-ref-behavior: References Buffer. (line 168) +* magit-wip-after-apply-mode: Legacy Wip Modes. (line 18) +* magit-wip-after-apply-mode-lighter: Legacy Wip Modes. (line 54) +* magit-wip-after-save-local-mode-lighter: Legacy Wip Modes. (line 51) +* magit-wip-after-save-mode: Legacy Wip Modes. (line 13) +* magit-wip-before-change-mode: Legacy Wip Modes. (line 31) +* magit-wip-before-change-mode-lighter: Legacy Wip Modes. (line 57) +* magit-wip-initial-backup-mode: Legacy Wip Modes. (line 35) +* magit-wip-initial-backup-mode-lighter: Legacy Wip Modes. (line 60) +* magit-wip-merge-branch: Wip Graph. (line 6) +* magit-wip-mode: Wip Modes. (line 30) +* magit-wip-mode-lighter: Wip Modes. (line 98) +* magit-wip-namespace: Wip Modes. (line 91) +* notes.displayRef: Notes. (line 57) +* pull.rebase: Branch Git Variables. + (line 50) +* remote.NAME.fetch: Remote Git Variables. + (line 14) +* remote.NAME.push: Remote Git Variables. + (line 23) +* remote.NAME.pushurl: Remote Git Variables. + (line 18) +* remote.NAME.tagOpts: Remote Git Variables. + (line 27) +* remote.NAME.url: Remote Git Variables. + (line 10) +* remote.pushDefault: Branch Git Variables. + (line 62) + + + +Tag Table: +Node: Top754 +Node: Introduction6610 +Node: Installation11326 +Node: Installing from Melpa11656 +Node: Installing from the Git Repository12729 +Node: Post-Installation Tasks15461 +Node: Getting Started16746 +Node: Interface Concepts21986 +Node: Modes and Buffers22347 +Node: Switching Buffers24058 +Node: Naming Buffers28797 +Node: Quitting Windows32100 +Node: Automatic Refreshing of Magit Buffers33838 +Node: Automatic Saving of File-Visiting Buffers36719 +Node: Automatic Reverting of File-Visiting Buffers37903 +Node: Risk of Reverting Automatically42888 +Node: Sections45270 +Node: Section Movement46196 +Node: Section Visibility51070 +Node: Section Hooks57085 +Node: Section Types and Values59491 +Node: Section Options60906 +Node: Transient Commands61377 +Node: Transient Arguments and Buffer Variables62609 +Node: Completion Confirmation and the Selection69620 +Node: Action Confirmation70064 +Node: Completion and Confirmation77916 +Node: The Selection81101 +Node: The hunk-internal region83999 +Node: Support for Completion Frameworks85088 +Node: Additional Completion Options89991 +Node: Running Git90589 +Node: Viewing Git Output90862 +Node: Git Process Status92956 +Node: Running Git Manually93921 +Node: Git Executable96353 +Node: Global Git Arguments99361 +Node: Inspecting100166 +Node: Status Buffer101323 +Node: Status Sections106333 +Node: Status Header Sections111860 +Node: Status Module Sections114479 +Node: Status Options116976 +Node: Repository List118439 +Node: Logging121765 +Node: Refreshing Logs124291 +Node: Log Buffer125712 +Node: Log Margin129912 +Node: Select from Log133065 +Node: Reflog135275 +Node: Cherries136912 +Node: Diffing138750 +Node: Refreshing Diffs141784 +Node: Commands Available in Diffs145293 +Node: Diff Options147807 +Node: Revision Buffer153271 +Node: Ediffing156591 +Node: References Buffer160186 +Node: References Sections170780 +Node: Bisecting171637 +Node: Visiting Files and Blobs173948 +Node: General-Purpose Visit Commands174418 +Node: Visiting Files and Blobs from a Diff175371 +Node: Blaming178815 +Node: Manipulating184950 +Node: Creating Repository185292 +Node: Cloning Repository185829 +Node: Staging and Unstaging191189 +Node: Staging from File-Visiting Buffers195170 +Node: Applying196276 +Node: Committing198349 +Node: Initiating a Commit198932 +Node: Editing Commit Messages204121 +Node: Using the Revision Stack206894 +Node: Commit Pseudo Headers209939 +Node: Commit Mode and Hooks211234 +Node: Commit Message Conventions214162 +Node: Branching216285 +Node: The Two Remotes216511 +Node: Branch Commands219164 +Node: Branch Git Variables231709 +Node: Auxiliary Branch Commands237082 +Node: Merging238198 +Node: Resolving Conflicts242156 +Node: Rebasing247527 +Node: Editing Rebase Sequences252316 +Node: Information About In-Progress Rebase256532 +Ref: Information About In-Progress Rebase-Footnote-1265414 +Node: Cherry Picking266010 +Node: Reverting270344 +Node: Resetting271763 +Node: Stashing273589 +Node: Transferring278200 +Node: Remotes278422 +Node: Remote Commands278574 +Node: Remote Git Variables282613 +Node: Fetching283887 +Node: Pulling286333 +Node: Pushing287359 +Node: Plain Patches291650 +Node: Maildir Patches293121 +Node: Miscellaneous294600 +Node: Tagging294925 +Node: Notes296818 +Node: Submodules299153 +Node: Listing Submodules299371 +Node: Submodule Transient300775 +Node: Subtree303252 +Node: Worktree305183 +Node: Bundle306249 +Node: Common Commands306616 +Node: Wip Modes309244 +Node: Wip Graph314135 +Node: Legacy Wip Modes316448 +Node: Commands for Buffers Visiting Files319335 +Node: Minor Mode for Buffers Visiting Blobs324891 +Node: Customizing325689 +Node: Per-Repository Configuration327285 +Node: Essential Settings329539 +Node: Safety329884 +Node: Performance331645 +Ref: Log Performance334674 +Ref: Diff Performance335984 +Ref: Refs Buffer Performance337325 +Ref: Committing Performance337900 +Node: Microsoft Windows Performance338813 +Node: MacOS Performance340004 +Ref: MacOS Performance-Footnote-1340709 +Node: Default Bindings340791 +Node: Plumbing343032 +Node: Calling Git343861 +Node: Getting a Value from Git345386 +Node: Calling Git for Effect349114 +Node: Section Plumbing355008 +Node: Creating Sections355236 +Node: Section Selection359132 +Node: Matching Sections360928 +Node: Refreshing Buffers366849 +Node: Conventions369993 +Node: Theming Faces370185 +Node: FAQ378290 +Node: FAQ - How to ...?378732 +Node: How to pronounce Magit?379145 +Node: How to show git's output?379947 +Node: How to install the gitman info manual?380733 +Node: How to show diffs for gpg-encrypted files?381703 +Node: How does branching and pushing work?382299 +Node: Can Magit be used as ediff-version-control-package?382662 +Node: Should I disable VC?384680 +Node: FAQ - Issues and Errors385298 +Node: Magit is slow386299 +Node: I changed several thousand files at once and now Magit is unusable386513 +Node: I am having problems committing387242 +Node: I am using MS Windows and cannot push with Magit387723 +Node: I am using OS X and SOMETHING works in shell but not in Magit388340 +Node: Expanding a file to show the diff causes it to disappear389171 +Node: Point is wrong in the COMMIT_EDITMSG buffer389752 +Node: The mode-line information isn't always up-to-date390798 +Node: A branch and tag sharing the same name breaks SOMETHING391861 +Node: My Git hooks work on the command-line but not inside Magit392747 +Node: git-commit-mode isn't used when committing from the command-line393593 +Node: Point ends up inside invisible text when jumping to a file-visiting buffer395864 +Node: I am unable to stage when using Tramp from MS Windows396724 +Node: I am no longer able to save popup defaults397631 +Node: Debugging Tools398591 +Node: Keystroke Index400595 +Node: Function and Command Index433692 +Node: Variable Index484418 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/magit-section-20210801.1004/dir b/elpa/magit-section-20220101.841/dir similarity index 100% rename from elpa/magit-section-20210801.1004/dir rename to elpa/magit-section-20220101.841/dir diff --git a/elpa/magit-section-20210801.1004/magit-section-autoloads.el b/elpa/magit-section-20220101.841/magit-section-autoloads.el similarity index 100% rename from elpa/magit-section-20210801.1004/magit-section-autoloads.el rename to elpa/magit-section-20220101.841/magit-section-autoloads.el diff --git a/elpa/magit-section-20210801.1004/magit-section-pkg.el b/elpa/magit-section-20220101.841/magit-section-pkg.el similarity index 59% rename from elpa/magit-section-20210801.1004/magit-section-pkg.el rename to elpa/magit-section-20220101.841/magit-section-pkg.el index ba629b0c..4610002a 100644 --- a/elpa/magit-section-20210801.1004/magit-section-pkg.el +++ b/elpa/magit-section-20220101.841/magit-section-pkg.el @@ -1,7 +1,7 @@ -(define-package "magit-section" "20210801.1004" "Sections for read-only buffers" +(define-package "magit-section" "20220101.841" "Sections for read-only buffers" '((emacs "25.1") - (dash "20210330")) - :commit "7b46191dedba053f1c44d5f13d4283860e26cbd6" :authors + (dash "20210826")) + :commit "2a7812705f5cf4b864bb162576415863f4116285" :authors '(("Jonas Bernoulli" . "jonas@bernoul.li")) :maintainer '("Jonas Bernoulli" . "jonas@bernoul.li") diff --git a/elpa/magit-section-20210801.1004/magit-section.el b/elpa/magit-section-20220101.841/magit-section.el similarity index 97% rename from elpa/magit-section-20210801.1004/magit-section.el rename to elpa/magit-section-20220101.841/magit-section.el index 482b218e..3daf4dc1 100644 --- a/elpa/magit-section-20210801.1004/magit-section.el +++ b/elpa/magit-section-20220101.841/magit-section.el @@ -1,6 +1,6 @@ ;;; magit-section.el --- Sections for read-only buffers -*- lexical-binding: t -*- -;; Copyright (C) 2010-2021 The Magit Project Contributors +;; Copyright (C) 2010-2022 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -10,8 +10,8 @@ ;; Keywords: tools ;; Homepage: https://github.com/magit/magit -;; Package-Requires: ((emacs "25.1") (dash "20210330")) -;; Package-Version: 3.2.0 +;; Package-Requires: ((emacs "25.1") (dash "2.19.1")) +;; Package-Version: 3.3.0 ;; SPDX-License-Identifier: GPL-3.0-or-later ;; Magit-Section is free software; you can redistribute it and/or modify @@ -87,7 +87,7 @@ succeed.") (defcustom magit-section-show-child-count t "Whether to append the number of children to section headings. This only applies to sections for which doing so makes sense." - :package-version '(magit . "2.1.0") + :package-version '(magit-section . "2.1.0") :group 'magit-section :type 'boolean) @@ -102,7 +102,7 @@ the case. If t, then cache the visibility of all sections. If a list of section types, then only do so for matching sections. If nil, then don't do so for any sections." - :package-version '(magit . "2.12.0") + :package-version '(magit-section . "2.12.0") :group 'magit-section :type '(choice (const :tag "Don't cache visibility" nil) (const :tag "Cache visibility of all sections" t) @@ -129,7 +129,7 @@ An entry whose key is `magit-status-initial-section' specifies the visibility of the section `magit-status-goto-initial-section' jumps to. This does not only override defaults, but also other entries of this alist." - :package-version '(magit . "2.12.0") + :package-version '(magit-section . "2.12.0") :group 'magit-section :type '(alist :key-type (sexp :tag "Section type/lineage") :value-type (choice (const hide) @@ -163,7 +163,7 @@ Otherwise the value has to have one of these two forms: these ellipsis take section highlighting into account. Doing so might potentially have an impact on performance, while not doing so is kinda ugly." - :package-version '(magit . "3.0.0") + :package-version '(magit-section . "3.0.0") :group 'magit-section :type '(choice (const :tag "No indicators" nil) (cons :tag "Use +- fringe indicators" @@ -184,7 +184,9 @@ Otherwise the value has to have one of these two forms: (const :tag "Yes (potentially slow)" t) (const :tag "No (kinda ugly)" nil))))) -(defcustom magit-keep-region-overlay nil +(define-obsolete-variable-alias 'magit-keep-region-overlay + 'magit-section-keep-region-overlay "Magit-Section 3.4.0") +(defcustom magit-section-keep-region-overlay nil "Whether to keep the region overlay when there is a valid selection. By default Magit removes the regular region overlay if, and only @@ -227,7 +229,7 @@ visualized, but since it has been requested a few times and because it doesn't cost much to offer this option we do so. However that might change. If the existence of this option starts complicating other things, then it will be removed." - :package-version '(magit . "2.3.0") + :package-version '(magit-section . "2.3.0") :group 'magit-section :type 'boolean) @@ -240,7 +242,7 @@ to be displayed everywhere except in Magit buffers. Other users do not expect Magit buffers to be treated differently. At least in theory users in the first group should not use the global mode, but that ship has sailed, thus this option." - :package-version '(magit . "3.0.0") + :package-version '(magit-section . "3.0.0") :group 'magit-section :type 'boolean) @@ -318,7 +320,7 @@ but that ship has sailed, thus this option." (defvar magit-section-mode-map (let ((map (make-keymap))) (suppress-keymap map t) - (define-key map (kbd "C-i") 'magit-section-toggle) + (define-key map (kbd "TAB") 'magit-section-toggle) (define-key map [C-tab] 'magit-section-cycle) (define-key map [M-tab] 'magit-section-cycle) ;; [backtab] is the most portable binding for Shift+Tab. @@ -328,10 +330,10 @@ but that ship has sailed, thus this option." (define-key map (kbd "n") 'magit-section-forward) (define-key map (kbd "M-p") 'magit-section-backward-sibling) (define-key map (kbd "M-n") 'magit-section-forward-sibling) - (define-key map "1" 'magit-section-show-level-1) - (define-key map "2" 'magit-section-show-level-2) - (define-key map "3" 'magit-section-show-level-3) - (define-key map "4" 'magit-section-show-level-4) + (define-key map (kbd "1") 'magit-section-show-level-1) + (define-key map (kbd "2") 'magit-section-show-level-2) + (define-key map (kbd "3") 'magit-section-show-level-3) + (define-key map (kbd "4") 'magit-section-show-level-4) (define-key map (kbd "M-1") 'magit-section-show-level-1-all) (define-key map (kbd "M-2") 'magit-section-show-level-2-all) (define-key map (kbd "M-3") 'magit-section-show-level-3-all) @@ -357,8 +359,9 @@ Magit-Section is documented in info node `(magit-section)'." ;; (hack-dir-local-variables-non-file-buffer) (make-local-variable 'text-property-default-nonsticky) (push (cons 'keymap t) text-property-default-nonsticky) + (add-hook 'pre-command-hook #'magit-section-pre-command-hook nil t) (add-hook 'post-command-hook #'magit-section-update-highlight t t) - (add-hook 'deactivate-mark-hook #'magit-section-update-highlight t t) + (add-hook 'deactivate-mark-hook #'magit-section-deactivate-mark t t) (setq-local redisplay-highlight-region-function 'magit-section--highlight-region) (setq-local redisplay-unhighlight-region-function @@ -602,7 +605,7 @@ With a prefix argument also expand it." heading) (oset section content (point-marker)) (funcall washer) (oset section end (point-marker))))) - (magit-section-update-highlight))) + (magit-section-update-highlight t))) (defun magit-section-hide (section) "Hide the body of the current section." @@ -1240,13 +1243,26 @@ evaluated its BODY. Admittedly that's a bit of a hack." ;;; Highlight +(defvar-local magit-section-pre-command-region-p nil) +(defvar-local magit-section-pre-command-section nil) (defvar-local magit-section-highlight-overlays nil) -(defvar-local magit-section-highlighted-section nil) (defvar-local magit-section-highlighted-sections nil) (defvar-local magit-section-unhighlight-sections nil) -(defun magit-section-update-highlight () + +(defun magit-section-pre-command-hook () + (setq magit-section-pre-command-region-p (region-active-p)) + (setq magit-section-pre-command-section (magit-current-section))) + +(defun magit-section-deactivate-mark () + (magit-section-update-highlight t)) + +(defun magit-section-update-highlight (&optional force) (let ((section (magit-current-section))) - (unless (eq section magit-section-highlighted-section) + (when (or force + (cond ; `xor' wasn't added until 27.1. + ((not magit-section-pre-command-region-p) (region-active-p)) + ((not (region-active-p)) magit-section-pre-command-region-p)) + (not (eq magit-section-pre-command-section section))) (let ((inhibit-read-only t) (deactivate-mark nil) (selection (magit-region-sections))) @@ -1261,11 +1277,7 @@ evaluated its BODY. Admittedly that's a bit of a hack." (dolist (s magit-section-unhighlight-sections) (run-hook-with-args-until-success 'magit-section-unhighlight-hook s selection)) - (restore-buffer-modified-p nil) - (unless (eq magit-section-highlighted-section section) - (setq magit-section-highlighted-section - (and (not (oref section hidden)) - section))))) + (restore-buffer-modified-p nil))) (magit-section-maybe-paint-visibility-ellipses))) (defun magit-section-highlight (section selection) @@ -1316,7 +1328,7 @@ invisible." (defun magit-section-make-overlay (start end face) ;; Yes, this doesn't belong here. But the alternative of ;; spreading this hack across the code base is even worse. - (when (and magit-keep-region-overlay + (when (and magit-section-keep-region-overlay (memq face '(magit-section-heading-selection magit-diff-file-heading-selection magit-diff-hunk-heading-selection))) @@ -1371,7 +1383,7 @@ invisible." (defun magit-section--highlight-region (start end window rol) (magit-section--delete-region-overlays) - (if (and (not magit-keep-region-overlay) + (if (and (not magit-section-keep-region-overlay) (or (magit-region-sections) (run-hook-with-args-until-success 'magit-region-highlight-hook (magit-current-section))) @@ -1384,7 +1396,6 @@ invisible." start end window rol))) (defun magit-section--unhighlight-region (rol) - (setq magit-section-highlighted-section nil) (magit-section--delete-region-overlays) (funcall (default-value 'redisplay-unhighlight-region-function) rol)) diff --git a/elpa/magit-section-20210801.1004/magit-section.info b/elpa/magit-section-20220101.841/magit-section.info similarity index 96% rename from elpa/magit-section-20210801.1004/magit-section.info rename to elpa/magit-section-20220101.841/magit-section.info index b98a309e..e75d7ee5 100644 --- a/elpa/magit-section-20210801.1004/magit-section.info +++ b/elpa/magit-section-20220101.841/magit-section.info @@ -1,7 +1,7 @@ This is magit-section.info, produced by makeinfo version 6.7 from magit-section.texi. - Copyright (C) 2015-2021 Jonas Bernoulli + Copyright (C) 2015-2022 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -33,9 +33,9 @@ packages that have nothing to do with Magit or Git. and user options see *note (magit)Sections::. This manual documents how you can use sections in your own packages. -This manual is for Magit-Section version 3.2.0. +This manual is for Magit-Section version v3.3.0-73-g03f495f35+1. - Copyright (C) 2015-2021 Jonas Bernoulli + Copyright (C) 2015-2022 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -79,9 +79,8 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev 2 Creating Sections ******************* - -- Function: magit-insert-section [name] (type &optional value hide) - &rest body - + -- Macro: magit-insert-section [name] (type &optional value hide) &rest + body Create a section object of type CLASS, storing VALUE in its ‘value’ slot, and insert the section at point. CLASS is a subclass of ‘magit-section’ or has the form ‘(eval FORM)’, in which case FORM @@ -121,7 +120,6 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev anything this time around. -- Function: magit-insert-heading &rest args - Insert the heading for the section currently being inserted. This function should only be used inside ‘magit-insert-section’. @@ -150,19 +148,16 @@ File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev newline character if necessary. -- Macro: magit-insert-section-body &rest body - Use BODY to insert the section body, once the section is expanded. If the section is expanded when it is created, then this is like ‘progn’. Otherwise BODY isn’t evaluated until the section is explicitly expanded. -- Function: magit-cancel-section - Cancel inserting the section that is currently being inserted. Remove all traces of that section. -- Function: magit-wash-sequence function - Repeatedly call FUNCTION until it returns ‘nil’ or the end of the buffer is reached. FUNCTION has to move point forward or return ‘nil’. @@ -174,16 +169,13 @@ File: magit-section.info, Node: Core Functions, Next: Matching Functions, Pre **************** -- Function: magit-current-section - Return the section at point. -- Function: magit-section-ident section - Return an unique identifier for SECTION. The return value has the form ‘((TYPE . VALUE)...)’. -- Function: magit-section-ident-value value - Return a constant representation of VALUE. VALUE is the value of a ‘magit-section’ object. If that is an @@ -194,14 +186,12 @@ File: magit-section.info, Node: Core Functions, Next: Matching Functions, Pre method is used, which just returns the argument itself. -- 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, then search in that section tree instead of in the one whose root ‘magit-root-section’ is. -- Function: magit-section-lineage section - Return the lineage of SECTION. The return value has the form ‘(TYPE...)’. @@ -213,7 +203,6 @@ 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. SECTION defaults to the section at point. If SECTION is not @@ -222,14 +211,12 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: CONDITION can take the following forms: • ‘(CONDITION...)’ matches if any of the CONDITIONs matches. - • ‘[CLASS...]’ matches if the section’s class is the same as the first CLASS or a subclass of that; the section’s parent class matches the second CLASS; and so on. • ‘[* CLASS...]’ matches sections that match [CLASS...] and also recursively all their child sections. - • ‘CLASS’ matches if the section’s class is the same as CLASS or a subclass of that; regardless of the classes of the parent sections. @@ -247,7 +234,6 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: course you want to be that precise. -- 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 @@ -257,7 +243,6 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: See ‘magit-section-match’ for the forms CONDITION can take. -- Macro: magit-section-case &rest clauses - Choose among clauses on the type of the section at point. Each clause looks like ‘(CONDITION BODY...)’. The type of the @@ -276,10 +261,10 @@ File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up:  Tag Table: Node: Top788 -Node: Introduction2069 -Node: Creating Sections2839 -Node: Core Functions7356 -Node: Matching Functions8682 +Node: Introduction2086 +Node: Creating Sections2856 +Node: Core Functions7365 +Node: Matching Functions8686  End Tag Table -- 2.47.3