save top directory in log commands
Merge pull request #744 from aaa707/master

save top directory in log commands
`magit--refresh-cherry-buffer': correct in-buffer documentation

The way it was worded could potentially lead people to delete branches
even though they still contained changes which should be preserved.

From the git-cherry(1) man page:
  #+begin_quote
    Every commit that doesn’t exist in the <upstream> branch has its id
    (sha1) reported, prefixed by a symbol. The ones that have equivalent
    change already in the <upstream> branch are prefixed with a minus (-)
    sign, and those that only exist in the <head> branch are prefixed with
    a plus (+) symbol.
  #+end_quote

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-cherry': pop to `magit--cherry-buffer-name' *after* reading args

Allows us to back out of a `magit-cherry' invocation without having to
do manual cleanup.  Ideal when the summer heat interferes with your fine
motor skills.

Signed-off-by: Pieter Praet <pieter@praet.org>
INSTALL.md: minor corrections

Signed-off-by: Pieter Praet <pieter@praet.org>
magit.texi: remove "Customization" chapter

I've introduced this in 64c21ea5 (merged in cb7e0235), and since
then, it hasn't been touched, except for 87857670 and d2b16f21
which fixed some typos in the documentation but not in the actual
docstrings which it's based on.

Since (a correct version of) all this information is available in
the docstrings and easily discoverable using `customize', there's
no point in leaving it to languish in the docs.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-rebase-info': update docstring

Since commit 59f46ec3, `magit-rebase-info's output list contains a
fourth element, being the SHA-1 of the commit git-rebase(1) stopped at.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-rebase-info': s/file-exists-p/file-{directory,regular}-p/

Replace `file-exists-p' with `file-{directory,regular}-p' to ensure:
- ".git/rebase-merge" is a (symlink to a) directory.
- ".git/rebase-apply/onto" is a (symlink to a) file.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-file-line{,s}': add docstring

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-file-line{,s}': s/file-exists-p/file-regular-p/

Replace `file-exists-p' with `file-regular-p' to ensure we're actually
reading from a (symlink to a) file instead of potentially blowing up
with an IO error.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-delete-branch': fail gracefully if branch = current = master

I know, people shouldn't be deleting the master branch, but that doesn't
mean we should offer to switch to it when we're already on it...

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-read-file-from-rev': run git-ls-tree(1) recursively on correct rev

Since commit c4b0ad21, `magit-read-file-from-rev' erroneously offered
completion for the files available in HEAD instead of in the supplied
revision (fixed in commit bcce594d).  Also, we were unable to select
files in subfolders due to the removal of the "-r"ecursive option to
git-ls-tree(1).

Conflicts:
	magit.el

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-highlight-line-whitespace': set ":from-end" to t

`magit-highlight-indentation' states that the *last* matching item
in the list should apply, so let's set the ":from-end" argument to t.

Signed-off-by: Pieter Praet <pieter@praet.org>
magit.el: move 'thingatpt requirement to rebase-mode.el

The function requiring 'thingatpt (`word-at-point') was introduced in
commit 25b5f6e3 and the requirement was added in commit 94c5890b to fix
byte-compilation, but when the function was replaced with
`grep-tag-default' in commit 3e38693f, the `require' remained in place.

The only remaining user of 'thingatpt functionality is rebase-mode.el,
which uses `thing-at-point' in `rebase-mode-looking-at-exec',
`rebase-mode-looking-at-killed-exec' and `rebase-mode-exec'.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-{sha1-abbrev,log-cutoff}-length' are ints, so treat them as such

Since `magit-sha1-abbrev-length' and `magit-log-cutoff-length'
are integers, the format string token should be %d instead of %s.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit--branches-for-remote-repo': simplify

By moving the bulk of the work to git-branch(1), we can do away with
some ugly string matching.  Performance-wise, it's pretty much a no-op,
but then again, I haven't been able to test it with a remote which has a
ridiculous amount of branches.

Now if only the function were actually used anywhere...
(conceived in 5bfb2164, employed in 73f25ef4, retired in 2107722b)

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-key-mode-popup-logging': remove "-ab" switch

The "-ab" switch is functionally equivalent [*] to "=b*",
so why clutter the popup with it?

[*] Try:
    $ diff <(git log --branches) <(git log --branches=*)

Reverts commit 664737c2

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-list-interesting-refs': differentiate vars in `for' clauses

Commit 992bb2f8 was a fantastic bit of cleanup, but using a different
variable name in the second `for' clause would have been even better.

Signed-off-by: Pieter Praet <pieter@praet.org>
magit.el: cleanly support aborting a merge operation

Commit 6a5289df added support for aborting a merge operation, but did so
in a rather hacky way, not to mention it broke rebasing.

Rebasing was fixed in commit 33f9372b, but still, could've been cleaner.

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-diff-working-tree': make prompt more informative

Signed-off-by: Pieter Praet <pieter@praet.org>