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
hard require git-{commit,rebase}-mode

There really is no point in delaying telling users that they do need
`git-commit-mode` until they actually try to make a commit, because
that's like the most fundamental git operation from a user perspective.
:-)

Likewise tell users how haven't installed it yet that they need to get
`git-rebase-mode` already at startup.  Interactively rebasing isn't as
important as committing but it's important enough to make it a hard
dependency too.

Update .travis.yml (hope that works on the first try) and README.md
(while also adding some other missing dependency information).
fix travis changes in last commit

Didn't work. Was worth a shot.
here you have some semicolons, travis
remove magit-pkg.el

Turns out I was about this being required for Melpa.
See https://github.com/milkypostman/melpa/issues/971.
ignore magit-pkg.el
README.md: prominently link to curated issue list and faq

Also add additional links to issue tracker and mailing list.
partially revert 24ace98e741726d5abc47d772dc6c4b83b2d4613

".git" may not actually be a directory.  It can also be a file
containing something like:

  gitdir: ../../.git/modules/lib/git-modes

Also revert go back to "A || B" instead of "! A' && B", so that it
always succeeds.  The reverted commit made the error non-fatal but
that still resulted in an unnecessary warning.
fix d8c95a9d9b255effac4043c6201d6bb4c7315323

'RM' as a predefined Makefile variable, its default value is 'rm -f'.
The commit being fixed added this 'RM ?= rm -rf'; which cannot have
any effect.

Instead use the predefined 'RM' and add 'RMDIR ?= rm -rf' for when
we actually remove a directory.
Makefile: put ../git-modes on load-path

Abuse 'EFLAGS' to put ../git-modes on the `load-path'.  This is
a tempory hack.  For obvious reasons is does not always work.
Makefile: add BATCHE
Makefile: fix elisp indentation
Makefile: avoid noise by suppressing vc
magit-set-default-diff-options: suppress warning

Variable `magit-diff-options' is not defined yet when
`magit-set-default-diff-options' is first called because it is used to
set its initial value while it is being defined.  However the part of
the function that causes the warning is not used to do so.  By the time
that part is used the variable is also defined.
use -r to toggle --amend in the committing popup

Previously -a was previously used but because in Git -a means --all
we cannot have it mean something else in Magit.

See issue #783.