Tim Pope
783ec701fe
Work around 'suffixes' in :Git completion
...
Closes https://github.com/tpope/vim-fugitive/issues/1682
2021-02-21 14:54:43 -05:00
Tim Pope
d1e74ac267
Move :Git --paginate helper function into :Git section
2021-02-20 21:59:03 -05:00
Tim Pope
eb4d75efb6
Fix :Gedit worktree-file
...
Closes https://github.com/tpope/vim-fugitive/issues/1679
References https://github.com/tpope/vim-fugitive/issues/1667
2021-02-19 18:47:13 -05:00
Tim Pope
0a35937003
Provide error message when Netrw can't be loaded
2021-02-16 21:04:13 -05:00
Tim Pope
c63bc47c44
Remove obsolete push/fetch docs
2021-02-15 20:11:56 -05:00
Tim Pope
d6809e9ee4
Use stderr for in-band job communication
...
Since stdout can contain arbitrary user data, let's touch it as little
as possible. When using a pty, this has no effect, as everything goes
through stdout, but I aim to move handle --paginate with this same
pipeline, and that will not use a pty.
2021-02-15 20:11:56 -05:00
Tim Pope
15f32b0008
Guard against diff.noprefix in commit buffers
2021-02-15 20:11:56 -05:00
Tim Pope
d4bcc75ef6
Remove dispatch.vim backed fetch and push
2021-02-12 18:35:28 -05:00
Tim Pope
0cc2190889
Add deprecation notices to git subcommand wrappers
2021-02-12 18:35:28 -05:00
Tim Pope
4c5f6fcaf5
Retire old :Gsplit! family of temp buffer commands
2021-02-12 13:49:07 -05:00
Tim Pope
5c821eb78d
Don't default to work tree on :Gedit invalidref:file
...
Closes https://github.com/tpope/vim-fugitive/issues/1667
2021-02-11 17:05:05 -05:00
Tim Pope
8cf0cf5bfb
Emphasize poor quickfix performance in docs
...
References https://github.com/tpope/vim-fugitive/issues/1662
2021-01-25 22:44:03 -05:00
Tim Pope
7afa1cfaa6
Avoid presenting verbose command output as error
...
References https://github.com/tpope/vim-fugitive/issues/1643
2020-12-07 18:59:28 -05:00
Tim Pope
7bcfe539be
Avoid window shenanigans if :diffoff restores options
...
Closes https://github.com/tpope/vim-fugitive/issues/1634
2020-11-27 09:40:22 -05:00
Tim Pope
866ecfff4e
Enable Help: header
...
This change was inadvertantly omitted from
d2abfca08f .
References https://github.com/tpope/vim-fugitive/issues/1513
2020-11-24 02:01:39 -05:00
Tim Pope
1a77f1c00e
Recover from deleted temp script
...
Closes https://github.com/tpope/vim-fugitive/issues/1616
2020-10-26 20:31:54 -04:00
Tim Pope
89e6b5e4e1
Disable 'swapfile' early
...
This should eliminate the need to disable 'swapfile' in
fugitive#BufReadCmd(), but I'm inclined not to fix what isn't broken.
Closes https://github.com/tpope/vim-fugitive/issues/1598
2020-10-11 20:42:35 -04:00
Tim Pope
4189bdb580
Don't override user :G
...
Closes https://github.com/tpope/vim-fugitive/issues/1607
2020-09-29 20:31:08 -04:00
Tim Pope
e12236b60a
Fix reference to renamed function
...
Closes https://github.com/tpope/vim-fugitive/issues/1606
2020-09-27 06:05:05 -04:00
Tim Pope
8080407ae9
Provide public diff closing function
...
Closes https://github.com/tpope/vim-fugitive/pull/1587
2020-09-26 12:21:52 -04:00
Tim Pope
49315d0c74
Fix :Gwrite DWIM in commit messages
...
Closes https://github.com/tpope/vim-fugitive/issues/1599
2020-09-24 07:32:12 -04:00
Tim Pope
4824b5b3fe
Avoid empty string keys to prevent Vim 7 error
...
Closes https://github.com/tpope/vim-fugitive/issues/1113
2020-09-24 03:49:23 -04:00
Tim Pope
260182c65c
Support partial staging after git add -N
...
Closes https://github.com/tpope/vim-fugitive/issues/1567
2020-07-30 21:36:29 -04:00
Tim Pope
9b6a24b131
Fix tab complete for :Git push --option
...
Closes https://github.com/tpope/vim-fugitive/issues/1570
2020-07-27 19:57:50 -04:00
Tim Pope
1da7c133b1
Recommend :Git log over :Gclog
...
Closes https://github.com/tpope/vim-fugitive/issues/1556
2020-06-27 16:39:43 -04:00
Tim Pope
27a5c3abd2
Trigger OptionSet on automatic :diffoff
...
Closes https://github.com/tpope/vim-fugitive/issues/1545
2020-05-31 00:50:49 -04:00
Tim Pope
03fa78141e
Improve weird :Ggrep --column quickfix title
2020-05-31 00:50:49 -04:00
Tim Pope
f1a75478cb
Tighten syntax highlighting for SHA
2020-05-31 00:50:49 -04:00
Tim Pope
0646a53c6b
Add Help: header
...
Closes https://github.com/tpope/vim-fugitive/issues/1513
2020-05-31 00:50:49 -04:00
Tim Pope
d2abfca08f
Refactor run loop
2020-05-31 00:50:49 -04:00
Tim Pope
e87fe092a2
Extract s:RunEdit()
2020-05-31 00:50:49 -04:00
Tim Pope
caf3b1d569
Don't default :Git grep to --column
...
If you want this, you can pass --column yourself, or set the grep.column
config option. This is probably going to change for :Ggrep, too.
2020-04-24 23:05:39 -04:00
Tim Pope
f17a91d010
Provide completion relative to working directory
2020-04-24 23:01:38 -04:00
Tim Pope
5dfe8581ca
Extract :Ggrep/:Glgrep wrapper function
2020-04-24 23:01:38 -04:00
Tim Pope
92ad06f70d
Use parameterized Git dir when completing heads
2020-04-24 23:01:37 -04:00
Tim Pope
05bbfcd0dc
Remove commit entry from :{range}Glog
2020-04-21 13:44:34 -04:00
Tim Pope
85e2c73830
Favor :Ggrep over :Git grep
...
I'm starting to think :Git grep shouldn't be special cased.
Occasionally it is desirable to see grep results without clobbering the
quickfix list.
Reserve -O/--open-files-in-pager to opt into quickfix behavior, as this
fits well with Fugitive's use of a temp buffer as the Git pager.
2020-04-12 11:47:38 -04:00
Tim Pope
f5391f0bfc
Fix race condition resuming job after editor invocation
...
Closes https://github.com/tpope/vim-fugitive/issues/1489
2020-04-12 11:47:38 -04:00
Tim Pope
53dd9b3957
Encapsulate update-index --index-info
2020-04-08 04:06:24 -04:00
Tim Pope
792f51a58b
Leverage Git config retrieval helpers
2020-04-08 02:51:55 -04:00
Tim Pope
a9bf9de61d
Move Quickfix section under Git section
2020-04-08 02:51:55 -04:00
Tim Pope
9a4d730270
Drop support for :{windowheight}Git
...
Ever since Vim gained -addr=, it's been impossible to define a command
that accepts both marks like '< (requires -addr=lines) an and a count
that's beyond the end of the file (requires -addr=other). This means
:Git needs to pick sides between :'<,'>Git blame and :{windowheight}Git
log, and the former is much more important than the latter.
2020-03-12 10:23:56 -04:00
Tim Pope
4a24804adc
Rewrite feature summary in README
2020-03-10 12:46:26 -04:00
Tim Pope
5ad42e307f
Factor in 8.2.0239 when checking for job env support
2020-03-10 12:46:26 -04:00
Tim Pope
68f570ec38
Enable closing stdin by pressing CTRL-D
...
This provides a way to use commands like :Git hash-object --stdin
without a PTY, which is not to say that there are any such commands that
one would actually want to use. It also has debugging applications.
2020-03-10 12:46:26 -04:00
Tim Pope
12e43b62cc
Don't use "Head:" header for commit under cursor
...
This is the first line of the file so it's an annoyingly aggressive
default.
2020-03-10 12:46:26 -04:00
Tim Pope
ffd7042c15
Fix echoed line during :Gread
2020-03-10 12:46:26 -04:00
Tim Pope
dbc8d9a32c
Fix list indexing bug
2020-03-05 13:21:50 -05:00
Tim Pope
e06005a742
Fix staging hunk that comes after binary file
...
Closes https://github.com/tpope/vim-fugitive/issues/1462
2020-03-05 08:43:03 -05:00
Tim Pope
8388b6d0fb
Use status headers for commit maps
...
Closes https://github.com/tpope/vim-fugitive/issues/1485
2020-03-04 10:30:20 -05:00
Tim Pope
7ae214e445
Fix erroneous temp buffer on non-listing :Git branch
2020-03-03 09:36:04 -05:00
Tim Pope
3c3e6ea67b
Support most top level Git options
2020-03-02 04:24:26 -05:00
Tim Pope
5d7516d3c1
Don't override alternate implementations of legacy commands
...
This is primarily intended so users can define their own :Gpush and
:Gfetch when they lose their :Dispatch backed async.
2020-03-02 04:24:26 -05:00
Tim Pope
8aaf744f2a
Don't rely on rebase --autosquash shorthand
...
I'm starting to think this is more confusing than helpful.
2020-03-02 04:24:26 -05:00
Tim Pope
d102dd92fd
Fix :GRename ../
...
Closes https://github.com/tpope/vim-fugitive/issues/1481
2020-03-02 02:40:09 -05:00
Tim Pope
3bd69748c3
Remove remaining :Gsubcmd calls from implementation
2020-02-29 22:37:57 -05:00
Tim Pope
abb4a26c1e
Fix internal documentation command references
2020-02-29 22:37:57 -05:00
Tim Pope
3e59a79e48
Move :Ggrep docs near other :Gcommands
2020-02-29 22:37:57 -05:00
Tim Pope
e84f023edf
Remove redundant exists(':Gblame') check
...
This command used to be restricted to file and blob buffers, but now
it's global, not to mention deprecated, and the check serves no purpose.
2020-02-29 22:37:57 -05:00
Tim Pope
d0dceb9feb
Change subtopic help tag style from :Git- to :Git_
...
This is less Git-like, but a bit more Vim-like, and doesn't force us
into the awkward :Git---paginate.
2020-02-29 22:37:57 -05:00
Tim Pope
025151bc78
Fix deletion of trailing fold upon loading blob
...
Closes https://github.com/tpope/vim-fugitive/issues/1479
2020-02-29 22:37:45 -05:00
Tim Pope
aada6479cf
Use :Gsubcmd completion for :Git subcmd
2020-02-29 07:38:35 -05:00
Tim Pope
6b40e51008
Remove most uses of s:EchoExec()
...
This function was intended to avoid the press ENTER prompt for brief
output, but the new :Git job based runner now does that more
effectively. Remove all old uses of it except the U map, which I am
electing to keep quiet on older versions of Vim.
2020-02-29 07:38:35 -05:00
Tim Pope
c452181975
Remove old :Git! temp buffer behavior
...
Rip the band-aid off now so we can reclaim it for something else sooner
rather than later.
If you're trying to support both old and new versions of Fugitive,
exists('*FugitiveConfigGetAll') will be true on versions where
--paginate is supported. In a pinch you can also swap in :Gsplit!, but
that's eventually going away too.
2020-02-23 18:10:47 -05:00
Tim Pope
430253c302
Drop support for non-PTY :!
...
The experience without a PTY is pretty lackluster, and if you're using a
GUI or Windows, there's probably nothing stopping you from upgrading to
a version of Vim with job support.
2020-02-23 18:10:47 -05:00
Tim Pope
a5c921190a
Override existing config values on :Git -c config.option=
2020-02-23 15:41:10 -05:00
Tim Pope
31629d8bd1
Use :read for :{range}Git! --paginate
2020-02-23 00:26:37 -05:00
Tim Pope
5a5a95b90a
Tease apart bang and non-bang variants of :Gread
2020-02-23 00:26:36 -05:00
Tim Pope
87f998e15f
Remove erroneous :Gedit! deprecation
...
The ! to :Gedit has always been passed to :edit and not used for Git
execution like the others.
2020-02-22 20:56:27 -05:00
Tim Pope
2acea41bef
Handle custom Git executable for :Git --paginate
2020-02-22 20:14:33 -05:00
Tim Pope
c0aad3ac78
Update internal uses of :Git! to :Git --paginate
2020-02-22 20:14:33 -05:00
Tim Pope
8b83d6ec6c
Use :pedit for :Git! --paginate
2020-02-22 20:14:33 -05:00
Tim Pope
efb1c8a29d
Add - map for Push header
2020-02-22 20:14:33 -05:00
Tim Pope
2e67f82b79
Refine handling of pagination via temp buffer
...
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
2020-02-18 21:00:01 -05:00
Tim Pope
a81ba999e8
Correctly treat config keys without values as true
2020-02-18 20:59:50 -05:00
Tim Pope
cb1300d751
Deprecate :Gsplit! family in documentation
2020-02-18 20:59:49 -05:00
Tim Pope
d10dc9ea93
Quarantine deprecated commands in documentation
2020-02-18 14:09:24 -05:00
Tim Pope
2401f1a7da
Work around minibufexpl/autochdir induced error
...
Closes https://github.com/tpope/vim-fugitive/issues/1456
2020-02-18 12:33:58 -05:00
Tim Pope
9bbbb65888
Add capitalized versions of non-standard commands
...
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.
2020-02-17 14:50:09 -05:00
Tim Pope
9f69019424
Partially support :Git difftool on old Git
2020-02-15 20:18:15 -05:00
Tim Pope
98f67310aa
Parameterize subcommand Git executable
2020-02-15 20:18:09 -05:00
Tim Pope
0e6f72b005
Allow custom subcommands outside of Git repository
2020-02-05 14:40:22 -05:00
Tim Pope
e144a9f559
Extract helper for setting job environment
2020-02-05 14:40:22 -05:00
Tim Pope
df3ac9d278
Enable opening arbitrary URLs with :Gbrowse
...
This is still doing a lot of unnecessary processing looking for a
remote, but it doesn't seem to hurt anything.
2020-02-05 14:40:22 -05:00
Tim Pope
3c45ed0d13
Fix false positive on deprecated :.Glog usage
2020-02-05 14:27:27 -05:00
Tim Pope
a95972cefc
Don't clobber alternate buffer on :Gstatus
2020-02-05 12:48:47 -05:00
Tim Pope
18582f4986
Remove deprecated C map to fix broken warning
...
https://github.com/tpope/vim-fugitive/issues/1458
2020-02-05 12:48:47 -05:00
Tim Pope
083f3c23cc
Preserve existing 'scrollbind' arrangement with :Gblame
...
Closes https://github.com/tpope/vim-fugitive/issues/1449
Closes https://github.com/tpope/vim-fugitive/issues/1327
2020-02-03 11:25:49 -05:00
Tim Pope
9ecd6ebf92
Eliminate last temporary :cd
...
The new git_chomp and git_chomp_in_tree aren't 100% backwards
compatible, but these functions are deprecated anyways. Use
system(FugitivePrepare(...)) instead.
2020-02-03 10:17:37 -05:00
Tim Pope
3221cdfbde
Support :Git -c config.name=value
2020-02-02 15:31:02 -05:00
Tim Pope
8e90d82eb4
Use --no-optional-locks for :Gstatus
...
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.
2020-02-01 10:49:35 -05:00
Tim Pope
1c1014a046
Continue running commands on Vim exit
...
Closes https://github.com/tpope/vim-fugitive/issues/1447
2020-01-30 13:01:17 -05:00
Tim Pope
268a9c1b8f
Don't make assumptions about current line number when displaying commit
2020-01-26 17:39:32 -05:00
Tim Pope
fc0199555e
Extend nvim carriage return workaround to ptys
...
References https://github.com/tpope/vim-fugitive/issues/1445
2020-01-26 15:37:02 -05:00
Tim Pope
d926e3beb4
Try to wipe out temp buffer from :read
...
Also try to preserve marks.
2020-01-26 10:57:19 -05:00
Tim Pope
40872a9555
Don't use job pty unless Vim supports it
...
Closes https://github.com/tpope/vim-fugitive/issues/1444
2020-01-26 08:01:34 -05:00
Tim Pope
279d56eb47
Show unpulled before unpushed
...
This is what Magit does and I *think* it makes sense because you have to
pull before you can push.
2020-01-26 07:24:02 -05:00
Tim Pope
54b308eedb
Revert work in progress changes
...
This partially reverts commit cd7db1d57c .
2020-01-26 07:24:02 -05:00
Tim Pope
655f7c92f3
Show unpushed and unpulled sections for both upstream and push
...
References https://github.com/tpope/vim-fugitive/issues/1436
References https://github.com/tpope/vim-fugitive/issues/1172
2020-01-25 20:34:28 -05:00
Tim Pope
477f26cf50
Include refs/heads in constructed push commands
...
Also swap out :Gpush for :Git push while we are at it.
2020-01-25 20:20:02 -05:00