magit-revert-buffer: remove incomplete comment

Remove half truth about why we are not reverting an indirect buffer.
Sure, as the comment said, that would revert the parent buffer; but
the reason we don't want that is relevant: we would end up doing it
twice.  We *could* extend the comment, but then again there are many
things we could add a comment for.
magit-revert-buffer: change order of two conditions

The conditions whose positions are switched are both rather cheap.
By switching them all the "unless reverting would destroy something"
are now located next to each other without an unrelated condition
in between.
magit-revert-buffer: use more appropriate conditionals
magit-revert-buffer: do not revert untracked files
Merge branch 'revert-buffer'
magit-buffer-file-name: properly deal with symlinks

This fixes #922.
magit-run-git-gui-blame: by default don't require confirmation

Instead require a prefix argument to allow selecting another revision
and/or file.  This was requested in #787.
magit-read-file-from-rev: fix when not at repository root

Previously `magit-read-file-from-rev' read a filename relative to the
current directory, but since callers expect a filename relative to the
repository root, that did not work when the two are not identical.
Merge branch 'quick-blame'
Fix typo in magit-insert-unpushed-cherries

pulled -> pushed
Merge pull request #984 from mgalgs/typo

Fix typo in magit-insert-unpushed-cherries
magit-refresh-buffer: make sure BUFFER is non-nil

In `magit-refresh-buffer' make sure BUFFER is non-nil, instead of
using `current-buffer' instead of BUFFER.  This makes using that
buffer nicer than just passing BUFFER or else `current-buffer' to
`with-current-buffer'.
magit-refresh-buffer: reduce nesting
magit-refresh-buffer: update commit marker later

In `magit-refresh-buffer' call `magit-refresh-marked-commits-in buffer'
right after `magit-highlight-section'.  Therefor call it becomes the
very last step of refreshing; however the real point is not to do it
in between some unrelated steps (which are related to each other, just
not the commit marker).
magit-refresh-buffer: actually sync point in other windows

`magit-refresh-buffer' did already attempt to update the "window local"
point in other windows showing the same buffer.  However it failed to
request all such windows from `get-buffer-window-list'; it only
requested windows of the current frame, which in most cases equals to
the selected window.  Now we process windows from all frames.

This fixes the special case mentioned by me in issue #687.  At least
in most cases, that is when this function is *actually* called.
magit-refresh-buffer: remove bogus entry from window-buffer

In `magit-refresh-buffer' remove bogus entry from the list returned by
function `window-buffer', which effectively did throw away all the work
done further up in this function.

In most cases this did not happen because there was no such bogus entry
in `window-buffer'.  However when a command did move to some other
buffer and did only then refresh the buffer we ended up with such an
entry.  The entry is created when switching away from the buffer.
Refreshing is done by first erasing the buffer and then rebuilding it
from scratch.  Erasing the buffer causes the markers in the entry to
become invalid and since we have already switched away from the buffer
earlier then rebuilding the buffer contents neither creates a new entry
nor updates the markers in the existing entry.

This fixes issue #687.
magit-refresh-buffer: also restore the window-start

This fixes the issue of which #978 is a special case.
Merge branch 'pr/window-point'
define unrecord-window-buffer if Emacs doesn't have it
fix "pasto"