Tim Pope
b8ba07f7d8
Improve flexibility of public API argument order
...
This allows tomfoolery like FugitiveConfig(dir)->FugitiveConfigGet(key).
I'm not sure I want to officially endorse this usage, but if nothing
else it makes interactive debugging a bit more fluid.
2021-08-08 00:48:27 -04:00
Tim Pope
f58ac20359
Generalize FugitiveIsGitDir() to check for buffer Git dir
2021-08-08 00:48:08 -04:00
Tim Pope
55382eb722
Fix usage of index()
2021-08-07 16:19:02 -04:00
Tim Pope
2ee6a48d0b
Apply insteadOf to raw remote URLs in addition to remote names
...
This also retools FugitiveRemoteUrl() argument handling to be a bit more
flexible.
2021-08-07 15:51:07 -04:00
Tim Pope
8def00c247
Homogenize calls to private exec helpers
...
Replace calls of the form f(dir, arg1, arg2) with f([dir, arg1, arg2]).
2021-08-07 15:51:07 -04:00
Tim Pope
8082606fd0
Fix direct usage of fnameescape()
...
I plan to lower the minimum Vim version back to 7.0 before shipping 3.4,
which means we can't assume the presence of fnameescape().
2021-08-07 15:51:07 -04:00
Tim Pope
2dc08dfe35
Rename and relocate s:TempCmd()
2021-08-06 22:00:55 -04:00
Tim Pope
a25d4d6961
Fix read command output into buffer with guioptions=!
2021-08-06 21:35:43 -04:00
Tim Pope
2d0f51679c
Accept git_dir dict key in FugitivePrepare()
2021-08-06 21:35:43 -04:00
Tim Pope
99e65ce049
Fix error message generation in s:ReplaceCmd()
2021-08-06 21:35:43 -04:00
Tim Pope
ebc828ef7c
Minimize use of combined stdout and stderr
...
Combined stdout and stderr is what system() gives us, so the plugin was
built around it. But getting the same from jobs is annoying, so let's
eliminate all unnecessary uses of it.
2021-08-06 17:57:57 -04:00
Tim Pope
dc579a0dfb
Don't trust git --version with nonzero exit status
...
This prevents parsing `zsh:1: command not found: git` as version "1:".
References: https://github.com/tpope/vim-fugitive/issues/1801
2021-08-06 17:28:33 -04:00
Tim Pope
e9f913ff8a
Fix error message for system() failure with argument list
2021-08-05 17:29:02 -04:00
Tim Pope
3a5d8c8770
Tighten check for PowerShell to match Vim's behavior
...
Vim only checks for the lowercase "powershell", so we should do the
same.
2021-08-05 17:27:41 -04:00
Tim Pope
1da2c02421
Add Vim version constraint to new PowerShell support
...
Closes https://github.com/tpope/vim-fugitive/issues/1807
2021-08-05 16:29:40 -04:00
Tim Pope
7a087725ee
Encourage FugitiveFind() over FugitiveGitDir()
2021-08-03 11:45:25 -04:00
Tim Pope
24fd3d9599
Eliminate use of ":write !"
...
This is a prerequisite of eliminating the use of the shell in favor of
direct execution via jobs.
2021-08-03 11:45:25 -04:00
Tim Pope
058ffa406d
Fix determining Git version with custom Git command
...
Resolves: https://github.com/tpope/vim-fugitive/issues/1801
2021-07-29 08:25:05 -04:00
Tim Pope
11aee0ba82
Fix incorrect readfile() arguments
2021-07-28 15:53:56 -04:00
Tim Pope
c417518819
Use absolute path to /usr/bin/env
...
Based on the prevalence of /usr/bin/env shebangs, I trust it is safe to
hard code this. Or at least, it's safer than trusting the user not to
create a script called env.
2021-07-27 15:35:35 -04:00
Tim Pope
93f25f6883
Fix omitted Git dir argument
...
This shouldn't matter in this context since it's designed only to
provoke an error message, but fix it anyways so it stops setting off
mental alarm bells.
2021-07-27 15:35:35 -04:00
Tim Pope
a41329ab7c
Get remote URL with config rather than shelling out
2021-07-27 15:35:35 -04:00
Tim Pope
5f87622277
Add methods to config object
...
Do not rely on these. The FugitiveConfigGet() family of functions
remains official, for now.
2021-07-26 12:04:52 -04:00
Tim Pope
6bacc1039c
Decouple s:SystemError() from Git
...
Treat lists not as Git arguments but a generic argument list, to enable
avoiding the shell once this becomes job backed.
2021-07-26 12:04:52 -04:00
Tim Pope
d6edaf7a4d
Document autocommands
2021-07-26 07:09:30 -04:00
Tim Pope
af5ba43aa3
Reference plugin file as canonical API documentation
2021-07-26 07:09:30 -04:00
Tim Pope
8b0a40dfa2
Remove "soft" qualifier from deprecated commands
2021-07-26 07:09:30 -04:00
Tim Pope
8820f3f89c
Document FugitiveRemoteUrl()
2021-07-26 07:09:30 -04:00
Tim Pope
7ab4ab9796
Document FugitiveGitDir()
2021-07-26 07:09:30 -04:00
Tim Pope
295780c507
Tweak phrasing of FugitiveConfig() family documentation
2021-07-26 07:09:30 -04:00
Tim Pope
07b8277475
Move FugitiveHead() documentation to plugin file
2021-07-24 07:56:45 -04:00
Mike Williams
75b2a9a8da
Improve PowerShell support with recent Vim
...
References: https://github.com/tpope/vim-fugitive/pull/1783
2021-07-24 07:28:07 -04:00
Dmytro Meleshko
a7c54990f0
Don't execute autocmds during :GBrowse with range
2021-07-21 18:23:26 -04:00
Tim Pope
de6495ae84
Better support for ssh config
...
* Respect User and Port in addition to Hostname.
* Support globs and negations in addition to literal host matching.
* Parse global config file in addition to user config file.
* Handle Include declarations.
References: https://github.com/tpope/vim-rhubarb/issues/65
2021-07-17 18:52:27 -04:00
Tim Pope
58516a13c6
Support expanding ## as argument list
...
Closes https://github.com/tpope/vim-fugitive/issues/1792
2021-07-16 18:38:00 -04:00
Tim Pope
1c2663f516
Use :echomsg for deprecation warnings
...
Resolves: https://github.com/tpope/vim-fugitive/issues/1789
2021-07-12 15:56:27 -04:00
Tim Pope
b5316d0e96
Avoid stepping on status window in :Gclog/:Gllog
...
Closes https://github.com/tpope/vim-fugitive/issues/1790
2021-07-12 15:49:14 -04:00
Tim Pope
e9f93be356
Generalize :GBrowse - to all temp buffers
2021-07-12 15:49:14 -04:00
Tim Pope
fd5b553029
Tighten loose regexp
2021-07-12 15:49:14 -04:00
Tim Pope
3e2d531322
Fix error parsing worktree out of config
...
Resolves: https://github.com/tpope/vim-fugitive/issues/1788
2021-07-11 23:12:13 -04:00
Tim Pope
4cdeff8c33
Remove unnecessary -complete on command with no arguments
...
References https://github.com/vim/vim/pull/8544
2021-07-11 11:33:31 -04:00
Tim Pope
7412370dc8
Don't assume unrecognized status headers are refs
...
Every time I experiment with adding a new header this burns me.
2021-07-10 17:56:29 -04:00
Tim Pope
78d41a014e
Don't abbreviate :vertical
...
Change the :Gvdiffsplit definition so that we're consistent with <mods>.
And make everything else consistent with that.
2021-07-10 17:49:17 -04:00
Tim Pope
957d962e06
Error when core.worktree expected but missing
2021-07-09 12:52:20 -04:00
Tim Pope
f920245d6b
Avoid spurious window resizing in :Gdiffsplit
...
Closes https://github.com/tpope/vim-fugitive/issues/1787
2021-07-09 12:52:20 -04:00
Elias Norrby
5551853f34
Fix ternary expression in s:NullError
...
Only the leading part was removed in ae6f84a .
Fixes #1785
2021-07-08 08:59:46 -04:00
Tim Pope
b498607aa7
Don't assume FugitiveGitDir() is actual directory
...
This is currently a valid assumption, but it boxes us in. Instead use
fugitive#Find('.git/'), which is guaranteed to return a path to an
actual directory.
Also use fugitive#Find('.git/refs/..') to determine the common
directory.
2021-07-05 16:45:54 -04:00
Tim Pope
0ec3bb2bdd
Use cwd to find Git repository for terminal window
...
Closes https://github.com/tpope/vim-fugitive/issues/1520
2021-07-05 16:45:54 -04:00
Tim Pope
d11c90ad66
Save filenames from rename rather than splitting on " -> "
2021-07-04 10:36:49 -04:00
Tim Pope
ca03f1d069
Fix write in index with guioptions=!
2021-07-04 10:36:49 -04:00