Commit Graph

1355 Commits

Author SHA1 Message Date
Tim Pope
427ac52d7d fugitive.vim 3.1
* Commands are now global, not buffer local.
* Calling a command in an unnamed buffer uses the working directory.
* Preserve line number on :Gedit to return to work tree buffer.
* Better submodule support in :Gstatus.
* Support git-blame revision ignoring features.
* Show first parent diff in merge commit buffer.
* Remove deprecated support for .git/tags.
* Bug fixes.
v3.1
2019-10-10 19:47:39 -04:00
Tim Pope
8c29bf1bb9 Tab complete > arguments 2019-10-10 19:45:25 -04:00
Tim Pope
ea818f1fab Include PowerShell in check for win32 shell
Closes https://github.com/tpope/vim-fugitive/issues/435
2019-10-09 11:33:53 -04:00
Marco Hinz
698065596c Fix incorrect script id (part 2)
This is a follow-up to 28abadc.

Without the \zs, everything up to the regexp for the script ID would be
used.

Now, s:function() is the same as the one used in scriptease.
2019-10-07 13:23:06 -04:00
Tim Pope
28abadcb84 Fix incorrect script id from nested function call
Closes https://github.com/tpope/vim-fugitive/pull/1370
2019-10-07 12:08:12 -04:00
Maksim Odnoletkov
a3ba0ca67f Fix status diffs broken by missing sub attribute
Fixes https://github.com/tpope/vim-fugitive/issues/1367
2019-10-05 21:25:32 -04:00
Maksim Odnoletkov
973d814e26 Rudimentary support for diff maps for submodules in status 2019-10-04 14:47:09 -04:00
Maksim Odnoletkov
a21ca7e86e Support X for submodules
Staged/[MD]:
Unstage and checkout superproject recorded version

Staged/A:
Noop. 'git rm -f' would be appropriate but it is destructive for
non-staged changes and hard to undo

Unstaged/A:
Noop. Hard to reproduce in practice, 'git status' doesn't handle it well
and hard to undo

Unstaged/[MD]:
Checkout superproject recorded version

Unstaged/[m?]:
Noop. Discarding submodules content changes is too complicated.
Workaround is to <CR> to submodule and discard from it's :Gstatus.
2019-10-04 14:47:09 -04:00
Maksim Odnoletkov
f779b90fbd Add --porcelain=v2 status parser
New submodule modifiers:

- 'M' if submodule commit is changed, otherwise
- '?' if there is modified or untracked content

Keep using v1 parser for git versions older than 2.11. This will display
'M' for any submodule changes.

Test with https://github.com/odnoletkov/git-status-test-suite

Fixes https://github.com/tpope/vim-fugitive/issues/1204
2019-10-04 14:47:09 -04:00
Maksim Odnoletkov
80aa8a9aea Fix reverse blame jump for the boundary edge case
When the line is reverse-blamed to an *immediate* child of the current
commit it is shown as `^commit` in the reverse blame output. In this
case we still need to open the child of this commit since it will be a
commit removing the line.

Closes https://github.com/tpope/vim-fugitive/issues/1359
2019-10-02 18:11:02 -04:00
Tim Pope
c9cf1b3cb2 Make remaining buffer commands global 2019-10-02 14:40:38 -04:00
Tim Pope
cfdfc1ba14 Clearer error message on attempt to delete directory
Recursive deletion is too dangerous to provide without a confirmation
prompt.

Closes https://github.com/tpope/vim-fugitive/issues/1364
2019-10-02 14:01:22 -04:00
Tim Pope
5eeb7625df Expand status file lookup into nested structure
References https://github.com/tpope/vim-fugitive/pull/1337
2019-10-01 16:19:36 -04:00
Tim Pope
4f0905e963 Preserve line number on :Gedit with no or > argument
Closes https://github.com/tpope/vim-fugitive/pull/1326
2019-10-01 15:43:12 -04:00
Tim Pope
f72ca2e6c1 Improve ++opt +cmd handling for :Gedit/:Gread 2019-09-30 20:43:16 -04:00
Tim Pope
621ffb087a Fix :'<,'>Gclog on some Vim versions
This was an attempt to get out in front of issues like
https://github.com/tpope/vim-scriptease/issues/43, but looks like it has
problems of its own.

Closes https://github.com/tpope/vim-fugitive/issues/1358
2019-09-30 19:07:04 -04:00
Tim Pope
24b463b5b3 Support REVERT_HEAD and CHERRY_PICK_HEAD 2019-09-30 17:53:11 -04:00
Tim Pope
eedfd2a570 Don't show tags warning when editing commit message 2019-09-28 11:14:30 -04:00
Tim Pope
ab26e9fdb3 Trigger User FugitiveChanged on events that change repository
Note that in the context of this event, Fugitive functions will use the
changed repository, which might not be the same as the current buffer's
repository.  Pass bufnr() as the optional dir argument to force the
current buffer.

