* Use jobs for all Git execution. Faster and less prone to user error.
* Stream :Git! to the preview window.
* Make :Git grep behave like other :Git commands, not :Ggrep.
* Silence output and open quickfix list on :Ggrep -q.
* Support :Ggrep outside repository with --no-index.
* Expand ##, $ENVVAR, and ~/path in arguments to :Git.
* Expand "%" and other special sequences during tab completion.
* Improve tab completion for :Git push.
* Disable -- More -- prompt on :Git push, fetch, and --no-pager.
* Provide FugitiveObject/FugitiveStageBlob/FugitivePager events.
* Simplify :Gdiffsplit "smart" split direction.
* Support jump to commit in :Git log --graph.
* Use local not upstream branch name for :GBrowse default.
* Better support for ssh config in :GBrowse.
* Replace older deprecation warnings with error messages.
* Assorted public API enhancements.
* Require Git 1.8.5 or newer.
* Require Vim 7.3 or newer. Full functionality requires Vim 8.1.
* Directly echo :Git output for trivial commands like "add" on Vim 7.
* Fix E1208 when loading plugin on Vim 8.2.3141.
The 0,0 solution had issues so let's go ahead and rip the band-aid off
now. The repeated get(a:options, 'curwin') && a:line2 < 0 ternary is
really gross but I estimate it to be the lowest impact change that moves
us in the right direction.
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.
I was hoping to one day introduce a new, backwards incompatible API
here, but adoption has gotten widespread enough that I think we're stuck
with it. So let's go ahead and clean up some cruft that I've verified
is not in use in any known plugin. A couple of plugins do use
repo.rev_parse(), but only inside conditionals should never be
triggered.
Uses for this are limited, but it does allow for retrieving the raw URL
before resolution, or for getting other properties from the remote's Git
config.
Also, allow FugitiveRemoteUrl(browse_opts) to directly retrieve the URL.
This came out of a refactor to return the various URL components
separately. I'm not ready to merge that, but this change feels like
enough of an improvement to merge for its own sake.
In the same way Vim requires custom commands to start with an uppercase
letter, I'm starting to think we should self-impose the same constraint
on custom ++options. Also, let's throw "Git" in there, just to allow
this to be truly unique if necessary.
This also allows a special remote argument of ".git" to refer to the
local repository. A possible use of this would be a local gitweb
handler.