Instead of magit-post-refresh-hook, which fires much more frequently.
Updating vc across all buffers is expensive, so let's only do it when we
quit magit.
Warning: this may make quitting magit expensive when you have many
buffers open. Still searching for a better solution.
Full column is a bit tempermental. This also removes the need to restore
the window config after quitting magit.
Why the switch from full-frame magit to current-buffer? It is the least
intrusive policy; it doesn't rearrange the user's workspace.
The old policy was to invoke magit in fullscreen, but in practice, I've
found myself wanting to peek at other buffers (maybe even notes) while I
manage my project in version control.
So this change introduces two big changes and one fix:
+ Instead of a full-frame policy, we use full-column. e.g. Invoking
magit-status will take up a full column of windows (and will restore
them when you quit).
+ Popups are displayed below the current window if called from a magit
buffer, otherwise as a popup at the bottom of the frame.
+ Fixes popups opening in a random window if called from a magit buffer
in a popup.
This is only a start and needs more testing.
+magit-display-buffer-fullscreen is a more sophisticated (albeit
experimental) replacement for magit-display-buffer-fullframe-status-v1,
which fullscreens magit, but will also:
a) Keep the status window visible
b) Treat magit buffers not opened from magit-status as popups
Must be enabled on a per-project basis. You can change this behavior by
setting +magit-hub-enabled-by-default to non-nil (before magit is
loaded).
Magithub has been made opt-in because:
1. Magithub is imposing, asking the user for a token, especially for
users who don't use github (much or at all), but may occasionally
have a project with a github remote.
2. magithub is really slow on first load for medium-to-large repos.
3. It's really easy to enable it through the magithub popup (H C e).
magithub.enabled is saved into the project's .git/config file, so the
setting will persist.
Also added a docstring to +magit-hub-features
Ensures magit buffers are cleaned up after magit-status is closed. Will
defer cleanup on process buffers, until the processes have finished.
Also fixes issue where quitting magit will leave leftover windows.