Released 25th May 2021 by Jonas Bernoulli.
I am pleased to announce the release of Magit version 3.0.0, representing 1264 commits by 87 contributors over 2.5 years.
Also see https://emacsair.me/2021/05/25/magit-3.0.
- Dropped support for Git v2.0 and v2.1.
- After some users intervened I have decided to NOT drop support for Emacs 25 in this release as I had intended to do. Emacs 25 should remain supported for at least a few more releases.
- Magit now uses Transient instead of Magit-Popup. In the transition many popups gained new arguments and/or commands, most of which are not mentioned explicitly in these release notes. Many of these commands are hidden by default because they are only useful to a subset of users. See https://emacsair.me/2019/02/14/transient-0.1 for information about the new Transient library and how to enable hidden commands, among other things.
- The commands
magit-branch-pull-request,magit-checkout-pull-requestandmagit-worktree-checkout-pull-requestwere removed in favor of improved implementations provided by the new Forge package. (See https://emacsair.me/2018/12/19/forge-0.1 for more information about Forge.) C-c C-eis no longer bound tomagit-dispatch-popup. It is bound tomagit-edit-thingnow, so that Forge can add section-specific bindings using this key.magit-dispatch-popuphas been renamed tomagit-dispatchand continues to be available onh,?andC-c C-c. #3659C-c C-bis no longer bound tomagit-browse-thingto avoid a conflict withmagit-go-backwardin diff and log buffers.C-c C-w(as in web) is used instead now. #3659- The option
magit-display-file-buffer-functionwas removed. 8a214c9fb - The buffer-local variable
magit-refresh-argumentswas replaced with several variables because(nth N magit-refresh-arguments)just isn’t very informative. Several related API functions had to be changed in incompatible ways. This was done by adding new functions and keeping the old variable and functions around for backward compatibility. Packages using the obsolete variable and functions should be adjusted soon. #3836 - Magit-Section is now distributed as a separate package, as announced here: https://emacsair.me/2020/01/23/magit-section. #4003
- Magit now adds three global key bindings, which can be prevented
by setting the new option
magit-define-global-key-bindingsbefore loadingmagit. Note that if you bind these keys to other commands anywhere in your init file (even after loadingmagit), then Magit won’t override those bindings. See the options doc-string for more information. #4237 - Magit no longer depends on
async-bytecompto avoid a certain class of mystery bugs because this effort backfired. 86eec7ba3 global-git-commit-modeis no longer autoloaded. Users who commit from the command-line but still want to usegit-commit-mode, might now have to loadgit-commitexplicitly in their init file. 13f20763a
- It isn’t always obvious that a section can be expanded, especially
to users who are just getting started with Magit. Mainly to make
it easier for those users, expandable and collapsible sections now
get an indicator in the fringe.
The new option
magit-section-visibility-indicatorcan be used to disable this or to select the alternative style, which shows an ellipsis at the end of the heading of each expandable section instead. #3679 - The “Version” column in
magit-submodule-list-modeandmagit-repolist-modebuffers now shows when a repository is dirty. 0b86dbfd6 - Added new command
magit-log-merged. This command requiresgit-when-merged(https://github.com/mhagger/git-when-merged). It is a suffix ofmagit-logbut is disabled by default. #3657 - Added new class slot
keymapto allow other packages to define section-specific keymaps without naming themmagit-TYPE-section-map, which would mean using a symbol prefix (magit-) that does not match the package name. - Added new option
magit-diff-refine-ignore-whitespace, overriding and defaulting to the value ofsmerge-refine-ignore-whitespace. #3671 - Added new option
magit-diff-paint-whitespace-lines, which controls in what kind of lines (added/removed/context) whitespace errors are highlighted. #3671 - It is now possible to show whitespace errors only in uncommitted
changes by setting
magit-diff-paint-whitespacetouncommitted. The obsolete valuestatusis treated as a synonym. The intention always was to allow limiting to uncommitted changes and limiting to changes shown in the status buffer was the closest approximation readily available when this feature was first added. #3671 - The commands
magit-commit-instant-fixup,magit-commit-instant-squashandmagit-rebase-autosquashnow unconditionally preserve empty commits that were already present before the autosquash rebase performed by these commands. This is the safe default; if you want to drop such commits, then you have to enable--autosquashin the popup and then invokemagit-rebase-interactive. #3670 magit-rebase-remove-commitnow supports removing theHEADcommit. #4195- The option
magit-repository-directoriesdefaults tonilagain because the non-nil default added in v2.90.0 led to surprising changes in behavior. The documentation of this option and the relatedmagit-statuscommand were made less ambiguous. #3673 - Renamed the face
git-commit-notetogit-commit-keywordbecause that is what text in brackets is called elsewhere in Magit and because the term “note” was ambiguous in this context. The old face name is still defined as an alias, but that will be removed eventually. - The command
magit-worktree-checkoutnow also offers tags and remote branches as completion candidates. #3692 - The command
magit-commit-rewordnow always uses--allow-emptybecause when you reword an empty commit, then you have already confirmed that you are okay with that commit being empty. - The new buffer-local variable
git-commit-need-summary-linecan be of use if you want to write Git notes without separating the first line with an empty line from the rest of the text. #3676 - Made
magit-tag-releasemore flexible and added it as a suffix ofmagit-tag. 2d14f84b2 - Bound “C-c C-o” (in addition to “C-c C-w”) to
magit-browse-thingfor consistency withorg-open-at-point’s binding. 1e1193666 magit-copy-section-valuenow supports stripping diff markers. #3716magit-insert-*-branch-headernow colorizes keywords in the message. 98e328200magit-unstagecan now unstage files that were staged using--intent-to-add. #3753magit-read-branch-or-commitnow offers symbolic refnames such asORIG_HEADas completion candidates. #3766magit-stage-modifiedandmagit-unstage-allnow take the log file filter into account. #3767- New command
magit-skip-worktreecan be used to tell Git to pretend that the working tree version is up-to-date;magit-no-skip-worktreedoes the opposite. Both commands are available from themagit-gitignoreprefix but are disabled by default. #3710 --rebase-merges, an option available in Git version 2.18.0 and later, is now supported. The--rebase-mergesinfix ofmagit-rebaseis disabled by default. #3762- New command
git-rebase-breakinserts a “break” action in the rebase to-do sequence (available as of Git v2.20). #3762 git-rebase-kill-lineand the commands for changing the action of a commit line (e.g.,git-rebase-squash) learned to work on all lines selected by the region. #4172- The
--color-moveddiff argument is supported now, but isn’t available from the diff transients by default. To enable it use “C-x l” in those transients. #3424 - Added new option
magit-revision-filter-files-on-followthat controls whether a revision buffer shown from a log shares the log’s file restriction despite--followbeing in the log arguments. #3680 magit-cherryis now available from themagit-dispatchprefix. ef311f378magit-cherry-spinoffnow offers the upstream as the default starting-point. e5a2a0ac2- Added new command
magit-branch-spinout. #3794. magit-process-password-auth-sourcenow allows the use of emails as usernames. 05d82d501- Added new option
magit-prefer-push-default, which controls whether commands that configure the push-remote do so by setting the value ofremote.pushDefaultorbranch.<name>.pushRemote. Also removed optionmagit-remote-set-if-missing. 07ca042b6 - Support for bookmarks was rewritten from scratch. #3836, cd391a035
- The new options
magit-prefix-use-buffer-argumentsandmagit-direct-use-buffer-argumentsreplace the old optionmagit-use-sticky-arguments. The default “stickiness” of arguments has changed. #3836, 0e67ca9eb - Like when moving through a log, moving through a list of cherries now automatically updates the revision or blob buffer. #3836
- Added new option
magit-worktree-read-directory-name-function. #3820 - Basic optional support for
libgit2was added, but because so few functions are currently implemented using that library, opting in currently has almost no effect. #3841 git bisectis now run asynchronously. #3802magit-bisectnow supports specifying alternate terms. The new infixes and suffix related to this functionality are disabled by default.magit-branch-or-commit-at-pointnow falls back to an abbreviated hash instead of something like “master~2”, because the latter often leads to undesirable behavior. fd5eb5b43magit-toggle-buffer-lockis now a suffix of bothmagit-diffandmagit-log. c09993112- When invoked with a prefix argument, then
magit-clonenow acts as a prefix command. If the new optionmagit-clone-always-transientis non-nil, then it always acts as a prefix command. #3846 - Clone commands now accept repository names and similar abbreviations
in addition to complete urls. The new options
magit-clone-name-alistandmagit-clone-url-formatcontrol how the translation is done. #3846 - When called from
magit-dispatch, thenmagit-diffandmagit-logno longer set the file limit to the file visited in the current buffer. ccc72469e RET(magit-diff-visit-file) on a committed change now always visits the respective commit. Previously it did that for all commits except theHEADcommit. This made it impossible to visit theHEADcommit using this or a related command and also was inconsistent.Likewise
RETon an uncommitted removal now visitsHEAD, the last commit that still had those lines. Previously it visited the file in the working tree, making it difficult to blame the previous version of modified lines.Now
C-RET(magit-diff-visit-worktree) has to be used to visit the file in the working tree for any commit or uncommitted removals. Setting the new optionmagit-diff-visit-avoid-head-blobto a non-nil value restores the old behavior ofmagit-diff-visit-file. #3848magit-diff-visit-worktreenow does a much better job at jumping to the correct location in the file. c9e5425cd- Added new command
magit-find-file-other-frame. 9a69c74ca - Renamed command
magit-diff-visit-file-worktreetomagit-diff-visit-worktree-file. 4f739cd35 - Added new commands
magit-diff-visit-file-other-frame,magit-diff-visit-worktree-file-other-window, andmagit-diff-visit-worktree-file-other-frame. 756d61911, 6704b3248 - Added new option
magit-process-prompt-functions. #3845 magit-find-fileis now available frommagit-file-dispatch. 9c587d458magit-find-fileand related commands learned to visit a file from the worktree or index. #3860magit-find-fileand related commands learned to go to the position in the visited file that corresponds to the position in the previously current buffer. #3860magit-diff-buffer-filelearned to visit a commit instead of a range when appropriate. #3860magit-show-commitandmagit-diff-buffer-filelearned to go to the position in the diff that corresponds to the position in the previously current file-visiting buffer. #3860- Added new command
magit-blob-visit-file. When visiting a blob, then it goes to the same location in the respective file in the working tree. #3860 magit-add-change-log-entry{,-other-window}learned to extract the file name from blob-visiting buffers.magit-tag-releasenow runsgitasynchronously. #3855- When invoked with two prefix arguments, then
magit-mode-burry-buffernow also kills all other Magit buffers associated with the current repository. #3863 magit-branch-or-commit-at-pointwas taught about Forge pull-requests. 9447edd12- When merging a branch that corresponds to a Forge pull-request, then the commit message is modified to contain the pull-request number. 15331d7c0
- For consistency
magit-file-renamenow also renames buffers that visit untracked files. #3916 - Additional history simplification arguments were added to the log transients. Because only a minority of users will use those, they were put on levels that are not shown by default. 8f8a2f1cf
- Added new commands
magit-assume-unchanged, ~magit-no-assume-unchanged,magit-jump-to-skip-worktreeandmagit-jump-to-assume-unchanged, and section insertermagit-insert-assume-unchanged-files. 2d0de8614 ff - Magit buffers are now compatible with
whitespace-mode(and other modes which use font-lock). #3840 - Added new command
magit-status-hereavailable from file-visiting buffers atC-c M-g g. This command tries to go to the position in the status buffer that corresponds to the position in the current file-visiting buffer. Settingmagit-status-goto-file-positionto a non-nil value causesmagit-statusto behave the same way. #3930 - Replaced
magit-repolist-column-dirtywithmagit-repolist-column-flagwhich allows specifying arbitrary flags and predicates in custom order usingmagit-repolist-column-flag-alist. #3936 #3937 - The buffer that shows a stash is now updated automatically when
moving through a list of stashes if the user added the new
magit-status-maybe-update-stash-bufferand/ormagit-stashes-maybe-update-stash-buffertomagit-section-movement-hook. #3943 - Added new commands
magit-log-matching-branchesandmagit-log-matching-tags. #3958, #3983 - Added new option
magit-disable-line-numbers. #3971 - Added new option
magit-log-margin-show-committer-date. 1b9995238 - Added new command
magit-worktree-moveto allow you to move an existing worktree to a new directory. #3978 - Introduced two new faces to customize the appearance of commit messages:
magit-diff-revision-summaryandmagit-diff-revision-summary-highlight. #3988 - Commands under the
magit-gitignoreprefix now include directories that contain only untracked files as completion candidates. #3985 - Added new command
magit-toggle-verbose-refresh. c63ec3920 - Added new function
magit-disable-section-inserter, which can be used to disable a section only in the current repository. This mechanism is useful for exceptionally large repositories. #4017 - Added new transient prefix command
magit-status-jumpand turned the existing jumper commands into suffixes. 655950f40 - Added new option
magit-copy-revision-abbreviated. #4014 - Added new transient prefix command
git-commit-insert-pseudo-headerand turned the existing inserter commands into suffixes. e88242679 - Added new command
magit-push-notes-ref. dff0bca6f - The
--irreversible-deletediff argument is supported now, but isn’t available from the diff transients by default. To enable it use “C-x l” in those transients. #4056 - Added new command
magit-reset-keep. 0ea8b0ef6 - Added new option
magit-reshelve-since-committer-only. #4101 - Added new command
magit-commit-absorbas an alternative tomagit-commit-autofixup. 9423edc0b - Added new option
magit-status-use-buffer-arguments. #4046 - Added new command
magit-project-status. #4173 - Added new variable
magit-process-extreme-loggingfor debugging purposes. #4217 - Taught Isearch and Swiper how to expand Magit sections when the current match is inside a hidden section and how to close sections again. #3999
- Added new command
magit-commit-absorb-modules. 10b4bec53 - Added new transient command
magit-shortlog. #4262 - Added new command
magit-generate-changelog. c5e118111 - The name of the main branch is no longer hard-coded to “master”.
Now we use the value of
init.defaultBranchif that is set and the named branch exists. If not, then some other names that are commonly used for the main branch are tried as a potential fallback. c4494ac0b - Added new option
magit-diff-extra-stat-arguments. 1bd4fe26e - Added support for
git-credential-manager-core. #4318 - The name of the upstream remote is no longer hard-code to “origin”.
See the doc-string of function
magit-primary-remoteto learn how to customize this. f883b62fe
This release also contains numerous other improvements.
- Bumped the minimal required version of
git-committo the correct version. e9bd33758 - Dropped the new “v” prefix that we started to add to release tags starting with the previous release in places where that prefix is undesirable. f441cf6d7
- Staging and unstaging submodules while
diff.submodule’s value islogbroke shortly before the v2.90.0 release. #3654 - When another window is already displaying the file buffer, then
magit-display-file-buffer-other-windowdid additionally display it in the current window. #3662 - It was undefined whether highlighting of word-granularity differences or of whitespace-error had higher priority. #3671
- The Custom type definition of
magit-diff-adjust-tab-widthwas broken. #3671 - In the log-select buffers point was no longer placed on the same commit as was at point in the buffer from which the command was invoked. #3674
magit-diff-typefalsely concluded that a diff buffer showed unstaged changes when diffing a range where the right side resolves to the same commit asHEAD. #3666magit-log-trace-definition-functiondefaulted towhich-function, which isn’t reliable because it used Imenu, which uses a cache but by default never invalidates. Now we usemagit-which-function, a replacement that never uses an outdated cache.magit-log-trace-definitiondidn’t account for Git treating “-” differently from, e.g., “_”, leading to false-positives like “foo-suffix” being considered a match for “foo”.magit-log-trace-definitiondidn’t do the escaping that Git expects for function names with colons. #4051- A regression in
magit-log-move-to-parentprevented it from doing its job. #3682 - Since v2.11.0
magit-log-revision-headers-formatlines in the log output (shown via++header) weren’t displayed properly when--graphwas enabled. #4129 magit-clonedidn’t runmagit-credential-hook. #3683magit-list-repositoriesfailed if one of the repositories that it tries to list is empty. #3686- The summary element from
git-commit-font-lock-keyword-1lost against the elements ofgit-commit-elisp-text-mode-keywords, causing the summary line to lose its special appearance when a “string” or `symbol’ appears in it. magit-split-branch-namedid not take into account that remote names can contain slashes. #3685magit-which-functionnow simply resets Imenu’s cache and then callswhich-function. The old approach that tried to outsmart Imenu was broken. #3691magit-describe-section-brieflydid not actually display a section ident when called interactively, as the docstring claimed. Now it displays the section ident, which is useful inmagit-status-initial-section.- Section movement commands got confused by type change sections being treated as a special kind of hunk. #3698
x-strech-cursorwas set globally. #3707magit-blame-echowas broken. #3720magit-rev-namesometimes returnednileven when it could return a name and it returned, e.g., “origin/HEAD” instead of “origin/master”. 2042957a7, d500c442magit-insert-*-branch-headerdid not account for empty commit messages. #3719magit--painted-branch-at-pointfailed in some cases, causing an error. e7e612e3c- In newer Git versions the rebase list shown in the status buffer could contain duplicated entries for the current commit. 1e1cd0e28
- When deleting a remote branch failed, the logic for deciding whether to prune the local remote-tracking ref was too loose, leading to false positives. #3650
magit-ediff-stageoffered untracked files as completion candidates even though it cannot handle those. 8dd612dfb- Fix handling of passphrase prompts which are output with leading carriage return, such as those produced by Openssh 8.0. #3843
- The default value for
magit-view-git-manual-methodwas treated as invalid. #3873 - Unlike other
magit-*-filesfunctions,magit-ignored-filesreturned paths relative to the current directory instead of the top-level of the repository. 6d3f12d58 - Staging a hunk applied the change to the wrong location in rare
cases where repetitive diff context prevented
git applyfrom finding the correct location. #3924 - Staging a hunk with no context now aborts, as staging a region within such a hunk already did, to avoid unintended and confusing results. #3924
- Adjusted many faces so that they continue to extend to the edge of the window as intended. This was made necessary by a backward incompatible change in Emacs 27. #3986
- The ability to stage regions from within intent-to-add files broke for users running Git v2.19.0 or later due to a change in the default display of these files in the diff output. #4026
magit-stash-branch-hereapplied the stash without checking out the new branch. d3cee7f8c- A regression in v2.90.0 led to
magit-wip-modecommitting to “<wip prefix>/refs/heads/HEAD” rather than “<wip prefix>/HEAD” when on a detached head. - Modifying a file, marking it with a “skip-worktree” or “assume
unchanged” bit, and then modifying it again triggered a failure in
magit-wip-commit-worktree. #4037 magit-abbrev-lengthreturned an incorrect result whencore.abbrevwas explicitly set to “auto”.- Calling
magit-statusin a repository with a corrupt Git configuration didn’t propagate the error and instead preseted the directory as though it was uninitialized. #4337 - When the status buffer is not shown in any buffer but point is on a hunk, and editing and saving the respective file causes, that hunk to disappear or change, then Magit ended up changing point in the file-visiting buffer. #4196
- Various bug fixes to
magit-branch-delete(3e73ff19d),magit--{upstream,pushbranch}-suffix-predicate(0ce7fbbc2),magit-patch-create(470272a0f),magit--cherry-spinoff-read-args(add276810),magit-refs--insert-cherry-commits(3b37e6dc1),magit--{pushbranch,upstream}-suffix-predicate(cef3b1217),magit-diff-insert-file-section(01cf0c165),magit-insert-unpushed-to-upstream-or-recent(02445d6e3),magit-ref-equal(46862d9d2),magit-ref-fullname(66b85daea),magit-insert-unpulled-from-upstream(0363e9bac),magit-git-version(0abc761f5),auto-revert-buffers--buffer-list-filter(713bd64bf),magit-insert-revision-gravatar(1f7e84c26),magit-process-unset-mode-line(457a685e5),magit-ido-completing-read(f52ab7977),magit-file-untrack(0984d77fb),magit-ref-p(8b33bc7c7),git-commit-setup(675b75ded),magit-{,no-}skip-worktree(34d6ac27d),magit-fetch-all(904bb82ca),magit-branch-configure(7246bf291),magit--maybe-update-blob-buffer(1d57893a6),magit-...-maybe-update-...-buffer(8d3459b55),magit-read-gpg-secret-key(9d68a455d),magit-gitignore-in-subdir(8c4e8ed74),magit-save-repository-buffers(82136796f),magit-stash-drop(a4972766a),magit-ignore-submodules-p(a7699f868),magit-log-propertize-keywords(ac1ee3df5), and then I stopped adding to this list.
This release also contains numerous other bug fixes, typo fixes, and documentation fixes.
1001 Jonas Bernoulli 120 Kyle Meyer 10 Basil L. Contovounesios 9 Noam Postavsky 5 Vladimir Panteleev 4 Damien Cassou 4 Daniel Martín 4 Sam Cedarbaum 4 Štěpán Němec 3 Adam Porter 3 Benjamin Motz 3 Kévin Le Gouguec 2 Alban Gruin 2 Allen Li 2 Bastian Beischer 2 Clément Pit-Claudel 2 Daniel Fleischer 2 Evan Torrie 2 Ingmar Sittl 2 Leo Vivier 2 Martin Polden 2 Naoya Yamashita 2 Phil Sainty 2 Philipp Stephani 2 Radon Rosborough 2 Ryan C. Thompson 2 Szunti 2 Tassilo Horn 2 Thierry Volpiatto 2 Troy Hinckley 2 zilongshanren 1 Adam Kruszewski 1 Adam Spiers 1 Alexander Miller 1 Andrew Eggenberger 1 Andrew Psaltis 1 Andrew Schwartzmeyer 1 Arnau Roig Ninerola 1 Ashlynn Anderson 1 Ben North 1 Brian Leung 1 Dan Davison 1 Danny Zhu 1 David Ellison 1 Dominique Quatravaux 1 Eric 1 Fritz Grabo 1 Gregory Heytings 1 Hussein Ait-Lahcen 1 Ian Milligan 1 Ilya Grigoriev 1 Johann Klähn 1 Johannes Altmanninger 1 Jonas Galvão Xavier 1 Jonathan Arnett 1 Jonathan del Strother 1 Jordan Galby 1 Josh Elsasser 1 Justin Guenther 1 Keshav Kini 1 Kevin Brubeck Unhammer 1 Kevin J. Foley 1 Knut Olav Bøhmer 1 Magnus Malm 1 Mario Rodas 1 Martin Joerg 1 Matthew Kraai 1 Maxim Cournoyer 1 Michael Griffiths 1 Ola x Nilsson 1 Pancho Horrillo 1 Philipp Fehre 1 Pritam Baral 1 Roey Darwish Dror 1 Sean Whitton 1 Simon Pintarelli 1 Steve Purcell 1 Thomas Fini Hansen 1 Topi Miettinen 1 Tsuyoshi Kitamoto 1 Vitaly Ostashov 1 Vladimir Sedach 1 Wojciech Siewierski 1 Yann Herklotz 1 Ynilu 1 Zhu Zihao 1 zakora