magit-default-rev: always respect NO-TRIM argument

Previously this was only done when a commit could be found at point but
not when we had to use `magit-guess-branch'.
add magit-add-change-log-entry{ replacing -no-option}

Add command `magit-add-change-log-entry' replacing the less flexible
`magit-add-change-log-entry-no-option'.  This is done by duplicating
the (trivial) prefix argument handling from `add-log-change-log-entry'.
magit-add-change-log-entry-other-window use magit...entry

Define `magit-add-change-log-entry-other-window' using
`magit-add-change-log-entry' instead of interactively calling
`add-change-log-entry-other-window'.

This makes the use of the macro `magit-visiting-file-item' unnecessary.
We will take advantage of that in the next commit.
remove macro magit-visiting-file-item

Remove the macro `magit-visiting-file-item'.  Since the last commit only
one use of the macro remains.  By doing the same thing *without* the use
of a macro we remove a blackbox.
magit-add-change-log-entry: don't use a marker

In `magit-add-change-log-entry' stop using a marker when remembering the
buffer and position is enough.  The use of a marker would have been okay
if it had been disposed of after use, but that wasn't the case.
move magit-section pseudo getters into the struct section

When a `magit-section' struct represents a `diff' or `diffstat' section
more information has to be stored inside the struct than for other
section types.  Currently this is done by storing a list in the `info'
slot.

They right way to implement this would be to add additional slots to
the `magit-section' struct and just not use them for the other types,
that don't need them.

But because the `info' slot is used to uniquely identify specific
section this is not currently possible.  Doing so would require complex
refactoring elsewhere. I have already attempted to do so, it requires
changes all over the place.

Instead, for now, move the `diff` and `diffstat` specific pseudo slot
getters below the definition of the struct.
move definition of magit-hunk-item-target-line

Move the definition of function `magit-hunk-item-target-line' below
its only caller `magit-visit-file-item'.

Previously it was define in the "Diffs and Hunks" section, but since
that is about washing and this function has nothing to do with that
defining it there was not correct.
`magit-stage-all': make confirmation optional

Signed-off-by: Pieter Praet <pieter@praet.org>
`magit-unstage-all': make confirmation optional

Signed-off-by: Pieter Praet <pieter@praet.org>
magit-tests.el: fix `magit-status-staged-all' test

Commit d02460cd added a confirmation prompt to `magit-{,un}stage-all'
but didn't update the `magit-status-staged-all' test accordingly,
causing it to fail.  As a result, all Travis CI builds are currently
marked as being broken.

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

* magit.el (magit-process-sentinel): Double space to end sentence.
  (magit-merge-abort): Add space at end of `yes-or-no-p' prompt.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
collect apply functions in a common section

Collect all concrete (type specific) implementations of
`magit-apply-item' in the same section "Acting">"Apply"; where
`magit-apply-item' and one of the type specific implementations,
`magit-apply-commit', were already defined.

Actually moved are `magit-apply-diff-item', `magit-apply-hunk-item',
`magit-apply-hunk-item*', and `magit-apply-hunk-item-reverse', which
were all previously defined in "Diffs and Hunks">"(apply)".
split "Diffs and Hunks" section in two

Split the toplevel section "Diffs and Hunks" into two new toplevel
sections.

* New "Diff Options" is concerned with the arguments passed to `git
  diff' to tune some details.  This is related to "washing" insofar as
  it effects the output being washed - but the act of toggling options
  does not change the fact that washing has to be able to deal with all
  of the options we provide.

* New "Diff Washing" only contains functionality directly related to
  the washing of diffs.  It fills the same role as the existing "Log
  Washing", just for diff output, not log output.  "Hunk" no longer
  appears in the section heading, because it is obvious that washing
  a diff involves washing hunks.
move definition of magit-wash-diff

Place the definition of `magit-wash-diff' in between the definitions of
`magit-wash-diffs' and `magit-wash-other-file'.  `magit-wash-diffs' is
the only caller of the other two functions.
merge three preliminary subsections of "Hunks and Diffs"

Merge the preliminary subsections "wash diffs", "wash diffstats", and
"wash top-section" into just one subsection "wash diffs".  Now that some
cleanup in this area has happened it is no longer helpful to keep them
separate.  Also the splitting wasn't really correct.

The functions in this subsection still need to be sanitized.  How
functionality is split between appears to somewhat arbitrary.
disband preliminary section "(hunk refinement)"

Move `magit-toggle-diff-refine-hunk' into "Diff Options", has it is
concerned with the highlevel aspect of the user turning this off or
on.  Do to the actual work it used the below functions.

Move `magit-diff-{,un}refine-hunk' into the "(wash hunks)" section.
give subsections of "Diff Washing" better names
Merge branch 'spread-Diffs'
add "Log Line Struct" subsection to toplevel "Log Washing"
add "Section Struct" subsection to toplevel "Sections"