magit-refresh-buffer: remove unused internal variables
magit-restore-window-configuration: default to t
use --filter instead of cl-find{,-if}
magit-merge-warn-dirty-worktree: shorten doc-string
rename magit-{branches => refs}-buffer-name-format

When the branch-manager wazzup modes were merged into the new refs mode,
this variable was not adjusted accordingly.  We now adjust the symbol
name, value and doc-string.
remove magit-set-variable-and-refresh

Remove `magit-set-variable-and-refresh' which was used to set
various Custom options and the refresh some Magit buffers using
`magit-refresh-all'.  That no longer worked as expected because
the latter function now only refreshes Magit buffers in the current
repository.  So this function only had an effect in the repository
at ~/.emacs.d.
magit-auto-revert-mode-lighter: set :type custom property
change custom group of highlight options

Change the Custom group of options `magit-highlight-whitespace',
`magit-highlight-trailing-whitespace' and `magit-highlight-indentation'
from `magit' to `magit-diff'.
magit-restore-window-configuration: change custom group

Change `magit-restore-window-configuration's custom group from
`magit-modes' to the toplevel `magit'.  This is an important option
affecting everything.  It should therefor be featured very prominently.
magit-auto-revert-mode: change custom group

Change `magit-auto-revert-mode's custom group from `magit-modes' to the
toplevel `magit'.  Yes this is implemented as a mode, but it also is an
extremely important option with far reaching consequences, so it should
be featured very prominently.
magit-wip-ref-format: correct custom group
magit-wip: correct doc-string
magit-diff-options: correct custom group

Put `magit-diff-options' in Custom group `magit-popups' instead of
`magit'.  Do *not* put it in `magit-diff' because all equivalent
variables are currently placed in `magit-popups'.

(All of these variables, except for this one, are named
`magit-...-popup-defaults'.  We don't change the name of this variable
because the convention also isn't good.  All of these variables,
including this one, will be renamed at the same time).
magit-log-section-args: correct custom group
magit-popup-use-prefix-argument: correct custom group
magit-ellipsis: update doc-string, group and position

`magit-ellipsis' is no longer used in logs only.  Adjust the
doc-string and Custom group accordingly.  Also move the definition.
magit-ellipsis: define value literally

Now that we explicitly set the coding system
to utf-8 we can safely insert such characters.
magit-{diff,commit}-show-diffstat: new options

The new options replace the old shared variable `magit-show-diffstat'.
magit-{diff,commit}-show-xref-buttons: new options

The new options replace the old shared variable
`magit-show-xref-buttons'.
add custom group magit-commands

Add a new Custom group for options that control the behavior of certain
commands, and for which no other suitable Custom group exists.

Many of these options tune the behavior of commands that *create*
commits.  These options were previously placed in the `magit-commit'
group, but that group is for functionality related to the inspection
of *existing* commits.  The other options were previously placed in
`magit-modes' group, which is wrong because none of them have directly
to do with any of the various major modes provided by Magit.

An alternative to creating `magit-commands' would have been to place
these options in `magit', but I would prefer to reserve that for options
with "global" effects, the exact opposite of what these the options in
question do.