Use temp buffer for output of any command for which the Git
configuration option of pager.<command> is true. Avoid using a temp
buffer if the value is false, even for commands like "show" where we
normally would. If the configuration value is present and can't be
interpreted as a Boolean, punt to a :terminal where Git will invoke it
directly.
Generate and use custom config dictionary that includes -c values passed
to :Git. This enables `:Git -c pager.status status` to correctly use a
pager.
Paginate "config", "branch", and "tag" for certain argument lists,
matching the logic found in the Git source code as closely as possible.
These 3 commands were identified as having special pagination logic by
the presence of the DELAY_PAGER_CONFIG flag on their definitions in
git.c.
Paginate "am --show-current-patch".
References https://github.com/tpope/vim-fugitive/issues/1415
The long term goal is to use :Gsomecommand for commands that wrap
Vim built-ins (e.g., :Gedit for :edit), :Git some-command for commands
that wrap Git built-ins, and :GSomeCommand for everything else. For
:GRemove, :GDelete, :GMove, and :GRename, this gives us symmetry with
eunuch.vim, and for :GBrowse, this gives us symmetry with a hypothetical
:Browse command that I've long wanted to make a plugin for but probably
never will.
:GcLog and :GlLog get their names because they match Vim's :c and :l
prefixes but bring their own custom suffix. This is rather unsatisfying
and I may change it if something better comes along.
The new git_chomp and git_chomp_in_tree aren't 100% backwards
compatible, but these functions are deprecated anyways. Use
system(FugitivePrepare(...)) instead.
This clears up some intermittent errors during :Git rebase, although I
must admit I don't really understand why, as the status reload shouldn't
be happening at the same time :Git is running.
The --paginate option to Git forces it to use $PAGER rather than its own
configuration, so it makes perfect sense for Fugitive to take on the
role of the pager.
This also removes the same behavior for --no-pager, allowing the command
to run with :! instead. I really don't like sudden backwards
incompatible changes like this, but the old behavior was based on a bad
understanding of how these options work, and I'd rather rip the band-aid
off sooner rather than later.