magit-insert-{,un}staged-changes: respect magit-diff-options
pass --no-prefix to git-diff

Otherwise we wouldn't know whether there is a prefix to be stripped.
Users may, or may not, set the `diff.noprefix' Git variable.
magit-wash-diff: get file names from various diff headers

To unambiguously determine the "source" and "destination" file
names we have to parse several header lines, and then, depending
on the diff "type", use the appropriate values.
magit-apply-region: new function

Create new function `magit-apply-region' by combining code previously
in `magit-apply-hunk' with `magit-region-patch'.  That leads to a bit
of code duplication, but that's okay.
bring back magit-apply command

Other "apply variant" dispatchers such as `magit-stage' were only
limited to "diff related" section types, but `magit-apply' was
removed completely.  That was a mistake, revert it.
magit-wash-diff: support combined diffs

Support combined diffs created with argument `-c' and displayed as
"diff --combined", not just regular diff and "simplified combined diffs"
created with argument `--cc' and displayed as "diff --cc".  We will need
this once we allow showing merge commits with either `-c' or `--cc'.
magit-wash-diff: don't claim a resolved conflict is "unmerged"

When displaying a merge commit with resolved conflicts, prefix the
affected files with "resolved" not "unmerged" (which only makes
sense for diff output showing yet-to-be resolved conflicts).
magit-wash-diff: prefix new files with "new file"

This is the same prefix used by `git status',
we previously used just "new".
magit-wash-hunk: trim stored value

Only use the hunk header up to and including
the second set of @s as section value.
always fallback to magit-checkout-stage when discarding

When the user "discards" a conflict, then always offer to a side using
`magit-checkout-stage'.  Previously we only did so when acting on a file
section that was listed below the "unstaged" changes, but not when it
was listed below "staged".  Because these section really refer to the
same conflict, it does not make sense to redirect the reasonable action
in one case, while throwing up our hands in the other.

To allow this change (and others to follow) move most of the work
involved in discarding an individual file to `magit-discard-file'.
Previously it was randomly split across that function and
`magit-discard'.
magit-discard-file: handle renames
Merge branch 'n/diff-fixes' into next
.travis.xml: get all of git-modes from its next branch
magit-log-popup: bind D to --decorate

Previously "d" was used but that conflicted with `--date-order'.
magit-status-mode-map: bind h to magit-log-toggle-margin

This is the same binding as in `magit-log-mode-map'.  We should
probably find a better key (because users would expect "h" to
be bound to a help command) in both maps.  But that can wait
until later.
magit-log-section-args: doc-string cosmetics
prepare the log margin upfront

Previously, when the margin was disabled, we did not create the overlays
that make up the margin to avoid unnecessary work.  That work is not
very involved so we did not save much.  What is involved though is
having to recreate the complete log buffer when later enabling the
margin; and so it is better to do this right away.
only add a pseudo fringe to the log margin in log buffers

Then showing the log margin in a non-log buffer most lines don't have a
margin overlay and so all of the margin for these lines use the default
face.  Therefor we cannot add pseudo fringe to the margins of log lines
or it would look bad.
Merge branch 'n/log-margin' into next
magit-stage-{file,modified}: use magit-run-git

Previously `magit-call-git' was used but that was a mistake; that
function should never be used for actions that might change state
in a way that requires a refresh of the Magit buffers, because
unlike `magit-run-git' it doesn't do so.