Commit Graph

1882 Commits

Author SHA1 Message Date
Tim Pope
2a53d79248 fugitive.vim 3.4
* 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.
v3.4
2021-09-02 13:03:27 -04:00
Tim Pope
2e395fa450 Provide FugitiveDidChange() 2021-09-01 19:20:46 -04:00
Tim Pope
46404ad937 Enforce 'autowrite' in all subcommands 2021-09-01 19:20:46 -04:00
Tim Pope
2f3cd4715d Remove :Gcgrep
This was a hedge in case I decided to go all in with symmetry with
:Gclog.  I have decided to to.
2021-09-01 19:20:46 -04:00
Tim Pope
90ef74fddd Fix :Git difftool on Vim 7 2021-09-01 18:40:29 -04:00
Tim Pope
ebc7ddac6d Fix :Ggrep on Vim 7 2021-09-01 18:36:52 -04:00
Tim Pope
8bdbbf88a4 Change :Gstatus to error stub 2021-09-01 17:39:28 -04:00
Tim Pope
ef8e771b25 Document ++curwin 2021-09-01 09:57:26 -04:00
Tim Pope
a7d224bfd1 Support :Git ++curwin blame % 2021-09-01 09:57:26 -04:00
Tim Pope
46a4387054 Change :0,1Git blame to split by default
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.
2021-09-01 09:42:30 -04:00
Tim Pope
3d30a2a6d3 Expand ~~ as cwd
This is a hedge to allow a way to force a cwd path even if the
handling of "./" ever changes.
2021-09-01 08:48:41 -04:00
Tim Pope
254cc8e81d Tab complete !bufnr 2021-09-01 07:54:47 -04:00
Tim Pope
5b0a4af8fc Improve fallback go-to-file in temp buffers 2021-08-31 23:19:31 -04:00
Tim Pope
b96e1a3967 Update :Gpush FAQ entry to mention :Git! 2021-08-31 17:51:46 -04:00
Tim Pope
a5d997fe8b Pre-expand argument when completing Git objects 2021-08-31 17:51:46 -04:00
Tim Pope
8920453f5d Return full ref name on FugitiveHead(-1) 2021-08-31 17:51:46 -04:00
Tim Pope
2016ce1db4 Fix check for maps disabled by dictionary
Resolves: https://github.com/tpope/vim-fugitive/issues/1822
2021-08-31 16:33:21 -04:00
Tim Pope
2b37219021 Fix check for -addr=other on nvim
I arrived at 0.4.0 by blaming the documentation, but apparently the
feature didn't land until later.
2021-08-31 16:33:21 -04:00
Tim Pope
9ace6c6aca Expand :GMove and :GRename arguments 2021-08-31 14:59:50 -04:00
Tim Pope
4efb697fce Document :Ggrep -q 2021-08-31 14:59:50 -04:00
Tim Pope
97505a4c37 Expand :(literal)./ arguments to use cwd 2021-08-31 14:59:50 -04:00
Tim Pope
3e032f295f Clean up job dictionary entry after nvim job completes 2021-08-31 14:59:50 -04:00
Tim Pope
0d8dc0f31c Add stdin support to FugitiveExecute() 2021-08-31 13:49:39 -04:00
Tim Pope
cabcbc263a Further tweak to direct :Git blame count handling
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.
2021-08-31 12:27:29 -04:00
Tim Pope
404f8a2d34 Replace #ReloadStatus() with #DidChange() 2021-08-31 12:02:17 -04:00
Tim Pope
30bf224453 Fix direct blame maps in short files
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.
2021-08-31 12:01:21 -04:00
Tim Pope
328501d4f0 Make "q" error maps consistent 2021-08-31 12:01:21 -04:00
Tim Pope
b64c426fd2 Try :Git for default dispatch in status buffer
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.
2021-08-31 06:59:37 -04:00
Tim Pope
d6e1a57b58 Accept a dictionary in fugitive#RemoteHttpHeaders() 2021-08-31 06:59:37 -04:00
Tim Pope
6b546f37d0 Better HTTP redirect detection
These HTTP headers may have other :GBrowse applications, so if we're
parsing them, we may as well hang onto them.
2021-08-30 09:25:52 -04:00
Tim Pope
dfd7be2294 Fix error on :GBrowse remote/branch@remote 2021-08-29 16:32:22 -04:00
Tim Pope
10b44345b0 Extend :Gdiffsplit zero argument positioning to ">" arguments
And change the jump to file map to use it, eliminating the behavior
change there (at least for now).

Resolves: https://github.com/tpope/vim-fugitive/issues/1821
2021-08-29 12:15:51 -04:00
Tim Pope
acfcb068ed Don't append another filename when expanding ">commit:file"
This opens up the possibility of using ">" to navigate to a renamed
version of a file, for example.
2021-08-29 12:14:55 -04:00
Tim Pope
6f0ff0ed00 Favor ssh:// URL over scp style when possible
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.
2021-08-29 12:13:14 -04:00
Tim Pope
a6be4a301c Limit size based :Gdiffsplit orientation to no argument variant
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.
2021-08-29 03:53:21 -04:00
Tim Pope
c9aaf78541 Force :leftabove for :Gdiffsplit! with argument
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.
2021-08-29 03:53:21 -04:00
Tim Pope
d523feebe9 Respect 'splitbelow' on :Gdiffsplit with argument
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.
2021-08-28 11:47:13 -04:00
Tim Pope
4603d77424 Provide :Gdiffsplit ++novertical
Maybe one day we can kill :Ghdiffsplit.
2021-08-28 11:47:13 -04:00
Tim Pope
6b7892dc7b Fix edge case in s:Map() short circuiting
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>.
2021-08-28 11:47:13 -04:00
Tim Pope
cdf60a312c Provide User FugitivePager autocommand event 2021-08-28 08:14:50 -04:00
Tim Pope
385c0fb4ee Use <cfile> not <cword> for temp file "." map
Also, skip over that "+" that marks work-tree branches in :Git branch
output.
2021-08-28 08:14:50 -04:00
Tim Pope
4f747add5e Support jump to commit in :Git log --graph 2021-08-27 11:28:45 -04:00
Tim Pope
18fd27e2cc Provide slightly less bad "." map in temp buffers
Doing this right isn't on the horizon, so hack up something that's
better than nothing.
2021-08-27 11:28:45 -04:00
Tim Pope
fa5892dcac Map "(" and ")" in blame buffers
For symmetry with the other buffers.  A nice enhancement would be to
jump between distinct commits but this is good enough for now.
2021-08-27 11:28:45 -04:00
Tim Pope
46a2f58e1d Provide utility function to expire cached config
This is primarily for troubleshooting, but might also be handy for
users of includeIf.
2021-08-27 11:28:45 -04:00
Tim Pope
126363be5a Tweak Vim 7 more prompt behavior 2021-08-26 13:35:55 -04:00
Tim Pope
4ff2c8ce30 Disable -- More -- prompt on push/fetch
These commands have slow, potentially verbose output, especially in the
case where pushing triggers a real time deploy.
2021-08-26 10:11:25 -04:00
Tim Pope
5aa8a3489e Directly echo :Git output for a few trivial commands on Vim 7
If this works out, we can change the status buffer to directly call
:Git rather than routing through FugitiveExecute().
2021-08-26 10:11:25 -04:00
Tim Pope
ad8c1c80cc Work around hostile ftplugin/man.vim
References: https://github.com/neovim/neovim/issues/15487
2021-08-26 09:12:20 -04:00
Tim Pope
7e21d414a8 Trigger FugitiveChanged after writing stage buffer
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
2021-08-25 22:56:12 -04:00