I want to reclaim :0,1Git blame for :split, since we can use that even
with -addr=other, so go ahead and add 0,6 as our backwards compatible
way to force :edit.
Patch 8.1.560 is the gift that keeps on giving. Let's work around this
for now by bolting on a new behavior to the previously unused :0,0Git
blame. Long term, we probably want to come up with a different
interface.
The downside of this approach is it has a different interaction model
than the quickfix list. The upside is that it's more or less what I
actually want. To those finding this wondering why it's now
synchronous, you can make it asynchronous by pressing CTRL-D.
This is much easier to deal with on other end, so if a :GBrowse provider
doesn't care about relative scp paths, allow them to ditch the scp
parsing entirely.
I don't think anybody liked this except for me. This brings :Gdiffsplit
one step closer to :diffsplit. The no argument version will probably be
removed eventually as well, but let's take it one step at a time.
After receiving feedback, I have decided that the forced direction is
what most people expect, so let's limit our :diffsplit matching to the
non-bang variant, for now at least.
When calling :Gdiffsplit with no argument, we always end up with the
work tree version as half of the diff, and it is helpful to position
that consistently. I generalized this to a consistent older versus
newer ordering when given an argument, but I don't think that has proven
very useful in practice.
This also introduces a minor behavior change where calling the bang
variant in the initial commit now loads an empty version of the buffer,
rather than falling back to the work tree.
When called with multiple modes, don't bail after the first disabled
mode.
This also restructures in a way to allow for transition to :exe s:Map(),
which will provide the correct line number on :verbose map <whatever>.
I deliberately omitted this event when adding FugitiveChanged, because I
figured it made sense for consumers to instead tap into BufWritePost to
see which file changed exactly. This would enable, say, vim-gitgutter,
to only refresh signs for the file that actually changed, rather
than for every file in the repository. In practice, however,
vim-gitgutter doesn't even bother with "in the repository", let alone
the exact file, opting instead to refresh every loaded buffer. I give
up.
Resolves: https://github.com/tpope/vim-fugitive/issues/1819
When given an argument list including --no-literal-pathspecs and a
buffer number, convert the buffer number to an argument by prepending
":(top,literal)" to the filename rather than "./". This allows
operating on file names that include special characters like "*" and
"?".
We use the Git dir for a few purposes:
* Direct filesystem access.
* Passing to Git as --git-dir=.
* Embedding in fugitive:// URLs.
* Referring to the repository without otherwise using it.
As a start to teasing these apart, introduce s:GitDir() to handle the
first 2 cases, s:DirUrlPrefix() for the 3rd case, and keep using s:Dir()
as a generic reference.