Merge branch 'sane-client'
fix previous commit
fix previous two commits
further improve magit-with-emacsclient
magit-commit-internal: when tagging use TAG_EDITMSG
Makefile: add 'authors' target

Commits a9ed908a/59fd7f6d removed the majority of our contributors'
copyright statements due to the maintenance overhead involved in
keeping it accurate and up to date.

However, besides being in violation of the GPL, this is rather
discourteous towards our contributors, considering all the time and
effort they've expended to improve Magit for the good of us all.

Also, if left in its current state, it's only a matter of time before
people start adding copyright lines again, and "who's maintainer" or
"who committed the most" are inherently transient metrics, so at some
point in the future, the list would need to be revised again, manually,
in every file, no matter what.

Fortunately, this can be easily solved by directly crediting only a
single entity and consolidating its constituents into an auto-generated
"AUTHORS.md" file that covers the entire project, allowing us to properly
credit our contributors as well as permanently retiring the Copyright
Cleaner hat.

- - -

I've globally replaced the copyright headers with a copyright statement
crediting "The Magit Project Developers" (do note that this is *not*
equivalent to "copyright assignment") with the correct copyright year(s),
a pointer to the "AUTHORS.md" file, and an "Author:" line, of which the
value was procured using:

  for i in *.el ; do
      printf "%s\n  %s\n\n" \
          "${i}" \
          "$(git log --pretty=format:'%h : [%ai] %aN <%aE>' -- "${i}" \
             | tail -n 1)" ;
  done

An exception was made for "magit-wip.el", which was introduced by
Ryan C. Thompson (commit b877584e) but Jonas Bernoulli coded pretty
much the whole thing (commit 5e2e992b and later).

Files containing code borrowed from other projects (specifically
"magit-blame.el" and "magit-compat.el") now state the relevant
projects' names, URLs and licenses, right below the "Author:" line.

The Makefile now contains targets which use git-log(1) to generate an
unabridged list of our contributors' names and email addresses, which
is combined with "AUTHORS.md.in" and written to "AUTHORS.md", which is
always included when rolling tarballs and installing.

To prevent incomplete/duplicate/outdated/erroneous authors' names and
email addresses, a ".mailmap" file was created, which is automatically
picked up by git-log(1) when using %aN/%aE instead of %an/%ae.

The only contributors for whom I couldn't find any conclusive info are:
- "aaa707 <aaa707b@gmail.com>"
- "acple <silentsphere110@gmail.com>"
- "rabio <rabiodev@o2.pl>"
...so these are included as-is.

And thus the only maintenance overhead left to keeping this list up to
date is running "make authors" and committing the updated "AUTHORS.md"
file, right before tagging a new release.

Signed-off-by: Pieter Praet <pieter@praet.org>
AUTHORS.md: auto-generated using 'make authors'

Signed-off-by: Pieter Praet <pieter@praet.org>
Specify the argument of verify-visited-file-modtime

On some Emacs version (24.3.1 in Debian) verify-visited-file-modtime
will fail when tramp is used, and the optional argument is omitted or
nil. fixes #808
magit.el: remove `git-commit-commit-function' declaration

Obsolete since magit/git-modes@e0763fdc.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-assert-emacsclient': s/tramp-file-name-p/tramp-tramp-file-p/

Running `magit-interactive-rebase' in a repo over TRAMP resulted in:

  $ git --no-pager rebase -i foo^
  fatal: Terminal is dumb, but EDITOR unset
  Could not execute editor
  git exited abnormally with code 1.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-interactive-rebase': pass more specific ACTION to `magit-assert-emacsclient'

We only need emacsclient(1) when rebasing *interactively*, so
don't needlessly discourage the user from using ordinary rebase.

Signed-off-by: Pieter Praet <pieter@praet.org>
Merge pull request #810 from praet/sane-client-fixes

sane-client fixes
Merge pull request #809 from praet/attribution-v4

Attribution v4
magit-save-some-buffers: add optional TOPDIR argument
magit-buffer-switch: add optional SWITCH-FUNCTION argument

This allows using this function in `magit-status' which until now
had to duplicate some of the functionality of this function.
magit-buffer-switch: detect magit buffers using derived-mode-p

Previously a regular expression ("magit") that matched to
much ("^\*magit" would have been more appropriate) was used to detect
such buffers based on their names.

This changes how the current buffer effects switching to a magit-mode
buffer:

- Buffers whose name begins with "*magit" but do not derive from
  `magit-mode' (e.g. "*magit-process*") are now treated as non-magit
  buffers.

- Buffers visiting magit libraries (e.g. "magit.el") are now treated
  as what they are "non-magit" buffers.
fix handling of magit-restore-window-configuration

When option `magit-restore-window-configuration' is non-nil
`magit-quit-window' restores the "previous window configuration" after
quitting the window and burying the buffer.  That configuration is
stored by `magit-buffer-switch'.

Until now the previous configuration was stored everytime
`magit-buffer-switch' was called, even if the buffer already existed
or even was already visible in the current frame.  This could lead to
`magit-quit-window' being unable to actually quit the window.

Now the previous configuration is only saved when it makes sense and
as an additional precaution `magit-quit-window' sets it to nil after
using it.
`magit-remove-conflicts': `delete-dups' from ALIST before populating hash table

When a member of `magit-repo-dirs' is a parent/child/duplicate of one of
the other members, ALIST will contain duplicate key-value mappings, and
because of the way `magit-remove-conflicts' tries to uniquify the keys,
it will keep recursing on those associations until their keys are the
canonical path to the repo, after which it blows up because it can no
longer extract a higher-level directory to prefix them with.

Fixes #811 and #311.

Signed-off-by: Pieter Praet <pieter@praet.org>
Merge pull request #814 from praet/magit-remove-conflicts-fix

`magit-remove-conflicts': `delete-dups' from ALIST before populating hash table
Magit now requires GNU Emacs 23.2 or greater

The decision to officially the support for older versions of Emacs was
unanimously reached here: https://github.com/magit/magit/issues/708.

Actually the old claim in README.md that Magit works with GNU Emacs 22.1
was wrong.  Some features of Magit *might* have worked with that version
but a lot of things would not have.

Remove some old (and incomplete) backward compatibility definitions.

Since it is possible (while unlikely) that some users have successfully
used Magit with Emacs 22 in the past and because we are removing code
that might previously have allowed using a subset of Magit add a version
check to magit.el.

Check that the minimal version requirement is satisfied; else raise an
error.  It is better to raise an error at this point than to have late
adapters figure out on their own why Magit stopped working with their
beloved ancient Emacs.  I would also rather have people complain about
this decision than having them file bug reports about things that
stopped working - in which case we might fail to notice right away that
the breakage is causes by the use of an older Emacs.

This check will also cause an error when XEmacs is used (as XEmacs isn't
at 23.2 yet, and likely will never be).  The same arguments apply here
than the ones made above regarding old versions of GNU Emacs.