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
and https://emacsair.me/2017/09/01/campaign-articles.

Magit v2.12.0 Release Notes
===========================

Released 29th March 2018 by Jonas Bernoulli.

I am pleased to announce the release of Magit version 2.12.0,
representing 610 commits by 30 contributors over six months.

Also see https://emacsair.me/2018/03/29/magit-2.12.

Upcoming breaking changes
-------------------------

* An upcoming release will remove support for older versions of Emacs.
  It isn't yet certain in what Magit release that will happen and what
  the new minimal version of Emacs will be.  You should consider to
  update to the latest Emacs release now, or at least to v25.1, which
  was released one and a half years ago.

* Likewise support for older versions of Git is going to be removed.
  You should update to at least v2.4, which was released almost three
  years ago.  Older releases don't get security updates anymore, which
  is another reason to update.

* The option `magit-no-confirm-default' has been demoted to a variable
  and will be removed in v2.13.0.  Please migrate your customizations
  to the new option `magit-dwim-selection'.  #3232

Changes since v2.11.0
---------------------

* Added new commands `magit-previous-line' and `magit-next-line' as
  substitutes for `previous-line' and `next-line'.  Magit's selection
  mechanism is based on the region but selects an area that is larger
  than the region.  This causes shift-selection to select two lines on
  the first invocation when using the vanilla commands.  On section
  headings and inside hunk bodies the new magit-specific variants
  don't move point on the first invocation and thereby they only
  select a single section or line.  Which inconsistency you prefer
  is a matter of preference.  #2912

  To use the Magit-specific variants add this to your init file:

    (define-key magit-mode-map [remap previous-line] 'magit-previous-line)
    (define-key magit-mode-map [remap next-line] 'magit-next-line)

* The command `magit-refs-popup' now remembers arguments and they are
  displayed in the header-line of `magit-refs-mode' buffers.  The popup
  command still invokes the default action by default when invoked from
  another buffer, but when invoked from a `magit-refs-mode' buffer it
  now shows the popup.  #2898

* The module overview section now shows a hash for modules that don't
  have a tag and column alignment is optimized.  #3160

* The diff that is being displayed while committing learned about a
  few more special cases.  #3095

* Added new command `magit-branch-or-checkout' as a potential
  substitute for `magit-checkout'.  Setup instructions can be found in
  the manual.  #3104

* Added new customizable options `magit-log-highlight-keywords' and
  `magit-diff-highlight-keywords', which control whether text inside
  brackets is highlighted in magit-log and magit-diff buffers
  respectively.  #3190

* When the names of Magit buffers are not uniquified then their names
  now end with an asterisk.  When the `uniquify' package is used, then
  that still is not possible due to limitations in that package.  #2841

* When selecting a fixup target then the log graph, which makes it
  less likely that you attempt to modify a merged commit, which would
  result in the merges being lost when rebasing.  c0209c74d

* Added the existing commands `magit-blame' and `magit-blob-next' to
  the `magit-file-popup' popup.

* Added new command `magit-blame-reverse'.  See the updated manual
  for information on how to best use this and other blaming commands.
  #3055

* Keywords in brackets are now being highlighted in `magit-refs-mode'
  and `git-rebase-mode' buffers, and the headers of `magit-status-mode'
  buffers, like they already were in logs.  #3179

* Added new variable `magit-buffer-lock-functions' to support
  third-party packages in creating Magit-like buffers.  #3191

* Improve padding of head-line and add new faces `magit-header-line-key'
  and `magit-header-line-log-select'.  #3194

* When a stash has a note attached to it, then show it in the
  `magit-stash-mode' buffer.  aff2fba8f

* Added new command `magit-rebase-remove-commit' to the rebase popup.

* The remote popup can now be used to set various remote related
  variables.  #3165

* Added new commands `magit-patch-apply' and `magit-patch-apply-popup'.
  The latter is available from inside `magit-am-popup' ("w").  #2940

* Added new command `magit-patch-save' for saving a diff into a patch
  file.  In diff buffers it is bound to "C-x C-w".  #2950

* Added new command `magit-stash-branch-here', which — unlike the
  existing `magit-stash-branch' — creates a branch that starts at
  the current HEAD instead of at the commit that was current when
  the stash was created.  #2935

* Added new command `magit-dired-log' intended to be bound in
  `dired-mode-map'.  #3011

* The list of rebase actions displayed in the status buffer now also
  shows "exec" actions.  #3003

* While it exists, the stash created by `git rebase --autostash' is
  now also displayed in the list of stashes.  #3146

* When the current branch has no upstream or when all commits have
  already been pushed there, then the status buffer now shows
  `magit-log-section-commit-count' recent commits.  If you previously
  used `magit-insert-unpulled-from-upstream-or-recent', then remove
  that from `magit-status-sections-hook', as it is an obsolete alias
  for `magit-insert-unpulled-from-upstream' now.  #3227

* When switching between showing "Unmerged into <upstream>" and
  "Recent commits", preserve the visibility of that section.  #3227

* When prompting for a branch to delete, the current branch is no
  longer offered as default choice, except in cases where it is likely
  that that is actually what the user wants.  #2924

* Added new popup `magit-worktree-popup' and bound "%" to it.  #2927

* The commands `magit-file-delete' and `magit-file-untrack' now act on
  the selected files and with a prefix argument they force the action.
  #2930

* When requesting the history of a single file that is no longer being
  tracked, use the `--full-history' argument.  Otherwise no history at
  all would be shown.  #3012

* Added new option `magit-patch-save-arguments'.  #3218

* Leading tabs in files no longer cause misalignment in diffs.  This
  is done by overriding the mechanism used by the display engine to
  determine how wide a tab should be, which doesn't work when there
  are additional characters before the "leading" tabs that should
  count as an additional, but very short tab-stop.  #3185

* The command `magit-visit-ref' now drops the prefix argument before
  calling `magit-show-commit' when appropriate, and when using the
  `create-branch' variant and the branch exists, then it offers to
  simply checking it out instead of resetting it first.  #3009

* The output of `magit-list-repositories' is now sorted by module path
  instead of module name.  b6f6cf4a6

* For a long time Magit has supported selecting two or more sibling
  sections using the region and then acting on that selection instead
  of only on the current section.  Single-section selections were not
  supported and a region that did not span multiple siblings was not
  visualized as a selection.  Now that is supported.

  Not every section-aware command was adjusted to take single-section
  selections into account because in many cases that would have led to
  undesired changes in behavior.  #3026

* The command `magit-branch-spinoff' now spins off just HEAD when that
  constitutes the single-section selection.  Previously one could only
  spin off all commits that weren't in the upstream yet or at least
  two commits.  #2920

* Added switch `--local-user' to the tag popup.  #3237

* When discarding untracked files, then offer to delete the buffers
  visiting them.  #3243

* When there is a valid selection based on the region, then the region
  itself was never visualized.  Now it is, but only if it stays within
  a single line.  #3249

* Added new command `magit-branch-checkout' and bound "l" in the
  branch popup to it.  This command always checks out a local branch.
  Valid inputs are an existing local branch, a remote branch for which
  no corresponding local branch exists, and a new branch name that
  doesn't match the name of any existing local or remote branch.  #2906

* The command `magit-show-commit' now offers the revision at point as
  the default completion choice if the less generic mechanisms used to
  determine the "current" revision fail.  This is useful for visiting
  revisions mentioned in commit messages.  #2949

* Hashes inside commit messages are now turned into `commit' sections.
  Note that this can be disabled and that even if you do so you can
  still visit the commit at point using "RET".  #2949

* The documentation regarding completion, confirmation, the selection,
  and the hunk-internal region was significantly extended.  It might
  be worth reading that.

* Added new option `magit-dwim-selection', which allows configuring
  commands that would otherwise ask the user to select among possible
  candidates to use the default instead, with or without confirmation.
  #3232

* When there is a stash at point, then the commands `magit-stash-drop'
  and `magit-stash-pop' now ask for confirmation.  The former command
  previously allowed users to select another stash instead and the
  latter used to act on the stash at point without giving the user a
  chance to abort.  These changes are implemented using the new option
  `magit-dwim-selection' and can easily be reverted.  #2916

* Aborting a commit is seen as an error by Git and like all such
  errors it was reported to users, which led to confusion and a few
  bug reports.  Now that non-error is being suppressed.  #2932

* The option `magit-ref-namespaces' was demoted to a variable and its
  format changed.  #2923

* Some refs that are being displayed in logs are now being compressed
  to save space while providing more information.  #2923

* Added new option `magit-submodule-fetch-jobs'.  By default multiple
  modules are being fetched in parallel now.  #3261

* The command `magit-show-commit' now also shows notes specified using
  `notes.displayRef', not just those specified using `core.notesRef'.
  #2857

* The package `magit-popup' is maintained in its own repository now.
  4d5d9bfac

* The popup `magit-notes-popup' now shows the values of the relevant
  variables and allows changing them.  #2857

* The cherry-picking commands now try to use or not use the
  `--mainline' argument as appropriate instead of erroring out.  #2980

* Added `magit' as an alias for `magit-status' because I have been
  told that that improves discoverability.  This might or might not
  make it easier for users to get started with Magit without taking
  a brief glimpse at the documentation.  #3290

* The command `magit-log-buffer-file' now also works in Dired buffers.

* The commands `magit-stage-untracked' has been taught about the Borg
  package manager.  When staging a package repository it now offers to
  also assimilate (aka install) that package.  dc857e2ed

* Added new command `magit-browse-pull-request', which reads an open
  pull request and then visits it in a browser.  For now this only
  supports Github, but other Git forges will be supported in the
  future.  #3134

* Added new commands `magit-checkout-pull-request' and
  `magit-branch-pull-request' to the branch popup.  For now they only
  support Github, but other Git forges will be supported in the future.
  #3134

* The command `magit-branch-delete' now offers to also delete the
  corresponding remote after deleting a local branch that was created
  with `magit-branch-pull-request' or `magit-checkout-pull-request',
  provided that remote has no other tracking branches.  #3134

* When it is not possible to blame in reverse, then the blame popup
  does not offer that command anymore.  c6ef61b2e

* The mode line process indicator, displayed in the mode line when Git
  is run for side-effects, is now more visible than before, and is
  additionally used to highlight process errors.

  New face `magit-mode-line-process' is applied to the mode line
  process indicator to improve the visibility of pending asynchronous
  processes (in particular), as Magit remains responsive after
  initiating such commands (for instance fetching or rebasing), but
  will not update its buffers until the process has completed, which
  might take longer than anticipated.  Customize this face if you wish
  to make this indicator more (or less) visible.  #3284

  If the Git process returns an error, the mode line process indicator
  is no longer removed, and new face `magit-mode-line-process-error`
  is applied to highlight the error status.  Details of the error from
  the process buffer are also provided as a tool-tip.  The error
  indicator will remain visible in the mode line until a magit buffer
  is refreshed.  If you do not want errors to be indicated in the mode
  line, customize the `magit-process-display-mode-line-error' user
  option.  #3297

* When staging and unstaging at the file level and there are arguments
  that cause whitespace differences to be hidden, then apply the
  visible changes using `git-apply' instead of using `git-add' and
  `git-rm' because doing that would also un-/stage the invisible
  changes.  #3102

* Added new command `magit-diff-visit-file-other-window'.  It isn't
  bound by default because that would result in changes to existing
  key bindings, which is something that is frowned upon.  To use this
  command add something like this to your init file.  #2833

    (define-key magit-file-section-map (kbd "SPC")
      'magit-diff-visit-file-other-window)
    (define-key magit-hunk-section-map (kbd "SPC")
      'magit-diff-visit-file-other-window)

* The widths of tabs in diffs can now be adjusted to match the widths
  that would be used in the corresponding file-visiting buffers.  This
  is disabled by default because it can be expensive to determine the
  appropriate values (and also unnecessary when using spaces for
  indentation).  Use the new option `magit-diff-adjust-tab-width' to
  control if and when the tab widths should be adjusted.  #2929

* Added documentation about how to contribute to the documentation.

* In the references buffer the remote part of the branch names are now
  hidden in the remote specific lists of branches by default, which is
  done to preserves space.  The option `magit-refs-show-remote-prefix'
  can be used to revert this change.

* The mode `git-commit-mode' now offers three font-lock levels,
  including one that is fruitier than the previous font-lock level.
  Local and remote branches are shown using different colors now.
  7a50bfdb0 ff

* When a signed tag points at the shown revision, then the revision
  buffer now also contains information about the tag signature.  #3015

* The commands `magit-remote-remove' and `magit-branch-delete' now
  unset the relevant push-remote related variables, which Git fails to
  do, unlike for other variable affected by the removal of a remote or
  branch. Likewise the command `magit-remote-rename' now renames such
  variables.  #2850

* Depending on the value of the new `magit-branch-rename-push-target'
  option the command `magit-branch-rename' may now also preserve the
  local branch's push-remote or even rename the push branch on the
  remote.  The default is to do both.  #2850

* Added argument `--subject-prefix' to the patch popup.  24ce90832

* The section visibility is now being cached for all sections.
  Previously this was only done for some sections.  When a section
  disappeared and later appeared again, then it went back to its
  initial visibility.  The option `magit-section-cache-visibility' can
  be used to restrict the cache to certain sections again.  #2780

* The section visibility cache can now also remember that a section
  should be expanded instead of being hidden when the latter is the
  default and the section reappears.  Previously only the opposite
  was possible.  #2780

* For `magit-status-mode' and `magit-refs-mode' buffers the visibility
  cache now persists when killing the buffer.  #2780

* Added command `magit-remote-prune-refspec', which is necessary
  because Git does not ignore invalid refspecs and instead refuses
  to fetch using only the refspecs that are still valid.  #3134

* Sections are now defined as classes instead of as structs.  This
  is only a first step towards taking advantage of generic methods.
  A few subclasses are already being defined and dedicated slot
  accessors have been deprecated in favor of `oref'. 651a9abcc ff

* When asking the user whether to save modified file-visiting buffers
  during a refresh, then also allow them to remember the choice for
  the current session.  I still think it is better to just always save
  by setting the option `magit-save-repository-buffers' to `dontask'.
  #3344

* The terminology about modules as used by Git is ambiguous.  Magit
  now avoids the term "initialized" and instead uses the term
  "populated" to refer to a module whose working directory exists.
  The names of commands have been adjusted accordingly.  For example,
  unlike "git submodule init", which does *not* actually "initialize"
  a module, `magit-submodule-popuplate' does "populate" a module
  (using "git submodule update --init").  #2911

* Most module commands now default to act on the selected modules or
  if no modules are selected the current module, if any.  Otherwise
  they fall back to read a single module from the user.  Previously
  some of these commands acted on all modules and it was not possible
  to perform the respective actions on a subset of modules.  Acting
  on all suitable modules is still possible using a prefix argument.
  #2911

* Many arguments have been added to the module popup.  #2911

* Added new option `magit-refs-filter-alist', which allows omitting
  some references from being displayed in `magit-refs-mode' buffers.

* Added new command `magit-merge-squash'.  #3348

* Several new libraries were created from code previously in magit.el.
  0d6389680

* Added new commands `magit-merge-absorb' and `magit-merge-into',
  which not only merge a local branch into another but also remove
  the merged branch.  #2922.

* Added new commands `magit-cherry-harvest', `magit-cherry-donate',
  `magit-cherry-spinout' and `magit-cherry-spinoff', which move
  commits from one branch to another and also remove them from the
  branch where they were previously located.  #2921

* Added new command `magit-diff-unmerged' and taught `magit-diff-dwim'
  about unmerged changes too.  #3382

* The command `magit-push-refspecs' got its own history variable.
  #3361

* By default the names of Magit buffers now either have a star at both
  ends, or at neither when using the `uniquify' package.  831372a4f

* Added new commands `magit-branch-shelve' and
  `magit-branch-unshelve'.  Use them to replace a branch with a less
  visible ref while preserving the ref log.  This is useful for work
  that you probably but not certainly will end up discarding.  You
  might want to add these commands to the branch popup.  568b11f64

* The look of `magit-refs-mode' buffers was changed to save horizontal
  space and three new options `magit-refs-primary-column-width',
  `magit-refs-focus-column-width' and `magit-refs-pad-commit-counts'
  were added.  #3378

* When the dispatch popup is invoked in non-Magit buffers, then certain
  actions that cannot be used there are no longer shown.  83cc91a30

* When the dispatch popup is invoked in a file-visiting buffer, then
  it now also lists the actions from the file popup.  40361273a

* Added new variable `magit-log-format-message-function'.  #3384

* Added commands `magit-commit-reshelve' and `magit-reshelve-since',
  replacing and improving upon commands from the `magit-rockstar'
  package, which was deprecated.  The former changes the dates of HEAD
  and the latter those of a range of commits leading up to HEAD.

* Added argument `--reverse' to the log popup.  When that argument is
  used, then the incompatible `--graph' is silently dropped.  07e1d69d2

* Added new option `magit-log-header-line-function'.  #3395

* Added new command `magit-remote-prune'.  6258dd92c

* Added new hook `magit-unwind-refresh-hook', which is like the
  existing `magit-post-refresh-hook' except that is runs even if an
  error occurs during the refresh.  9f838cc04

Fixes since v2.11.0
-------------------

* `git-commit-propertize-diff' could end up making the buffer
  read-only.  746f2361b

bc1093846 magit-popup: locally set help-window-select when describing function
c9689c670 magit-popup: locally set another display-buffer variable

* `git-rebase-mode-show-keybindings' failed to process non-English
  usage instructions in interactive rebase buffers.  #3175

* The refresh cache was not properly invalidated after creating a new
  repository.  7a1f1eb44

* The `with-editor-mode' minor-mode was sometimes enabled twice in the
  same buffer.  9be36868b

* For bare repositories all files were shown as being deleted in some
  contexts.  b5f05c457

* When a command was invoked from a popup and it set `this-command',
  then that was later overwritten.  a74c9b9d4

* While setting `magit-credential-cache-daemon-socket's initial value
  an error occurred when `credential.helper's value is the empty string.
  4b15d5825

* Fixup commands did not warn about merges in the rebase range until
  after creating the fixup commit.  #3176

* Instant fixup allowed selecting a commit that is not reachable from
  HEAD, which, for the instant variants (but only those), clearly is
  a user mistake that should be caught immediately.  #3176

* If `magit-git-executable' is an absolute path, then an error
  occurred in `magit-debug-git-executable'.  9b7e34c29

8ed2eb4f5 magit-branch-reset: use magit-local-branch-at-point

* The previous window configuration was not restored by
  `magit-log-select-pick' and `magit-log-select-quit'.  #3211

* When `magit-branch-spinoff' failed to perform the checkout it
  never-the-less attempted to perform the subsequent steps.  #3210

* Jumping to the correct location in a man page failed for many
  switches and options.  deb482063 ff

* The default action of `magit-branch-config-popup' was a command that
  isn't even available in the popup.  eaa836fe2

* The command `magit-branch-spinoff' didn't try to prevent the user
  from entering a string containing whitespace as a branch name.
  bd6055ab2

* The command `magit-commit' failed to commit everything after asking
  for confirmation if it is called from a subdirectory.  #3221

* The command `magit-completing-read' didn't offer any completion
  candidates.  387257f20

* In some cases an error occurred when showing the remote popup because
  the length of the remotes name was not taken into account.  a9177e5b9

* The command `magit-branch-rename' failed to rename a local branch if
  a tag existed with the same name.  #3222

* The command `magit-file-delete' ignored the prefix argument instead
  of forcing the action as intended.  0df686bfd

* Fixed a broken highlighting special case.  #3238

* When staging all unstaged changes using "s" on "Unstaged changes"
  while there also are staged changes, then the user was not asked for
  confirmation.  #3238

* When reverting a commit users are required to edit the revert
  message on some platforms but not on others.  #3239

* In a secondary worktree `magit-git-dir' failed to return a remote
  path when the repository is accessed using Tramp.  #3228

* When the user chose the default offered by `magit-patch-apply',
  then that function failed to expand the file-name so that Git would
  understand it.  ab00c5ba2

* The face `magit-graph' was also used for the commit message, which
  only was noticeable when the face was customized.  It appears that
  nobody ever did that.  47e94767b

* When `magit-branch-read-upstream-first' is nil, then the value
  returned by `magit-branch-read-args' was broken.  #3268

* Fixed encoding of non-ascii filename arguments to git on
  `windows-nt' systems.  #3250

* A bug in `magit-list-active-notes-refs' slowed down
  `magit-show-commit'.  #3275

* The command `magit-worktree-checkout' wasn't able to checkout
  arbitrary commits, just refs.  #3277

* Due to misunderstood `flyspell' implementation details
  `git-commit-turn-on-flyspell' did some unnecessary work and made
  claims that are not actually true.  24c966082

* When the git executable could not be found, then Magit often claimed
  that the user was doing something outside of a Git repository
  instead.  #3310

* The command `magit-submodule-add' always used a kludge that is
  only needed when using Ido, resulting in a unnecessary removal
  of functionality.  5e43377d2

* The function `magit-maybe-save-repository-buffers' in some cases
  needlessly redisplayed a message.  #3319

* The branch description was displayed in weird ways in a few places.
  d98c44bd7, 9003b85da

* When stashing untracked files, then the untracked files in
  subdirectories were not removed from the working tree.  #3334

* The command `magit-worktree-delete' failed to delete a worktree when
  its directory no longer existed.  #3355

* A kludge used to work around a bug in Emacs 24 prevented
  `magit-copy-buffer-revision' from deactivating the mark.  #3352

* When visiting the last blob that still had the line at point in a diff,
  then that only jumped to the correct line, but not the correct column.
  ebe3b5229

* For unpopulated modules `magit-list-submodules' showed information
  about the super-repository instead.  Now such modules are omitted.
  1c4fa9b14

* The commands `magit-am-apply-patches' and `magit-am-apply-maildir'
  did not work over Tramp because they passed Tramp file names directly
  to git.  This was fixed in a way that should prevent similar issues
  elsewhere.  #3368

* The function `magit-branch-commit-at-point' preferred tags over
  branches, which is a strange default for most callers.  f2b318856

* The arguments set in the popup were ignored when displaying tags
  in refs buffers.  ae007a757

* When `magit-diff-section-arguments' calls for it, then all
  diff-related sections are supposed to be limited to a subdirectory,
  but sections listing untracked and tracked files ignored it.  #3376

* Saving wip refs often failed because `magit-update-ref' used the
  refresh cache.  e0e1a44f3

* Buffers listing repositories using `tabulated-list-mode' did not
  preserve point when being refreshed.  2f0302635

This release also contains other minor improvements, bug fixes, typo
fixes, and documentation fixes.

Authors
-------

   500  Jonas Bernoulli
    26  Kyle Meyer
    15  Phil Sainty
    13  Alexander Gramiak
    13  Noam Postavsky
     7  Sean Allred
     4  Basil L. Contovounesios
     3  Bastian Beischer
     3  Damien Cassou
     3  Štěpán Němec
     2  Bar Magal
     2  Daniel Mai
     2  Matthew Fluet
     1  Chris LaRose
     1  Daniel Gröber
     1  Daniel Kraus
     1  David Ellison
     1  Fritz Stelzer
     1  Jim Blandy
     1  John Mastro
     1  Kenny Ballou
     1  Matthieu Hauglustaine
     1  Matus Goljer
     1  Orivej Desh
     1  Philipp Stephani
     1  Radon Rosborough
     1  Vladimir Panteleev
     1  Wilfred Hughes
     1  Wouter Bolsterlee
     1  Xu Chunyang
