diff -Nru magit-3.2.1/debian/changelog magit-3.3.0/debian/changelog --- magit-3.2.1/debian/changelog 2021-08-26 21:07:37.000000000 +0000 +++ magit-3.3.0/debian/changelog 2021-10-06 12:58:32.000000000 +0000 @@ -1,3 +1,9 @@ +magit (3.3.0-1) unstable; urgency=medium + + * New upstream version + + -- Rémi Vanicat Wed, 06 Oct 2021 14:58:32 +0200 + magit (3.2.1-2) unstable; urgency=medium * Team upload. diff -Nru magit-3.2.1/debian/.gitignore magit-3.3.0/debian/.gitignore --- magit-3.2.1/debian/.gitignore 2021-08-26 21:07:37.000000000 +0000 +++ magit-3.3.0/debian/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -/*.debhelper -/*.debhelper.log -/*.substvars -/files -/magit/ diff -Nru magit-3.2.1/debian/patches/0003-Remove-magit-version.el-from-autogenerated-files.patch magit-3.3.0/debian/patches/0003-Remove-magit-version.el-from-autogenerated-files.patch --- magit-3.2.1/debian/patches/0003-Remove-magit-version.el-from-autogenerated-files.patch 2021-08-26 21:07:37.000000000 +0000 +++ magit-3.3.0/debian/patches/0003-Remove-magit-version.el-from-autogenerated-files.patch 2021-10-06 12:58:32.000000000 +0000 @@ -9,10 +9,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.mk b/default.mk -index 8c93fd0..5d1e257 100644 +index 5118c69..48d30a9 100644 --- a/default.mk +++ b/default.mk -@@ -98,7 +98,7 @@ ELS += magit-imenu.el +@@ -99,7 +99,7 @@ ELS += magit-imenu.el ELS += magit-bookmark.el ELCS = $(ELS:.el=.elc) ELMS = magit.el $(filter-out $(addsuffix .el,$(PACKAGES)),$(ELS)) diff -Nru magit-3.2.1/debian/patches/0004-Signal-in-the-documentation-there-are-Debian-patches.patch magit-3.3.0/debian/patches/0004-Signal-in-the-documentation-there-are-Debian-patches.patch --- magit-3.2.1/debian/patches/0004-Signal-in-the-documentation-there-are-Debian-patches.patch 2021-08-26 21:07:37.000000000 +0000 +++ magit-3.3.0/debian/patches/0004-Signal-in-the-documentation-there-are-Debian-patches.patch 2021-10-06 12:58:32.000000000 +0000 @@ -1,45 +1,45 @@ From: =?utf-8?q?R=C3=A9mi_Vanicat?= Date: Thu, 19 Aug 2021 22:29:23 +0200 Subject: Signal in the documentation there are Debian patches. -Reviewed-by: Matteo F. Vescovi +Reviewed-by: Matteo F. Vescovi --- Documentation/magit.org | 4 ++-- Documentation/magit.texi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/magit.org b/Documentation/magit.org -index ae5ad975..8e0295ec 100644 +index b40ecb7..e559a4c 100644 --- a/Documentation/magit.org +++ b/Documentation/magit.org @@ -8,7 +8,7 @@ #+TEXINFO_DIR_CATEGORY: Emacs #+TEXINFO_DIR_TITLE: Magit: (magit). #+TEXINFO_DIR_DESC: Using Git from Emacs with Magit. --#+SUBTITLE: for version 3.2.1 -+#+SUBTITLE: for version 3.2.1 (with Debian patches) +-#+SUBTITLE: for version 3.3.0 ++#+SUBTITLE: for version 3.3.0 (with Debian patches) #+TEXINFO_DEFFN: t #+OPTIONS: H:4 num:3 toc:2 -@@ -25,7 +25,7 @@ directly from within Emacs. While many fine Git clients exist, only +@@ -25,7 +25,7 @@ Magit and Git itself deserve to be called porcelains. #+TEXINFO: @noindent --This manual is for Magit version 3.2.1. -+This manual is for Magit version 3.2.1 (with Debian patches). +-This manual is for Magit version 3.3.0. ++This manual is for Magit version 3.3.0 (with Debian patches). #+BEGIN_QUOTE Copyright (C) 2015-2021 Jonas Bernoulli diff --git a/Documentation/magit.texi b/Documentation/magit.texi -index 699913ad..724d6f75 100644 +index 378956c..2df7952 100644 --- a/Documentation/magit.texi +++ b/Documentation/magit.texi @@ -31,7 +31,7 @@ General Public License for more details. @finalout @titlepage @title Magit User Manual --@subtitle for version 3.2.1 -+@subtitle for version 3.2.1 (with Debian patches) +-@subtitle for version 3.3.0 ++@subtitle for version 3.3.0 (with Debian patches) @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -47,8 +47,8 @@ Magit and Git itself deserve to be called porcelains. @noindent --This manual is for Magit version 3.2.1. -+This manual is for Magit version 3.2.1 (with Debian patches). +-This manual is for Magit version 3.3.0. ++This manual is for Magit version 3.3.0 (with Debian patches). @quotation Copyright (C) 2015-2021 Jonas Bernoulli diff -Nru magit-3.2.1/default.mk magit-3.3.0/default.mk --- magit-3.2.1/default.mk 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/default.mk 2021-10-06 12:51:17.000000000 +0000 @@ -92,6 +92,7 @@ ELS += magit-subtree.el ELS += magit-ediff.el ELS += magit-gitignore.el +ELS += magit-bundle.el ELS += magit-extras.el ELS += git-rebase.el ELS += magit-imenu.el @@ -105,24 +106,25 @@ VERSION ?= $(shell \ test -e $(TOP).git && \ git describe --tags --abbrev=0 --always | cut -c2-) +TIMESTAMP = 20211004 -DASH_VERSION = 2.18.1 +DASH_VERSION = 2.19.1 GIT_COMMIT_VERSION = $(VERSION) LIBGIT_VERSION = 0 MAGIT_VERSION = $(VERSION) MAGIT_LIBGIT_VERSION = $(VERSION) MAGIT_SECTION_VERSION = $(VERSION) TRANSIENT_VERSION = 0.3.6 -WITH_EDITOR_VERSION = 3.0.4 +WITH_EDITOR_VERSION = 3.0.5 -DASH_MELPA_SNAPSHOT = 20210330 -GIT_COMMIT_MELPA_SNAPSHOT = 20210806 +DASH_MELPA_SNAPSHOT = 20210826 +GIT_COMMIT_MELPA_SNAPSHOT = $(TIMESTAMP) LIBGIT_MELPA_SNAPSHOT = 0 -MAGIT_MELPA_SNAPSHOT = 20210806 -MAGIT_LIBGIT_MELPA_SNAPSHOT = 20210806 -MAGIT_SECTION_MELPA_SNAPSHOT = 20210806 -TRANSIENT_MELPA_SNAPSHOT = 20210701 -WITH_EDITOR_MELPA_SNAPSHOT = 20210524 +MAGIT_MELPA_SNAPSHOT = $(TIMESTAMP) +MAGIT_LIBGIT_MELPA_SNAPSHOT = $(TIMESTAMP) +MAGIT_SECTION_MELPA_SNAPSHOT = $(TIMESTAMP) +TRANSIENT_MELPA_SNAPSHOT = 20210920 +WITH_EDITOR_MELPA_SNAPSHOT = 20211001 EMACS_VERSION = 25.1 LIBGIT_EMACS_VERSION = 26.1 diff -Nru magit-3.2.1/Documentation/AUTHORS.md magit-3.3.0/Documentation/AUTHORS.md --- magit-3.2.1/Documentation/AUTHORS.md 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/AUTHORS.md 2021-10-06 12:51:17.000000000 +0000 @@ -116,6 +116,7 @@ - Daniel Kraus - Daniel Mai - Daniel Martín +- Daniel Nagy - Dan LaManna - Danny Zhu - Dato Simó @@ -143,6 +144,7 @@ - Felix Yan - Feng Li - Florian Ragwitz +- Franklin Delehelle - Fritz Grabo - Fritz Stelzer - Geoff Shannon @@ -183,6 +185,7 @@ - Jonathan del Strother - Jonathan Leech-Pepin - Jonathan Roes +- Jonathon McKitrick - Jon Vanderwijk - Jordan Galby - Jordan Greenberg @@ -210,6 +213,7 @@ - Leonardo Etcheverry - Leo Vivier - Lingchao Xin +- Lin Sun - Li-Yun Chang - Lluís Vilanova - Loic Dachary diff -Nru magit-3.2.1/Documentation/magit.org magit-3.3.0/Documentation/magit.org --- magit-3.2.1/Documentation/magit.org 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/magit.org 2021-10-06 12:51:17.000000000 +0000 @@ -8,7 +8,7 @@ #+TEXINFO_DIR_CATEGORY: Emacs #+TEXINFO_DIR_TITLE: Magit: (magit). #+TEXINFO_DIR_DESC: Using Git from Emacs with Magit. -#+SUBTITLE: for version 3.2.1 +#+SUBTITLE: for version 3.3.0 #+TEXINFO_DEFFN: t #+OPTIONS: H:4 num:3 toc:2 @@ -25,7 +25,7 @@ Magit and Git itself deserve to be called porcelains. #+TEXINFO: @noindent -This manual is for Magit version 3.2.1. +This manual is for Magit version 3.3.0. #+BEGIN_QUOTE Copyright (C) 2015-2021 Jonas Bernoulli @@ -120,7 +120,7 @@ commands are implemented on top of Git plumbing commands. * Installation -** _ :ignore: +** _ Magit can be installed using Emacs' package manager or manually from its development repository. @@ -379,7 +379,7 @@ * Interface Concepts ** Modes and Buffers -*** _ :ignore: +*** _ Magit provides several major-modes. For each of these modes there usually exists only one buffer per repository. Separate modes and @@ -873,7 +873,7 @@ (because it isn't modified). ** Sections -*** _ :ignore: +*** _ Magit buffers are organized into nested sections, which can be collapsed and expanded, similar to how sections are handled in Org @@ -1215,10 +1215,16 @@ Users usually do not have to worry about a section's type and value, but knowing them can be handy at times. -- Key: M-x magit-describe-section-briefly, magit-describe-section-briefly +- Key: H, magit-describe-section + + This command shows information about the section at point in a + separate buffer. + +- Command: magit-describe-section-briefly - Show information about the section at point in the echo area, as - "#". + 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 @@ -1364,7 +1370,7 @@ #+TEXINFO: @noindent 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. Setting or saving the value for one @@ -1373,7 +1379,7 @@ - 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. + 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 buffer used by the diff @@ -1810,11 +1816,34 @@ 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. + + This is only intended for debugging purposes. Do not enable this + permanently, that would negatively affect performance. + +- Variable: magit-process-extreme-logging - 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 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. *** Git Process Status @@ -1857,6 +1886,7 @@ The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command. +- Key: :, magit-git-command - Key: ! p, magit-git-command This command reads a command from the user and executes it in @@ -1932,7 +1962,8 @@ - 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 @@ -1977,7 +2008,7 @@ used every time Magit runs Git for any purpose. * Inspecting -** _ :ignore: +** _ The functionality provided by Magit can be roughly divided into three groups: inspecting existing data, manipulating existing data or adding @@ -1996,7 +2027,7 @@ described later. ** Status Buffer -*** _ :ignore: +*** _ While other Magit buffers contain e.g. one particular diff or one particular log, the status buffer contains the diffs for staged and @@ -2065,6 +2096,34 @@ ~magit-list-repositories~. It also affects ~magit-status~ (which see) in potentially surprising ways (see above). +- 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: + + #+BEGIN_SRC emacs-lisp + (global-set-key (kbd "C-x g") 'magit-status-quick). + #+END_SRC + + 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 @@ -2511,7 +2570,7 @@ but not its push branch. ** Logging -*** _ :ignore: +*** _ The status buffer contains logs for the unpushed and unpulled commits, but that obviously isn't enough. The transient prefix command @@ -2918,7 +2977,7 @@ is shown, then this specifies how much space is used to do so. ** Diffing -*** _ :ignore: +*** _ The status buffer contains diffs for the staged and unstaged commits, but that obviously isn't enough. The transient prefix command @@ -3439,7 +3498,7 @@ that were created using a Magit command. ** References Buffer -*** _ :ignore: +*** _ - Key: y, magit-show-refs @@ -3472,6 +3531,10 @@ This command lists branches and tags in a dedicated buffer. Each reference is being compared with a branch read from the user. +- Key: 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. @@ -4036,7 +4099,7 @@ * Manipulating ** Creating Repository -- Key: M-x magit-init, magit-init +- Key: I, magit-init This command initializes a repository and then shows the status buffer for the new repository. @@ -4168,7 +4231,7 @@ including the name of the owner. ** Staging and Unstaging -*** _ :ignore: +*** _ Like Git, Magit can of course stage and unstage complete files. Unlike Git, it also allows users to gracefully un-/stage @@ -4314,6 +4377,10 @@ Remove the change at point from the working tree. + 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. + - Key: v, magit-reverse Reverse the change at point in the working tree. @@ -4325,7 +4392,7 @@ appropriate (i.e. when ~git apply~ is used internally). ** Committing -*** _ :ignore: +*** _ When the user initiates a commit, Magit calls ~git commit~ without any arguments, so Git has to get it from the user. It creates the file @@ -4442,6 +4509,33 @@ 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 https://github.com/magit/magit/issues/4132. + *** Editing Commit Messages After initiating a commit as described in the previous section, two new @@ -5416,6 +5510,13 @@ 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 buffer. @@ -5429,7 +5530,7 @@ truly complex conflicts, the latter is usually overkill. ** Rebasing -*** _ :ignore: +*** _ Also see [[man:git-rebase]] For information on how to resolve conflicts that occur during rebases see the preceding section. @@ -5859,7 +5960,7 @@ answer the question "Do these commits make the same change?". ** Cherry Picking -*** _ :ignore: +*** _ Also see [[man:git-cherry-pick]] @@ -6711,7 +6812,7 @@ ~refs/notes/~ namespace (or ~**~ if some names contain slashes). ** Submodules -*** _ :ignore: +*** _ Also see [[man:git-submodule]] @@ -6868,29 +6969,29 @@ Also see [[man:git-worktree]] -- Key: %, magit-worktree +- Key: Z, magit-worktree This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. -- Key: % b, magit-worktree-checkout +- Key: Z b, magit-worktree-checkout Checkout BRANCH in a new worktree at PATH. -- Key: % c, magit-worktree-branch +- Key: Z c, magit-worktree-branch Create a new BRANCH and check it out in a new worktree at PATH. -- Key: % m, magit-worktree-move +- Key: Z m, magit-worktree-move Move an existing worktree to a new PATH. -- Key: % k, magit-worktree-delete +- Key: Z k, magit-worktree-delete Delete a worktree, defaulting to the worktree at point. The primary worktree cannot be deleted. -- Key: % g, magit-worktree-status +- Key: Z g, magit-worktree-status Show the status for the worktree at point. @@ -6898,8 +6999,30 @@ If the worktree at point is the one whose status is already being displayed in the current buffer, then show it in Dired instead. +** Bundle + +Also see [[man: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. + ** 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. @@ -6941,7 +7064,7 @@ behave like ~kill-ring-save~ instead of as described above. ** Wip Modes -*** _ :ignore: +*** _ Git keeps *committed* changes around long enough for users to recover changes they have accidentally deleted. It does so by not garbage @@ -7336,7 +7459,7 @@ Kill the current buffer. * Customizing -** _ :ignore: +** _ 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 @@ -7435,7 +7558,7 @@ #+END_SRC ** Essential Settings -*** _ :ignore: +*** _ The next two sections list and discuss several variables that many users might want to customize, for safety and/or performance reasons. @@ -7474,7 +7597,7 @@ Automatically]]. *** Performance -**** _ :ignore: +**** _ After Magit has run ~git~ for side-effects, it also refreshes the current Magit buffer and the respective status buffer. This is @@ -7731,7 +7854,7 @@ Binding Conventions]]. * Plumbing -** _ :ignore: +** _ The following sections describe how to use several of Magit's core abstractions to extend Magit itself or implement a separate extension. @@ -7746,7 +7869,7 @@ https://github.com/magit/magit/wiki/Plugin-Dispatch-Key-Registry. ** Calling Git -*** _ :ignore: +*** _ Magit provides many specialized functions for calling Git. All of these functions are defined in either ~magit-git.el~ or ~magit-process.el~ @@ -8316,7 +8439,7 @@ of this variable and then calling this ~magit-refresh-function~. ** Conventions -*** _ :ignore: +*** _ Also see [[*Completion and Confirmation]]. @@ -8462,7 +8585,7 @@ :PROPERTIES: :APPENDIX: t :END: -** _ :ignore: +** _ The next two nodes lists frequently asked questions. For a list of frequently *and recently* asked questions, i.e. questions that haven't @@ -8870,7 +8993,7 @@ :INDEX: vr :END: -* _ Copying +* Copying :PROPERTIES: :COPYING: t :END: @@ -8889,8 +9012,6 @@ General Public License for more details. #+END_QUOTE -* _ :ignore: - # LocalWords: ARG ARGS CONDITIONs ChangeLog DNS Dired Ediff Ediffing # LocalWords: Elpa Emacsclient FUNC Flyspell Git Git's Gitk HOOK's # LocalWords: IDENT Ido Junio LocalWords Magit Magit's Magitian Magitians @@ -8916,9 +9037,8 @@ # eval: (require 'magit-utils nil t) # eval: (require 'org-man nil t) # eval: (require 'ol-man nil t) -# eval: (require 'ox-extra nil t) # eval: (require 'ox-texinfo+ nil t) -# eval: (and (featurep 'ox-extra) (ox-extras-activate '(ignore-headlines))) +# org-texinfo+-dissolve-noexport-headlines: t # indent-tabs-mode: nil # org-src-preserve-indentation: nil # End: diff -Nru magit-3.2.1/Documentation/magit-section.org magit-3.3.0/Documentation/magit-section.org --- magit-3.2.1/Documentation/magit-section.org 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/magit-section.org 2021-10-06 12:51:17.000000000 +0000 @@ -8,7 +8,7 @@ #+TEXINFO_DIR_CATEGORY: Emacs #+TEXINFO_DIR_TITLE: Magit-Section: (magit-section). #+TEXINFO_DIR_DESC: Use Magit sections in your own packages. -#+SUBTITLE: for version 3.2.1 +#+SUBTITLE: for version 3.3.0 #+TEXINFO_DEFFN: t #+OPTIONS: H:4 num:3 toc:2 @@ -26,7 +26,7 @@ can use sections in your own packages. #+TEXINFO: @noindent -This manual is for Magit-Section version 3.2.1. +This manual is for Magit-Section version 3.3.0. #+BEGIN_QUOTE Copyright (C) 2015-2021 Jonas Bernoulli @@ -60,7 +60,7 @@ * 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 @@ -268,8 +268,6 @@ General Public License for more details. #+END_QUOTE -* _ :ignore: - # LocalWords: ARGS CONDITIONs EVAL Git Git's IDENT # LocalWords: LocalWords MERCHANTABILITY Magit Makefile # LocalWords: alist eval featurep ident keymap magit ol @@ -280,9 +278,8 @@ # eval: (require 'magit-utils nil t) # eval: (require 'org-man nil t) # eval: (require 'ol-man nil t) -# eval: (require 'ox-extra nil t) # eval: (require 'ox-texinfo+ nil t) -# eval: (and (featurep 'ox-extra) (ox-extras-activate '(ignore-headlines))) +# org-texinfo+-dissolve-noexport-headlines: t # indent-tabs-mode: nil # org-src-preserve-indentation: nil # End: diff -Nru magit-3.2.1/Documentation/magit-section.texi magit-3.3.0/Documentation/magit-section.texi --- magit-3.2.1/Documentation/magit-section.texi 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/magit-section.texi 2021-10-06 12:51:17.000000000 +0000 @@ -31,7 +31,7 @@ @finalout @titlepage @title Magit-Section Developer Manual -@subtitle for version 3.2.1 +@subtitle for version 3.3.0 @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -54,7 +54,7 @@ can use sections in your own packages. @noindent -This manual is for Magit-Section version 3.2.1. +This manual is for Magit-Section version 3.3.0. @quotation Copyright (C) 2015-2021 Jonas Bernoulli @@ -98,7 +98,7 @@ @node Creating Sections @chapter Creating Sections -@defun magit-insert-section [name] (type &optional value hide) &rest body +@defmac magit-insert-section [name] (type &optional value hide) &rest body Create a section object of type CLASS, storing VALUE in its @code{value} slot, and insert the section at point. CLASS is a @@ -141,7 +141,7 @@ 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. -@end defun +@end defmac @defun magit-insert-heading &rest args diff -Nru magit-3.2.1/Documentation/magit.texi magit-3.3.0/Documentation/magit.texi --- magit-3.2.1/Documentation/magit.texi 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/magit.texi 2021-10-06 12:51:17.000000000 +0000 @@ -31,7 +31,7 @@ @finalout @titlepage @title Magit User Manual -@subtitle for version 3.2.1 +@subtitle for version 3.3.0 @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -53,7 +53,7 @@ Magit and Git itself deserve to be called porcelains. @noindent -This manual is for Magit version 3.2.1. +This manual is for Magit version 3.3.0. @quotation Copyright (C) 2015-2021 Jonas Bernoulli @@ -261,6 +261,7 @@ * Submodules:: * Subtree:: * Worktree:: +* Bundle:: * Common Commands:: * Wip Modes:: * Commands for Buffers Visiting Files:: @@ -1718,14 +1719,23 @@ but knowing them can be handy at times. @table @asis -@kindex M-x magit-describe-section-briefly -@cindex magit-describe-section-briefly -@item @kbd{M-x magit-describe-section-briefly} @tie{}@tie{}@tie{}@tie{}(@code{magit-describe-section-briefly}) +@kindex H +@cindex magit-describe-section +@item @kbd{H} @tie{}@tie{}@tie{}@tie{}(@code{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 -"#". @end table +@cindex magit-describe-section-briefly +@deffn Command magit-describe-section-briefly + +This command shows information about the section at point in the +echo area, as @code{#}. +@end deffn + 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 only one of the reasons why the same key may do something different, @@ -1891,7 +1901,7 @@ @itemize @item -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 @code{magit-diff-mode}, @code{magit-revision-mode}, @code{magit-merge-preview-mode} and @code{magit-status-mode} buffers. Setting or saving the value for one @@ -1902,7 +1912,7 @@ @item When @code{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. +buffer or the mode's global diff arguments. @item @@ -2475,12 +2485,36 @@ @end table -@defopt magit-git-debug +@defvar magit-git-debug -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. -@end defopt +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 @code{$}. + +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. + +This is only intended for debugging purposes. Do not enable this +permanently, that would negatively affect performance. +@end defvar + +@defvar magit-process-extreme-logging + +This option controls whether @code{magit-process-file} logs to the +@code{*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. +@end defvar @node Git Process Status @subsection Git Process Status @@ -2530,6 +2564,9 @@ The string "git " is used as initial input when prompting the user for the command. It can be removed to run another command. +@kindex : +@cindex magit-git-command +@item @kbd{:} @tie{}@tie{}@tie{}@tie{}(@code{magit-git-command}) @kindex ! p @cindex magit-git-command @item @kbd{! p} @tie{}@tie{}@tie{}@tie{}(@code{magit-git-command}) @@ -2626,7 +2663,8 @@ @defopt magit-remote-git-executable The @code{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 +@code{tramp-remote-path} instead of this option. @end defopt If Emacs is unable to find the correct executable, then you can @@ -2809,6 +2847,36 @@ in potentially surprising ways (see above). @end defopt +@cindex magit-status-quick +@deffn Command magit-status-quick + +This command is an alternative to @code{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 @code{magit-status}, +and additionally cause the buffer to be refresh. + +To use this command add this to your init file: + +@lisp +(global-set-key (kbd "C-x g") 'magit-status-quick). +@end lisp + +If you do that and then for once want to redisplay the buffer and +also immediately refresh it, then type @code{C-x g} followed by @code{g}. + +A possible alternative command is @code{magit-display-repository-buffer}. +It supports displaying any existing Magit buffer that belongs to the +current repository; not just the status buffer. +@end deffn + @cindex ido-enter-magit-status @deffn Command ido-enter-magit-status @@ -4699,6 +4767,12 @@ This command lists branches and tags in a dedicated buffer. Each reference is being compared with a branch read from the user. +@kindex y r +@cindex magit-refs-set-show-commit-count +@item @kbd{y r} @tie{}@tie{}@tie{}@tie{}(@code{magit-refs-set-show-commit-count}) + +This command changes for which refs the commit count is shown. + @end table @defopt magit-refs-show-commit-count @@ -5494,9 +5568,9 @@ @section Creating Repository @table @asis -@kindex M-x magit-init +@kindex I @cindex magit-init -@item @kbd{M-x magit-init} @tie{}@tie{}@tie{}@tie{}(@code{magit-init}) +@item @kbd{I} @tie{}@tie{}@tie{}@tie{}(@code{magit-init}) This command initializes a repository and then shows the status buffer for the new repository. @@ -5872,6 +5946,10 @@ Remove the change at point from the working tree. +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. + @kindex v @cindex magit-reverse @item @kbd{v} @tie{}@tie{}@tie{}@tie{}(@code{magit-reverse}) @@ -6049,6 +6127,34 @@ Also see @code{git-commit-post-finish-hook}. @end defopt +@defopt 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 @uref{https://github.com/magit/magit/issues/4132}. +@end defopt + @node Editing Commit Messages @subsection Editing Commit Messages @@ -7275,6 +7381,13 @@ 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 @code{k} (@code{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 @code{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 @code{e} while point is on such a file in the status buffer. @@ -8979,6 +9092,7 @@ * Submodules:: * Subtree:: * Worktree:: +* Bundle:: * Common Commands:: * Wip Modes:: * Commands for Buffers Visiting Files:: @@ -9404,41 +9518,41 @@ @end iftex @table @asis -@kindex % +@kindex Z @cindex magit-worktree -@item @kbd{%} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree}) +@item @kbd{Z} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree}) This transient prefix command binds the following suffix commands and displays them in a temporary buffer until a suffix is invoked. -@kindex % b +@kindex Z b @cindex magit-worktree-checkout -@item @kbd{% b} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-checkout}) +@item @kbd{Z b} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-checkout}) Checkout BRANCH in a new worktree at PATH@. -@kindex % c +@kindex Z c @cindex magit-worktree-branch -@item @kbd{% c} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-branch}) +@item @kbd{Z c} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-branch}) Create a new BRANCH and check it out in a new worktree at PATH@. -@kindex % m +@kindex Z m @cindex magit-worktree-move -@item @kbd{% m} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-move}) +@item @kbd{Z m} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-move}) Move an existing worktree to a new PATH@. -@kindex % k +@kindex Z k @cindex magit-worktree-delete -@item @kbd{% k} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-delete}) +@item @kbd{Z k} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-delete}) Delete a worktree, defaulting to the worktree at point. The primary worktree cannot be deleted. -@kindex % g +@kindex Z g @cindex magit-worktree-status -@item @kbd{% g} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-status}) +@item @kbd{Z g} @tie{}@tie{}@tie{}@tie{}(@code{magit-worktree-status}) Show the status for the worktree at point. @@ -9447,9 +9561,53 @@ displayed in the current buffer, then show it in Dired instead. @end table +@node Bundle +@section Bundle + +Also see +@ifinfo +@ref{git-bundle,,,gitman,}. +@end ifinfo +@ifhtml +@html +the git-bundle(1) manpage. +@end html +@end ifhtml +@iftex +the git-bundle(1) manpage. +@end iftex + +@cindex magit-bundle +@deffn Command magit-bundle + +This transient prefix command binds several suffix commands for +running @code{git bundle} subcommands and displays them in a temporary +buffer until a suffix is invoked. +@end deffn + @node Common Commands @section Common Commands +@cindex magit-switch-to-repository-buffer +@deffn Command magit-switch-to-repository-buffer +@end deffn +@cindex magit-switch-to-repository-buffer-other-window +@deffn Command magit-switch-to-repository-buffer-other-window +@end deffn +@cindex magit-switch-to-repository-buffer-other-frame +@deffn Command magit-switch-to-repository-buffer-other-frame +@end deffn +@cindex magit-display-repository-buffer +@deffn 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 @code{magit-display-buffer} to do so and thus +respects @code{magit-display-buffer-function}. +@end deffn + These are some of the commands that can be used in all buffers whose major-modes derive from @code{magit-mode}. There are other common commands beside the ones below, but these didn't fit well anywhere else. diff -Nru magit-3.2.1/Documentation/Makefile magit-3.3.0/Documentation/Makefile --- magit-3.2.1/Documentation/Makefile 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/Makefile 2021-10-06 12:51:17.000000000 +0000 @@ -83,10 +83,9 @@ ## Release management ################################################ -ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) -ORG_ARGS += -l magit-utils.el -l ox-extra -l ox-texinfo+.el +ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) -l magit-utils.el -l ox-texinfo+.el ORG_ARGS += --eval "(or (require 'org-man nil t) (require 'ol-man))" -ORG_EVAL = --eval "(ox-extras-activate '(ignore-headlines))" +ORG_EVAL = --eval "(setq org-texinfo+-dissolve-noexport-headlines t)" ORG_EVAL += --eval "(setq indent-tabs-mode nil)" ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)" ORG_EVAL += --funcall org-texinfo-export-to-texinfo diff -Nru magit-3.2.1/Documentation/RelNotes/3.2.1.org magit-3.3.0/Documentation/RelNotes/3.2.1.org --- magit-3.2.1/Documentation/RelNotes/3.2.1.org 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/RelNotes/3.2.1.org 2021-10-06 12:51:17.000000000 +0000 @@ -21,7 +21,7 @@ This is the first release that is available from NonGNU Elpa. It is identical to version 3.2.0 except for dependency metadata, which had -to be changed so that this package could be release on NonGNU Elpa. +to be changed so that this package could be released on NonGNU Elpa. Also see https://emacsair.me/2021/08/06/nongnu-elpa and https://elpa.nongnu.org/nongnu/magit.html. diff -Nru magit-3.2.1/Documentation/RelNotes/3.3.0.org magit-3.3.0/Documentation/RelNotes/3.3.0.org --- magit-3.2.1/Documentation/RelNotes/3.3.0.org 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/Documentation/RelNotes/3.3.0.org 2021-10-06 12:51:17.000000000 +0000 @@ -1,4 +1,152 @@ -* Magit v3.3.0 Release Notes (unreleased) +* It's Magit! A Git Porcelain inside Emacs + +Magit is a text-based Git user interface that puts an unmatched focus +on streamlining workflows. Commands are invoked using short mnemonic +key sequences that take the cursor’s position in the highly actionable +interface into account to provide context-sensitive behavior. + +With Magit you can do nearly everything that you can do when using Git +on the command-line, but at greater speed and while taking advantage +of advanced features that previously seemed too daunting to use on a +daily basis. Many users will find that by using Magit they can become +more effective Git user. + +For more information about Magit, see https://magit.vc. + +* Magit v3.3.0 Release Notes + +Released 4th October 2021 by Jonas Bernoulli. + +I am pleased to announce the release of Magit version 3.3.0, +representing 88 commits by 6 contributors over two month. + +Also see https://emacsair.me/2021/10/04/magit-3.3. + ** Breaking changes + +- The last remaining alphabetic keys (both lower- and uppercase) are + now bound in ~magit-mode-map~. ~H~ to ~magit-describe-section~, ~j~ to the + new ~magit-status-quick~ (or ~magit-status-jump~ in status buffers), ~J~ + to the new ~magit-display-repository-buffer~, ~Q~ to ~magit-git-command~ + and ~Z~ to ~magit-worktree~, and once Forge is loaded, then ~N~ to + ~forge-dispatch~. (~Z~ used to be bound to ~magit-stash~, which now is + only available on ~z~.) #4259, 9bec1c54a, e401bd4d3 + +- ~I~ is now bound to ~magit-init~ instead of ~magit-gitignore~, which + continues to be available on ~i~. Users of the ~magit-imerge~ package + (which previously bound ~i~) should consult its library header for a + suggestion on how to resolve the resulting conflict. b54b537db + ** Changes since v3.2.0 + +- No longer automatically add ~--full-history~ when showing a log for a + single file that isn't being tracked anymore. #4381 + +- ~magit-stash-both~ now asks before discarding merge state. #4345 + +- Several infix arguments, which previously could only be disabled + or have a numeric value, can now also be enabled without having + an explicit numeric value. #4379 + +- Added ~-Xignore-space-change~ and ~-Xignore-all-space~ to ~magit-merge~. + Like most newly added expert arguments they have to be explicitly + [[https://magit.vc/manual/transient/Enabling-and-Disabling-Suffixes.html][revealed]]. #4387 + +- Added new command ~magit-status-quick~, which shows the status buffer + but avoids refreshing it for performance reasons. #4259 + +- Added new commands ~magit-display-repository-buffer~ (bound to ~j~ in + Magit buffers) and ~magit-switch-to-repository-buffer~ (bound to ~J~) + and variants for switching to any existing Magit buffer belonging + to the current repository. #4259 + +- Added new command ~magit-dired-am-apply-patches~ for use in Dired. + #4094. + +- Rearranged ~magit-patch~ and added a binding for ~magit-am~. 8ec3a1a21, + 8cadf302b + +- Added new command ~magit-help~ (bound to ~h~ in ~magit-dispatch~), which + simply shows Magit's Info manual. 5bba62629 + +- When listing entries for Imenu, then remove entry counts from group + titles for the benefit of third-party packages that need stable + titles. #4477 + +- Include Forge's ~pullreq~ and ~issue~ sections when listing entries for + Imenu. f4016f734 + +- Bound ~imenu~ in the ~magit-status-jump~ prefix. 678df30c3 + +- Added new transient prefix command ~magit-bundle~, which provides + support for ~git bundle~. #4392 + +- When minibuffer completion allows for a branch or a commit to be + selected and the former is preferred and thus offered as default + then, if possible, offer the commit at point as the first choice + initially accessible with ~next-history-element~. #4291 + +- Bound ~magit-refs-set-show-commit-count~ in the ~magit-show-refs~ + prefix. 2fe42f63d + +- Added new option ~magit-commit-diff-inhibit-same-window~. #4132 + +- Added support for invoking Smerge's "keep" commands when point is on + a hunk in a Magit buffer. They can be invoked using the same key + bindings as in file-visiting buffers or ~RET~, ~u~, ~b~ and ~l~. #4458 + +- Added new command ~magit-remote-unshallow~. #4480 + +- Added new option ~git-commit-use-local-message-ring~. #4503 + ** Fixes since v3.2.0 + +- Make ~magit-branch-remote-head~ and ~magit-branch-current~ fall back + to ~:inverse-video~ when the ~:box~ attribute isn't support, i.e. in + a terminal. If this change does not have any effect for you then + your theme probably changes these faces and should stop doing so. + #4206 + +- In some cases refreshing a buffer caused the cursor to jump to a + different position. #4148 + +- ~magit-convert-filename-for-git~ did not expand absolute filenames, + which is necessary because Git does not understand ~~/~. de1dc8e74 + +- ~magit-rebase~ did not enable ~--autostash~ by default but the + documentation says it does. 421be65a3 + +- ~magit-clone-read-repository~ did not convert filenames before passing + them to Git. 4aa7d2928 + +- Due to a regression in v2.90.0, ~magit-wip-log~ and + ~magit-wip-log-current~ failed to extract the previous tips of the + wip refs from the reflog (which is relevant when + ~~magit-wip-merge-branch~ is nil). c327824b0 + +- An old attempt to avoid needlessly updating section highlighting + did not actually succeed. #3976 + +- An error occurred when first showing a status buffer and + ~which-function-mode~ is enabled because that caused Imenu to collect + items at a time when that is not possible yet. #4481 + +- A change in Git v2.32.0 made it necessary to explicitly filter out + directories when committing to wip worktree refs. #4499 + +- Fixed appearance of Gravatar images by forcing their size instead + relying the service to return the promised size as advertised. + 8771401d4 + +- ~git-commit-setup~ enabled the major-mode after setting local + variables, which caused non-permanent variables to be reset. + ece2cb84d + +* Authors + + 76 Jonas Bernoulli + 8 Kyle Meyer + 1 Daniel Nagy + 1 Franklin Delehelle + 1 Jonathon McKitrick + 1 Lin Sun diff -Nru magit-3.2.1/.github/ISSUE_TEMPLATE/config.yml magit-3.3.0/.github/ISSUE_TEMPLATE/config.yml --- magit-3.2.1/.github/ISSUE_TEMPLATE/config.yml 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/.github/ISSUE_TEMPLATE/config.yml 2021-10-06 12:51:17.000000000 +0000 @@ -3,9 +3,6 @@ - name: "SUPPORT ☛ The Discussions feature of this repository" url: https://github.com/magit/magit/discussions about: Please search, ask and answer questions here. - - name: "SUPPORT ☛ Emacs StackExchange" - url: https://emacs.stackexchange.com/questions/tagged/magit - about: Another place to search, ask and answer questions. - name: "SUPPORT ☛ Emacs Reddit" url: https://www.reddit.com/r/emacs about: Another place to search, ask and answer questions. diff -Nru magit-3.2.1/lisp/git-commit.el magit-3.3.0/lisp/git-commit.el --- magit-3.2.1/lisp/git-commit.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/git-commit.el 2021-10-06 12:51:17.000000000 +0000 @@ -13,8 +13,8 @@ ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit -;; Package-Requires: ((emacs "25.1") (dash "2.18.1") (transient "0.3.6") (with-editor "3.0.4")) -;; Package-Version: 3.2.1 +;; Package-Requires: ((emacs "25.1") (dash "2.19.1") (transient "0.3.6") (with-editor "3.0.5")) +;; Package-Version: 3.3.0 ;; SPDX-License-Identifier: GPL-3.0-or-later ;; This file is free software; you can redistribute it and/or modify @@ -116,6 +116,7 @@ (require 'subr-x) (require 'magit-git nil t) +(require 'magit-mode nil t) (require 'magit-utils nil t) (require 'log-edit) @@ -306,6 +307,16 @@ :safe (lambda (val) (and (listp val) (-all-p 'stringp val))) :type '(repeat string)) +(defcustom git-commit-use-local-message-ring nil + "Whether to use a local message ring instead of the global one. +This can be set globally, in which case every repository gets its +own commit message ring, or locally for a single repository. If +Magit isn't available, then setting this to a non-nil value has +no effect." + :group 'git-commit + :safe 'booleanp + :type 'boolean) + ;;;; Faces (defgroup git-commit-faces nil @@ -500,6 +511,17 @@ ;; That library declares this functions without loading ;; magit-process.el, which defines it. (require 'magit-process nil t)) + (when git-commit-major-mode + (let ((auto-mode-alist (list (cons (concat "\\`" + (regexp-quote buffer-file-name) + "\\'") + git-commit-major-mode))) + ;; The major-mode hook might want to consult these minor + ;; modes, while the minor-mode hooks might want to consider + ;; the major mode. + (git-commit-mode t) + (with-editor-mode t)) + (normal-mode t))) ;; Pretend that git-commit-mode is a major-mode, ;; so that directory-local settings can be used. (let ((default-directory @@ -516,17 +538,6 @@ (major-mode 'git-commit-mode)) ; trick dir-locals-collect-variables (hack-dir-local-variables) (hack-local-variables-apply))) - (when git-commit-major-mode - (let ((auto-mode-alist (list (cons (concat "\\`" - (regexp-quote buffer-file-name) - "\\'") - git-commit-major-mode))) - ;; The major-mode hook might want to consult these minor - ;; modes, while the minor-mode hooks might want to consider - ;; the major mode. - (git-commit-mode t) - (with-editor-mode t)) - (normal-mode t))) ;; Show our own message using our hook. (setq with-editor-show-usage nil) (setq with-editor-usage-message git-commit-usage-message) @@ -555,9 +566,9 @@ (magit-wip-maybe-add-commit-hook))) (setq with-editor-cancel-message 'git-commit-cancel-message) - (make-local-variable 'log-edit-comment-ring-index) (git-commit-mode 1) (git-commit-setup-font-lock) + (git-commit-prepare-message-ring) (when (boundp 'save-place) (setq save-place nil)) (save-excursion @@ -705,7 +716,20 @@ (when-let ((message (git-commit-buffer-message))) (when-let ((index (ring-member log-edit-comment-ring message))) (ring-remove log-edit-comment-ring index)) - (ring-insert log-edit-comment-ring message))) + (ring-insert log-edit-comment-ring message) + (when (and git-commit-use-local-message-ring + (fboundp 'magit-repository-local-set)) + (magit-repository-local-set 'log-edit-comment-ring + log-edit-comment-ring)))) + +(defun git-commit-prepare-message-ring () + (make-local-variable 'log-edit-comment-ring-index) + (when (and git-commit-use-local-message-ring + (fboundp 'magit-repository-local-get)) + (setq-local log-edit-comment-ring + (magit-repository-local-get + 'log-edit-comment-ring + (make-ring log-edit-maximum-comment-ring-size))))) (defun git-commit-buffer-message () (let ((flush (concat "^" comment-start)) diff -Nru magit-3.2.1/lisp/git-commit-pkg.el magit-3.3.0/lisp/git-commit-pkg.el --- magit-3.2.1/lisp/git-commit-pkg.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/git-commit-pkg.el 2021-10-06 12:51:17.000000000 +0000 @@ -1,8 +1,8 @@ -(define-package "git-commit" "3.2.1" +(define-package "git-commit" "3.3.0" "Edit Git commit messages." '((emacs "25.1") - (dash "2.18.1") + (dash "2.19.1") (transient "0.3.6") - (with-editor "3.0.4")) + (with-editor "3.0.5")) :homepage "https://magit.vc" :keywords '("git" "tools" "vc")) diff -Nru magit-3.2.1/lisp/magit-apply.el magit-3.3.0/lisp/magit-apply.el --- magit-3.2.1/lisp/magit-apply.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-apply.el 2021-10-06 12:51:17.000000000 +0000 @@ -449,6 +449,8 @@ (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 +461,11 @@ ;;;; 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 +484,10 @@ (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 +744,60 @@ (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 -Nru magit-3.2.1/lisp/magit-blame.el magit-3.3.0/lisp/magit-blame.el --- magit-3.2.1/lisp/magit-blame.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-blame.el 2021-10-06 12:51:17.000000000 +0000 @@ -915,12 +915,14 @@ :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 -Nru magit-3.2.1/lisp/magit-bundle.el magit-3.3.0/lisp/magit-bundle.el --- magit-3.2.1/lisp/magit-bundle.el 1970-01-01 00:00:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-bundle.el 2021-10-06 12:51:17.000000000 +0000 @@ -0,0 +1,135 @@ +;;; magit-bundle.el --- bundle support for Magit -*- lexical-binding: t -*- + +;; Copyright (C) 2011-2021 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 -Nru magit-3.2.1/lisp/magit-clone.el magit-3.3.0/lisp/magit-clone.el --- magit-3.2.1/lisp/magit-clone.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-clone.el 2021-10-06 12:51:17.000000000 +0000 @@ -257,9 +257,15 @@ 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 -Nru magit-3.2.1/lisp/magit-commit.el magit-3.3.0/lisp/magit-commit.el --- magit-3.2.1/lisp/magit-commit.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-commit.el 2021-10-06 12:51:17.000000000 +0000 @@ -91,6 +91,34 @@ :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 @@ -574,7 +602,11 @@ (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 -Nru magit-3.2.1/lisp/magit-diff.el magit-3.3.0/lisp/magit-diff.el --- magit-3.2.1/lisp/magit-diff.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-diff.el 2021-10-06 12:51:17.000000000 +0000 @@ -93,10 +93,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 +967,14 @@ :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 () @@ -1676,11 +1678,13 @@ (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 +1978,12 @@ (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.") @@ -2700,17 +2710,18 @@ (when-let ((window (get-buffer-window))) (let* ((column (length (match-string 0))) (font-obj (query-font (font-at (point) window))) - (size (* 2 (+ (aref font-obj 4) - (aref font-obj 5)))) + (size (* 2 (aref font-obj 4))) (align-to (+ column (ceiling (/ size (aref font-obj 7) 1.0)) 1)) (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,9 +2735,11 @@ (car-safe (get-text-property (point) 'display))) 'image))) - (let ((top `((,@image :ascent center :relief 1) + (let ((top `((,@image + :ascent center :relief 1 :scale 1 :height ,size) (slice 0.0 0.0 1.0 0.5))) - (bot `((,@image :ascent center :relief 1) + (bot `((,@image + :ascent center :relief 1 :scale 1 :height ,size) (slice 0.0 0.5 1.0 1.0))) (align `((space :align-to ,align-to)))) (when magit-revision-use-gravatar-kludge @@ -2949,8 +2962,7 @@ (`(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 +3239,8 @@ (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 -Nru magit-3.2.1/lisp/magit.el magit-3.3.0/lisp/magit.el --- magit-3.2.1/lisp/magit.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit.el 2021-10-06 12:51:17.000000000 +0000 @@ -19,8 +19,8 @@ ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit -;; Package-Requires: ((emacs "25.1") (dash "2.18.1") (git-commit "3.2.1") (magit-section "3.2.1") (transient "0.3.6") (with-editor "3.0.4")) -;; Package-Version: 3.2.1 +;; 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 @@ -108,8 +108,8 @@ :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) @@ -120,8 +120,8 @@ :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) @@ -296,7 +296,10 @@ "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) @@ -304,29 +307,51 @@ ("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) @@ -358,8 +383,6 @@ ;;;###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)] @@ -473,8 +496,10 @@ (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 '(".el"))) + (setq toplib (locate-library "magit")))) (setq toplib (and toplib (magit--straight-chase-links toplib))) (push toplib debug) (when toplib @@ -534,8 +559,19 @@ (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 (version< "2008" magit-version)) + (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 -Nru magit-3.2.1/lisp/magit-extras.el magit-3.3.0/lisp/magit-extras.el --- magit-3.2.1/lisp/magit-extras.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-extras.el 2021-10-06 12:51:17.000000000 +0000 @@ -197,6 +197,21 @@ (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'. Interactively, open the file at point." @@ -753,6 +768,55 @@ (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 -Nru magit-3.2.1/lisp/magit-files.el magit-3.3.0/lisp/magit-files.el --- magit-3.2.1/lisp/magit-files.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-files.el 2021-10-06 12:51:17.000000000 +0000 @@ -251,7 +251,7 @@ (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 @@ (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 -Nru magit-3.2.1/lisp/magit-git.el magit-3.3.0/lisp/magit-git.el --- magit-3.2.1/lisp/magit-git.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-git.el 2021-10-06 12:51:17.000000000 +0000 @@ -133,12 +133,9 @@ 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 +173,9 @@ (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 +222,9 @@ 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. @@ -1018,15 +1018,18 @@ (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)) + (expand-file-name + (or (file-remote-p filename 'localname) + filename))) filename)) (defun magit-decode-git-path (path) @@ -2210,6 +2213,14 @@ (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 +2229,13 @@ (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 +2248,8 @@ (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 +2284,8 @@ (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 +2318,8 @@ (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 -Nru magit-3.2.1/lisp/magit-imenu.el magit-3.3.0/lisp/magit-imenu.el --- magit-3.2.1/lisp/magit-imenu.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-imenu.el 2021-10-06 12:51:17.000000000 +0000 @@ -47,21 +47,28 @@ `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 @@ (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 @@ 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 @@ '(branch commit tag) '(local remote tags))) -;;;; Cherry mode +;;; Cherry mode ;;;###autoload (defun magit-imenu--cherry-create-index-function () @@ -158,7 +167,7 @@ '(commit) '(cherries))) -;;;; Submodule list mode +;;; Submodule list mode ;;;###autoload (defun magit-imenu--submodule-prev-index-position-function () @@ -176,7 +185,7 @@ 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 @@ (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 @@ (buffer-substring-no-properties (line-beginning-position) (line-end-position))) -;;;; Rebase mode +;;; Rebase mode ;;;###autoload (defun magit-imenu--rebase-prev-index-position-function () diff -Nru magit-3.2.1/lisp/magit-libgit.el magit-3.3.0/lisp/magit-libgit.el --- magit-3.2.1/lisp/magit-libgit.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-libgit.el 2021-10-06 12:51:17.000000000 +0000 @@ -10,8 +10,8 @@ ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit -;; Package-Requires: ((emacs "26.1") (libgit "0") (magit "3.2.1")) -;; Package-Version: 3.2.1 +;; Package-Requires: ((emacs "26.1") (libgit "0") (magit "3.3.0")) +;; 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 diff -Nru magit-3.2.1/lisp/magit-libgit-pkg.el magit-3.3.0/lisp/magit-libgit-pkg.el --- magit-3.2.1/lisp/magit-libgit-pkg.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-libgit-pkg.el 2021-10-06 12:51:17.000000000 +0000 @@ -1,7 +1,7 @@ -(define-package "magit-libgit" "3.2.1" +(define-package "magit-libgit" "3.3.0" "." '((emacs "25.1") (libgit "0") - (magit "3.2.1")) + (magit "3.3.0")) :homepage "https://magit.vc" :keywords '("git" "tools" "vc")) diff -Nru magit-3.2.1/lisp/magit-log.el magit-3.3.0/lisp/magit-log.el --- magit-3.2.1/lisp/magit-log.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-log.el 2021-10-06 12:51:17.000000000 +0000 @@ -406,8 +406,8 @@ ["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 @@ :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 @@ (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 @@ (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 @@ -1531,13 +1543,13 @@ (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 -Nru magit-3.2.1/lisp/magit-merge.el magit-3.3.0/lisp/magit-merge.el --- magit-3.2.1/lisp/magit-merge.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-merge.el 2021-10-06 12:51:17.000000000 +0000 @@ -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" diff -Nru magit-3.2.1/lisp/magit-mode.el magit-3.3.0/lisp/magit-mode.el --- magit-3.2.1/lisp/magit-mode.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-mode.el 2021-10-06 12:51:17.000000000 +0000 @@ -110,7 +110,7 @@ :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 @@ 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 @@ 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 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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) diff -Nru magit-3.2.1/lisp/magit-patch.el magit-3.3.0/lisp/magit-patch.el --- magit-3.2.1/lisp/magit-patch.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-patch.el 2021-10-06 12:51:17.000000000 +0000 @@ -57,10 +57,11 @@ (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 -Nru magit-3.2.1/lisp/magit-pkg.el magit-3.3.0/lisp/magit-pkg.el --- magit-3.2.1/lisp/magit-pkg.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-pkg.el 2021-10-06 12:51:17.000000000 +0000 @@ -1,10 +1,10 @@ -(define-package "magit" "3.2.1" +(define-package "magit" "3.3.0" "A Git porcelain inside Emacs." '((emacs "25.1") - (dash "2.18.1") - (git-commit "3.2.1") - (magit-section "3.2.1") + (dash "2.19.1") + (git-commit "3.3.0") + (magit-section "3.3.0") (transient "0.3.6") - (with-editor "3.0.4")) + (with-editor "3.0.5")) :homepage "https://magit.vc" :keywords '("git" "tools" "vc")) diff -Nru magit-3.2.1/lisp/magit-process.el magit-3.3.0/lisp/magit-process.el --- magit-3.2.1/lisp/magit-process.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-process.el 2021-10-06 12:51:17.000000000 +0000 @@ -97,11 +97,14 @@ :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 @@ (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 @@ "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 @@ 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 -Nru magit-3.2.1/lisp/magit-reflog.el magit-3.3.0/lisp/magit-reflog.el --- magit-3.2.1/lisp/magit-reflog.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-reflog.el 2021-10-06 12:51:17.000000000 +0000 @@ -136,8 +136,8 @@ (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 -Nru magit-3.2.1/lisp/magit-refs.el magit-3.3.0/lisp/magit-refs.el --- magit-3.2.1/lisp/magit-refs.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-refs.el 2021-10-06 12:51:17.000000000 +0000 @@ -63,7 +63,7 @@ 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 @@ (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 @@ ["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 diff -Nru magit-3.2.1/lisp/magit-remote.el magit-3.3.0/lisp/magit-remote.el --- magit-3.2.1/lisp/magit-remote.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-remote.el 2021-10-06 12:51:17.000000000 +0000 @@ -87,7 +87,8 @@ ("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 @@ (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 -Nru magit-3.2.1/lisp/magit-section.el magit-3.3.0/lisp/magit-section.el --- magit-3.2.1/lisp/magit-section.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-section.el 2021-10-06 12:51:17.000000000 +0000 @@ -10,8 +10,8 @@ ;; Keywords: tools ;; Homepage: https://github.com/magit/magit -;; Package-Requires: ((emacs "25.1") (dash "2.18.1")) -;; Package-Version: 3.2.1 +;; 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 @@ -318,7 +318,7 @@ (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 +328,10 @@ (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 +357,9 @@ ;; (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 @@ -1240,13 +1241,20 @@ ;;; Highlight +(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-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 (not (eq magit-section-pre-command-section section))) (let ((inhibit-read-only t) (deactivate-mark nil) (selection (magit-region-sections))) @@ -1261,11 +1269,7 @@ (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) @@ -1384,7 +1388,6 @@ 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 -Nru magit-3.2.1/lisp/magit-section-pkg.el magit-3.3.0/lisp/magit-section-pkg.el --- magit-3.2.1/lisp/magit-section-pkg.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-section-pkg.el 2021-10-06 12:51:17.000000000 +0000 @@ -1,6 +1,6 @@ -(define-package "magit-section" "3.2.1" +(define-package "magit-section" "3.3.0" "Sections for read-only buffers" '((emacs "25.1") - (dash "2.18.1")) + (dash "2.19.1")) :homepage "https://magit.vc" :keywords '("tools")) diff -Nru magit-3.2.1/lisp/magit-sequence.el magit-3.3.0/lisp/magit-sequence.el --- magit-3.2.1/lisp/magit-sequence.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-sequence.el 2021-10-06 12:51:17.000000000 +0000 @@ -436,6 +436,7 @@ :description "Remove leading slashes from paths" :class 'transient-option :argument "-p" + :allow-empty t :reader 'transient-read-number-N+) ;;;###autoload @@ -498,6 +499,7 @@ (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") diff -Nru magit-3.2.1/lisp/magit-stash.el magit-3.3.0/lisp/magit-stash.el --- magit-3.2.1/lisp/magit-stash.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-stash.el 2021-10-06 12:51:17.000000000 +0000 @@ -125,7 +125,14 @@ 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 +223,7 @@ (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 diff -Nru magit-3.2.1/lisp/magit-status.el magit-3.3.0/lisp/magit-status.el --- magit-3.2.1/lisp/magit-status.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-status.el 2021-10-06 12:51:17.000000000 +0000 @@ -309,6 +309,29 @@ (put 'magit-status-here 'interactive-only 'magit-status-setup-buffer) +(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) @@ -375,7 +398,8 @@ ("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. @@ -612,12 +636,13 @@ ((magit--valid-upstream-p remote merge) (if (equal remote ".") (concat - (propertize merge 'font-lock-face 'magit-branch-local) - (propertize " does not exist" + (propertize merge 'font-lock-face 'magit-branch-local) " " + (propertize "does not exist" 'font-lock-face 'font-lock-warning-face)) - (concat + (format + "%s %s %s" (propertize merge 'font-lock-face 'magit-branch-remote) - (propertize " does not exist on " + (propertize "does not exist on" 'font-lock-face 'font-lock-warning-face) (propertize remote 'font-lock-face 'magit-branch-remote)))) (t @@ -644,11 +669,11 @@ "(no commit message)")))) (let ((remote (magit-get-push-remote branch))) (if (magit-remote-p remote) - (concat target - (propertize " does not exist" + (concat target " " + (propertize "does not exist" 'font-lock-face 'font-lock-warning-face)) - (concat remote - (propertize " remote does not exist" + (concat remote " " + (propertize "remote does not exist" 'font-lock-face 'font-lock-warning-face)))))) (insert ?\n)))) diff -Nru magit-3.2.1/lisp/magit-wip.el magit-3.3.0/lisp/magit-wip.el --- magit-3.2.1/lisp/magit-wip.el 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/magit-wip.el 2021-10-06 12:51:17.000000000 +0000 @@ -287,30 +287,35 @@ (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 (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")))) (defun magit-wip-update-wipref (ref wipref tree parent files msg start-msg) (cond @@ -442,7 +447,10 @@ (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 -Nru magit-3.2.1/lisp/Makefile magit-3.3.0/lisp/Makefile --- magit-3.2.1/lisp/Makefile 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/lisp/Makefile 2021-10-06 12:51:17.000000000 +0000 @@ -61,6 +61,7 @@ magit-subtree.elc: magit.elc magit-ediff.elc: magit.elc magit-gitignore.elc: magit.elc +magit-bunlde.elc: magit.elc magit-extras.elc: magit.elc magit-merge.elc git-rebase.elc: magit.elc magit-imenu.elc: magit.elc git-rebase.elc diff -Nru magit-3.2.1/RelNotes.org magit-3.3.0/RelNotes.org --- magit-3.2.1/RelNotes.org 2021-08-06 16:07:00.000000000 +0000 +++ magit-3.3.0/RelNotes.org 2021-10-06 12:51:17.000000000 +0000 @@ -13,15 +13,140 @@ For more information about Magit, see https://magit.vc. -* Magit v3.2.1 Release Notes +* Magit v3.3.0 Release Notes -Released 6st August 2021 by Jonas Bernoulli. +Released 4th October 2021 by Jonas Bernoulli. -I am pleased to announce the release of Magit version 3.2.1. +I am pleased to announce the release of Magit version 3.3.0, +representing 88 commits by 6 contributors over two month. -This is the first release that is available from NonGNU Elpa. It is -identical to version 3.2.0 except for dependency metadata, which had -to be changed so that this package could be release on NonGNU Elpa. +Also see https://emacsair.me/2021/10/04/magit-3.3. -Also see https://emacsair.me/2021/08/06/nongnu-elpa -and https://elpa.nongnu.org/nongnu/magit.html. +** Breaking changes + +- The last remaining alphabetic keys (both lower- and uppercase) are + now bound in ~magit-mode-map~. ~H~ to ~magit-describe-section~, ~j~ to the + new ~magit-status-quick~ (or ~magit-status-jump~ in status buffers), ~J~ + to the new ~magit-display-repository-buffer~, ~Q~ to ~magit-git-command~ + and ~Z~ to ~magit-worktree~, and once Forge is loaded, then ~N~ to + ~forge-dispatch~. (~Z~ used to be bound to ~magit-stash~, which now is + only available on ~z~.) #4259, 9bec1c54a, e401bd4d3 + +- ~I~ is now bound to ~magit-init~ instead of ~magit-gitignore~, which + continues to be available on ~i~. Users of the ~magit-imerge~ package + (which previously bound ~i~) should consult its library header for a + suggestion on how to resolve the resulting conflict. b54b537db + +** Changes since v3.2.0 + +- No longer automatically add ~--full-history~ when showing a log for a + single file that isn't being tracked anymore. #4381 + +- ~magit-stash-both~ now asks before discarding merge state. #4345 + +- Several infix arguments, which previously could only be disabled + or have a numeric value, can now also be enabled without having + an explicit numeric value. #4379 + +- Added ~-Xignore-space-change~ and ~-Xignore-all-space~ to ~magit-merge~. + Like most newly added expert arguments they have to be explicitly + [[https://magit.vc/manual/transient/Enabling-and-Disabling-Suffixes.html][revealed]]. #4387 + +- Added new command ~magit-status-quick~, which shows the status buffer + but avoids refreshing it for performance reasons. #4259 + +- Added new commands ~magit-display-repository-buffer~ (bound to ~j~ in + Magit buffers) and ~magit-switch-to-repository-buffer~ (bound to ~J~) + and variants for switching to any existing Magit buffer belonging + to the current repository. #4259 + +- Added new command ~magit-dired-am-apply-patches~ for use in Dired. + #4094. + +- Rearranged ~magit-patch~ and added a binding for ~magit-am~. 8ec3a1a21, + 8cadf302b + +- Added new command ~magit-help~ (bound to ~h~ in ~magit-dispatch~), which + simply shows Magit's Info manual. 5bba62629 + +- When listing entries for Imenu, then remove entry counts from group + titles for the benefit of third-party packages that need stable + titles. #4477 + +- Include Forge's ~pullreq~ and ~issue~ sections when listing entries for + Imenu. f4016f734 + +- Bound ~imenu~ in the ~magit-status-jump~ prefix. 678df30c3 + +- Added new transient prefix command ~magit-bundle~, which provides + support for ~git bundle~. #4392 + +- When minibuffer completion allows for a branch or a commit to be + selected and the former is preferred and thus offered as default + then, if possible, offer the commit at point as the first choice + initially accessible with ~next-history-element~. #4291 + +- Bound ~magit-refs-set-show-commit-count~ in the ~magit-show-refs~ + prefix. 2fe42f63d + +- Added new option ~magit-commit-diff-inhibit-same-window~. #4132 + +- Added support for invoking Smerge's "keep" commands when point is on + a hunk in a Magit buffer. They can be invoked using the same key + bindings as in file-visiting buffers or ~RET~, ~u~, ~b~ and ~l~. #4458 + +- Added new command ~magit-remote-unshallow~. #4480 + +- Added new option ~git-commit-use-local-message-ring~. #4503 + +** Fixes since v3.2.0 + +- Make ~magit-branch-remote-head~ and ~magit-branch-current~ fall back + to ~:inverse-video~ when the ~:box~ attribute isn't support, i.e. in + a terminal. If this change does not have any effect for you then + your theme probably changes these faces and should stop doing so. + #4206 + +- In some cases refreshing a buffer caused the cursor to jump to a + different position. #4148 + +- ~magit-convert-filename-for-git~ did not expand absolute filenames, + which is necessary because Git does not understand ~~/~. de1dc8e74 + +- ~magit-rebase~ did not enable ~--autostash~ by default but the + documentation says it does. 421be65a3 + +- ~magit-clone-read-repository~ did not convert filenames before passing + them to Git. 4aa7d2928 + +- Due to a regression in v2.90.0, ~magit-wip-log~ and + ~magit-wip-log-current~ failed to extract the previous tips of the + wip refs from the reflog (which is relevant when + ~~magit-wip-merge-branch~ is nil). c327824b0 + +- An old attempt to avoid needlessly updating section highlighting + did not actually succeed. #3976 + +- An error occurred when first showing a status buffer and + ~which-function-mode~ is enabled because that caused Imenu to collect + items at a time when that is not possible yet. #4481 + +- A change in Git v2.32.0 made it necessary to explicitly filter out + directories when committing to wip worktree refs. #4499 + +- Fixed appearance of Gravatar images by forcing their size instead + relying the service to return the promised size as advertised. + 8771401d4 + +- ~git-commit-setup~ enabled the major-mode after setting local + variables, which caused non-permanent variables to be reset. + ece2cb84d + +* Authors + + 76 Jonas Bernoulli + 8 Kyle Meyer + 1 Daniel Nagy + 1 Franklin Delehelle + 1 Jonathon McKitrick + 1 Lin Sun