Commit Graph

220 Commits

Author SHA1 Message Date
Tim Pope
46652a304f Add :GUnlink, like in eunuch.vim
This currently mirrors :GRemove, but gives us the option to add a third
variant.
2022-03-09 10:50:24 -05:00
Tim Pope
a4c6fb74ee Help file formatting fix 2021-10-16 10:43:42 -04:00
Tim Pope
8c243a7f0d Provide User FugitiveEditor event
I'm not sure if this should trigger every time the buffer is loaded, or
only on the initial split.  Arbitrarily pick the latter for now.

References: https://github.com/tpope/vim-fugitive/issues/1828
2021-09-06 15:54:37 -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
ef8e771b25 Document ++curwin 2021-09-01 09:57:26 -04:00
Tim Pope
4efb697fce Document :Ggrep -q 2021-08-31 14:59:50 -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
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
cdf60a312c Provide User FugitivePager autocommand event 2021-08-28 08:14:50 -04:00
Tim Pope
e91d17ddc2 Adjust User events for fugitive:// buffers 2021-08-24 19:16:04 -04:00
Tim Pope
199dbb1164 Fix duplicate help tag
Pretty sure basically nobody used the old usage so this is fine.
2021-08-20 19:43:52 -04:00
Tim Pope
7e53b2aef9 Update documentation for :Git 2021-08-20 17:23:28 -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
07b8277475 Move FugitiveHead() documentation to plugin file 2021-07-24 07:56:45 -04:00
Faisal Shah
8f4a23e663 Fix capitalization 2021-04-23 16:22:00 -04:00
Tim Pope
cd8bd39567 Support all <cword> style expansions
The previous implementation for <cfile> didn't handle <cfile>:h
correctly.  May as well support the rest of the gang while fixing this.
Note that unlike for % and #, these can return a commit in addition to a
file name.  Use a ":." expansion, as in "<cfile>:.", to get the
corresponding work tree file.
2021-04-07 01:04:36 -04:00
Tim Pope
f29c9e5079 Support :GBrowse {url} outside of Git repository 2021-04-04 18:26:17 -04:00
Tim Pope
a1cb01da5b Provide :Gedit - to open previous :Git output
Also, provide :GBrowse - to open the first URL contained in that output.
2021-03-29 21:20:28 -04:00
Tim Pope
7de9b5a04b Retool :Git blame colored commits
Use 3 characters of the commit hash rather than 6, limiting the maximum
total declarations to 4,096 rather than 16 million. Avoid color
components lower than 0x20 and higher than 0xdf to help avoid colors
that blend into the background, light or dark.  And for the terminal,
replace the use of CSApprox with a simple usage of the 6x6x6 color cube
found on 256 color terminals.  CSApprox aims to provide accurate
replication of the input colors, whereas our goal is simply to use all
colors in roughly equal amounts.
2021-03-25 11:34:29 -04:00
Tim Pope
caf2907fd8 Retool discard operation during conflict
The use of --theirs for Unstaged and --ours for Staged was based
entirely on the way conflicts were represented in git status --short,
except, that's backwards, the staged column contains our side of the
merge so discarding it should use --theirs.  I never noticed because I
don't use this feature.

Fixing this is guaranteed to burn anybody who learned the whole
behavior, so let's promote 2X and 3X to official status, and require
opting in to the flipped default.

Also, since --ours and --theirs only touch the worktree, the correct
analogous operations for deletion is *not* git rm, but rather to remove
the worktree file directly.  So let's do that, and add it to 2X and 3X
too.

Closes https://github.com/tpope/vim-fugitive/issues/1699

References https://github.com/tpope/vim-fugitive/issues/1648
2021-03-16 16:27:38 -04:00
Tim Pope
c63bc47c44 Remove obsolete push/fetch docs 2021-02-15 20:11:56 -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
Andreas Hunkeler
bebe504e38 Fix typo in helpfile 2020-12-17 04:13:22 -05: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
0xACE
9acced1409 Fix typo 2020-03-01 19:32:25 -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
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
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
8b83d6ec6c Use :pedit for :Git! --paginate 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
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
hitsuji no shippo
460664018a Fix typo --include-index to --keep-index in help 2020-02-05 20:25:34 -05:00
Tim Pope
22255613f7 Replace :Gcommit/:Grevert with standard job runner 2020-01-23 05:52:27 -05:00
Tim Pope
c989c1f59e Replace :Grebase/:Gmerge/:Gpull with standard job runner 2020-01-23 05:52:27 -05:00
Tim Pope
6b18f7b758 Remove :Gwrite in :Git diff 2020-01-23 05:52:27 -05:00
Tim Pope
8d6f9734c1 Use jobs for :Git 2020-01-23 05:52:27 -05:00
Chris DeLuca
dc6719e7b0 Fix :Gdiffsplit! help typo 2020-01-20 10:27:14 -05:00
Tim Pope
2ebdeef9e0 Change :Git --paginate from :terminal to temp buffer
The --paginate option to Git forces it to use $PAGER rather than its own
configuration, so it makes perfect sense for Fugitive to take on the
role of the pager.

This also removes the same behavior for --no-pager, allowing the command
to run with :! instead.  I really don't like sudden backwards
incompatible changes like this, but the old behavior was based on a bad
understanding of how these options work, and I'd rather rip the band-aid
off sooner rather than later.
2020-01-20 09:03:49 -05:00
Tim Pope
6bc345f6f1 Map cmt to :Git mergetool
References https://github.com/tpope/vim-fugitive/issues/1329
2020-01-10 20:29:58 -05:00
Tim Pope
ddd64fc4c5 Provide :Git difftool and :Git mergetool
Closes https://github.com/tpope/vim-fugitive/issues/132
2020-01-05 21:41:18 -05:00
Tim Pope
ff0eeac045 Document disabling global maps
References https://github.com/tpope/vim-fugitive/issues/1331
2019-09-05 15:36:56 -04:00
Tim Pope
eb04d8bcc0 Standardize on "maps", not "mappings" 2019-09-05 15:35:42 -04:00
Tim Pope
77a732c97c Explicitly document :Git subcommands 2019-09-04 15:11:59 -04:00
Tim Pope
64d106dfdd Remove fugitive- prefix from command help topics 2019-09-04 13:17:20 -04:00
Tim Pope
a45e2c6d57 Provide :Gr as alias for :Gread 2019-09-02 19:58:13 -04:00
Tim Pope
082a9b99e7 Remove double word in docs 2019-09-01 12:56:58 -05:00