Closes https://github.com/tpope/vim-fugitive/issues/458
2019-09-27 09:30:40 -04:00
Tim Pope
fee14c149c Don't reload status on non-Fugitive ShellCmdPost 2019-09-27 09:30:40 -04:00
Tim Pope
540d8024c2 Force status reload on commands likely to change it 2019-09-27 09:30:40 -04:00
Andrey Starodubtsev
9c91766118 Vim's redraw can change v:shell_error
If any other plugins besides `vim-fugitive` are present in user's
instance of Vim, they can call external programs to show some
properties. Redraw will force them to call this programs again and value
of last shell error can be changed.
2019-09-27 09:20:41 -04:00
Tim Pope
6eb5d8e4b2 Fix buffer local commands
Closes https://github.com/tpope/vim-fugitive/issues/1353
2019-09-26 16:20:19 -04:00
Jakub Kadlcik
0cf70ab9fc List pagure plugin 2019-09-26 14:05:58 -04:00
Tim Pope
80ef19665a Fix typo 2019-09-26 10:48:07 -04:00
Tim Pope
18893e8ca7 Use more conventional quickfix event type for :Ggrep
References https://github.com/tpope/vim-scriptease/pull/45
2019-09-26 10:46:53 -04:00
Tim Pope
1b292303c2 Encapsulate doautocmd <nomodeline> 2019-09-26 10:46:53 -04:00
Tim Pope
c1244ea7d0 Default to left, not right split for empty :Gdiffsplit filename
This only happens in weird circumstances such as when you call
:Gdiffsplit in a commit object.
2019-09-26 10:46:53 -04:00
Maksim Odnoletkov
eec184e8b0 Fix blame help maps 2019-09-26 03:56:51 -04:00
Tim Pope
417b3bb818 Fix off by 2 error staging multiple files 2019-09-22 21:30:05 -04:00
Tim Pope
edd054f76f Fix visual mode exclusion for staging on section header 2019-09-22 21:29:40 -04:00
Tim Pope
37088aaf65 Fix X on removed file
References https://github.com/tpope/vim-fugitive/issues/1343
2019-09-22 21:27:41 -04:00
Tim Pope
1d8c0a38b2 Show first parent diff for merge commits
Closes https://github.com/tpope/vim-fugitive/issues/1121
2019-09-18 21:54:22 -04:00
Tim Pope
f5a94cbc81 Reload status after Vim :terminal command
Closes https://github.com/tpope/vim-fugitive/issues/1323
2019-09-16 17:25:47 -04:00
Tim Pope
dc413818a6 Fire ShellCmdPost after :Gpush
References https://github.com/vim-airline/vim-airline/issues/1970
2019-09-16 16:32:23 -04:00
Maksim Odnoletkov
2cf584f97d Remove redundant jump when opening :Gstatus
Fixes https://github.com/tpope/vim-fugitive/issues/1333
2019-09-16 16:13:56 -04:00
Maksim Odnoletkov
26f6037de6 Reveal folds when using jump maps in commits 2019-09-11 18:13:16 -04:00
Tim Pope
35f1095f9b Expose completion helpers for subcommands 2019-09-09 19:10:24 -04:00
Tim Pope
f5fc469c0c Ignore blank buffers in fugitive#Statusline() 2019-09-06 17:16:19 -04:00
Tim Pope
cb66611f03 Remove blank buffer FAQ entry 2019-09-05 17:26:58 -04:00
Tim Pope
49287b6e87 Remove redundant autocommands 2019-09-05 16:42:39 -04:00
Tim Pope
ec918b9a79 Support blank buffers
Closes https://github.com/tpope/vim-fugitive/issues/1000
2019-09-05 15:46:27 -04: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
Teo Ljungberg
2d0df5842a Fix :Glog
`"<mods>"` was forgotten to be passed in during the refactoring in:
68da9a2
2019-09-04 15:54:36 -05:00
Tim Pope
1937bc3cd9 Experimental support for blank buffers 2019-09-04 15:22:28 -04:00
Tim Pope
d2837b103c Add sponsor button 2019-09-04 15:22:28 -04:00
Tim Pope
10c54dfc93 Set b:git_dir for :terminal buffers 2019-09-04 15:22:28 -04:00
Tim Pope
40bc5aff18 Make universal maps global 2019-09-04 15:11:59 -04:00
Tim Pope
68da9a2be3 Make :Glog and :Ggrep global 2019-09-04 15:11:59 -04:00