Tim Pope
ef87434b87
Provide :Git difftool and :Git mergetool
...
References https://github.com/tpope/vim-fugitive/issues/132
2020-01-05 16:36:11 -05:00
Tim Pope
2bcf755c6e
Run QuickFix autocommands on :Gclog
2020-01-05 16:36:11 -05:00
Tim Pope
295f41bbf4
Save diff context in :Gclog
2020-01-05 16:17:58 -05:00
Tim Pope
9ec6b55d03
Improve display of :Gclog --summary
2020-01-05 01:50:24 -05:00
Tim Pope
3604fab3b7
Fix whitespace in README
2020-01-05 01:50:24 -05:00
Tim Pope
6d011f1ea5
Improve :Gclog window title
2020-01-05 00:36:36 -05:00
Tim Pope
726fdf1c94
Support ...commit as HEAD...commit
2020-01-03 19:47:08 -05:00
Tim Pope
3bf602b13d
Use underlying commit not tag for :Gedit tag:path
2019-12-27 17:19:42 -05:00
Tim Pope
3729c351e1
Fix unknown function error on Vim < 7.2.061
2019-12-27 17:19:42 -05:00
Tim Pope
7848779d3b
Don't error if we can't :bwipeout
...
References https://github.com/tpope/vim-fugitive/issues/1418
2019-12-27 17:19:42 -05:00
Jon Parise
b68b6d4329
Mention vim-phabricator for Phabricator browsing
2019-12-11 17:49:38 -05:00
Tim Pope
6d4564a05e
Fix timer invocation
...
References https://github.com/tpope/vim-fugitive/issues/1329
2019-12-07 10:14:14 -05:00
Tim Pope
5d37b17e34
Match Git semantics for GIT_CEILING_DIRECTORIES symlink resolution
...
Also support a generic g:ceiling_directories that can be shared with
other plugins that do this sort of detection.
References https://github.com/tpope/vim-fugitive/issues/1412
2019-12-06 18:03:32 -05:00
Tim Pope
b48a572475
Use timers to avoid Vim patch 8.1.1756
...
Closes https://github.com/tpope/vim-fugitive/issues/1329
2019-12-06 14:39:27 -05:00
Tim Pope
e1ab8fff09
Handle both amended and new commits during rebase
...
References https://github.com/tpope/vim-fugitive/issues/1329
2019-12-06 14:39:27 -05:00
Tim Pope
d3a2bdbe2c
Don't abort rebase after committing on last step
...
References https://github.com/tpope/vim-fugitive/issues/1329
2019-12-06 14:12:35 -05:00
Tim Pope
42c6fd1440
Don't override explicit empty string for core.askPass
...
References https://github.com/tpope/vim-fugitive/issues/1410
2019-12-06 12:56:59 -05:00
Tim Pope
671a85daba
Fix erroneous ? escaping in * pattern
2019-11-30 17:19:52 -05:00
Tim Pope
6d9dd103c0
Fix false positive matching filename in blame
2019-11-30 17:15:44 -05:00
Tim Pope
3b1da8b217
Remove debugging function
2019-11-27 16:34:28 -05:00
Tim Pope
67efbf66e0
Don't fall back to pwd for Git dir of blank filename
...
In particular, this fixes `FugitiveFind(..., '')` to respect the empty
Git dir argument rather than falling back to detection on the current
working directory. Which in turn fixes :Gstatus using the current
working directory when called from a buffer that does not belong to a
repository.
References https://github.com/tpope/vim-fugitive/issues/1408
2019-11-27 15:27:52 -05:00
Tim Pope
eed46c1f24
Perform automatic :diffoff on :Gdiffsplit /external/file buffers
...
Closes https://github.com/tpope/vim-fugitive/issues/1402
2019-11-21 22:08:37 -05:00
Tim Pope
dc5320630d
Provide explanatory error on :Gdiff ~
...
References https://github.com/tpope/vim-fugitive/issues/1402
2019-11-19 17:48:43 -05:00
Tim Pope
13fdeb5fa7
Don't show bogus unstaged changes in bare repository
...
References https://github.com/tpope/vim-fugitive/pull/1262
2019-11-17 22:19:33 -05:00
Omar Sandoval
3936a74584
Reset scrollbind/cursorbind after reblaming
...
The following sequence of commands leaves the buffer with scrollbind and
cursorbind set:
:Gblame
Reblame with one of -, ~, or P
Quit with gq
What's happening here is:
1. In BlameSubcommand, we set scrollbind and cursorbind on the buffer.
We also set w:fugitive_leave on the blame buffer to reset scrollbind
and cursorbind when the blame buffer is closed.
2. In BlameJump, we execute Gedit, which changes the window to a new
buffer. Then, we delete the blame buffer, at which point we try to
reset scrollbind and cursorbind. However, the original buffer isn't
on a window anymore, so this doesn't do anything.
3. In BlameQuit, we go back to the original buffer. Note this snippet
from `:help local-options`: "if this buffer has been edited in this
window, the [option] values from back then are used". When the
original buffer was last used, scrollbind and cursorbind were still
set. Therefore, the buffer ends up with scrollbind and cursorbind
set after leaving Gblame.
The fix is to delete the blame buffer _before_ changing to the new
buffer in BlameJump. This ensures that we restore the options while the
original buffer is still around (which is how BlameQuit does it, too).
2019-11-17 21:08:23 -05:00
Tim Pope
a2d76c4583
Fix completion of stash@\{<Tab>
...
References https://github.com/tpope/vim-fugitive/issues/1396
2019-11-16 19:48:31 -05:00
Farid
fd029d83bf
Add built-in package management installation way
2019-11-16 19:48:19 -05:00
Tim Pope
0004f585fd
Don't use arrow notation for unstaged modifications
...
Closes https://github.com/tpope/vim-fugitive/issues/1392
2019-11-15 20:31:29 -05:00
Tim Pope
b24f98fbb1
Cache fugitive#Head() to minimize statusline IO
...
Closes https://github.com/tpope/vim-fugitive/issues/1384
2019-11-15 20:05:18 -05:00
Tim Pope
8c84ea6fdb
Replace --no-patch with -s for Git < 1.8.4
...
Closes https://github.com/tpope/vim-fugitive/issues/1398
2019-11-12 21:31:36 -05:00
Tim Pope
1e57d678ba
Add PayPal donation link
2019-11-08 17:41:09 -05:00
Tim Pope
f6acae50ea
Improve robustness of status --porcelain=v1 parsing
...
References https://github.com/tpope/vim-fugitive/issues/1388
2019-10-27 18:53:19 -04:00
Tim Pope
0356edf6b8
Optimize away log calls in :Gstatus if no upstream changes
2019-10-26 09:05:49 -04:00
Tim Pope
e8c5b604db
Improve robustness of status --porcelain=v2 parsing
...
Closes https://github.com/tpope/vim-fugitive/issues/1388
2019-10-26 08:49:23 -04:00
Tim Pope
b09c5d2523
Resolve symlinks in configured work tree
...
Closes https://github.com/tpope/vim-fugitive/issues/1382
2019-10-22 05:13:42 -04:00
Tim Pope
395d947644
Force --no-edit on squash maps
...
References https://github.com/tpope/vim-fugitive/pull/1378
2019-10-20 15:37:41 -04:00
Ben
0a77016ef5
Disable signcolumn during Gblame ( #1379 )
2019-10-17 18:14:07 -04:00
Tim Pope
06e34204af
Fix error message on blank buffer with no Git dir
2019-10-11 17:21:16 -04:00
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.
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
Tim Pope
804957a3e6
Make :Gbrowse global
2019-09-04 15:11:59 -04:00
Tim Pope
cf88ce96c9
Make :Gmove and :Gremove global
2019-09-04 15:11:59 -04:00
Tim Pope
2464b0c29a
Make :Gcd global
2019-09-04 15:11:59 -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
c9d4ea7900
Always use Git style path for <C-R><C-G>
2019-09-04 13:17:20 -04:00
Tim Pope
99ad1a89fa
Relocate 'path' adjustment
...
I'm not sure where we should do this (if at all), but after loading the
appropriate buffer (and thus applying the file type) is a better place
than during general activation.
2019-09-04 13:17:20 -04:00
Tim Pope
2eb6aac0c4
Adjust warning wording
2019-09-04 13:17:20 -04:00
Tim Pope
c80ffaf073
Don't override user :Gr
2019-09-04 13:17:20 -04:00
Tim Pope
63a05a6935
Remove 'tags' support
2019-09-03 21:40:39 -04:00
Tim Pope
522d3d3c1e
Make edit commands global
2019-09-03 20:21:47 -04:00
Tim Pope
b8c33aa0a1
Enable edit commands to work without git dir
2019-09-03 20:20:37 -04:00
Tim Pope
39f9e2d722
Move IO functions with rest of API
2019-09-03 20:20:37 -04:00
Tim Pope
a45e2c6d57
Provide :Gr as alias for :Gread
2019-09-02 19:58:13 -04:00
Tim Pope
5042fd965d
Tweak :Gedit > semantics
...
Treat ~ and ^ suffixes as relative to current commit, not HEAD, and use
a bare > to get to the work tree version.
2019-09-02 19:58:13 -04:00
Tim Pope
251eda7eb6
Reduce fugitive#buffer() to stub object
2019-09-01 21:48:16 -04:00
Tim Pope
c212d854d5
Accommodate git-blame revision ignoring features
...
Closes https://github.com/tpope/vim-fugitive/issues/1316
2019-09-01 12:56:58 -05:00
Tim Pope
082a9b99e7
Remove double word in docs
2019-09-01 12:56:58 -05:00
Tim Pope
c13e0e1afd
Don't browse to blob for empty buffer
2019-08-31 22:34:34 -04:00
Tim Pope
b97a9abe29
Provide global :Git and :G
2019-08-22 19:46:20 -05:00
Tim Pope
410e17129d
Use :Git not :G for visible maps
...
Let's treat :Git as canonical and :G as the shorthand.
2019-08-22 19:45:20 -05:00
Tim Pope
3a01f4b819
Remove toggling behavior of :Gblame
...
References https://github.com/tpope/vim-fugitive/issues/1316
2019-08-22 19:15:43 -05:00
Tim Pope
f04a2275db
Remove feedkeys() contortions in :Gdiffsplit
...
Closes https://github.com/tpope/vim-fugitive/issues/1313
2019-08-21 15:14:39 -05:00
Tim Pope
b714adbc51
Fix q deprecation message
2019-08-21 09:12:17 -05:00
Tim Pope
9abe962c9d
fugitive.vim 3.0
...
* Use custom format for :Gstatus, not literal git status output.
* Inline diffing in :Gstatus, with support for staging individual hunks.
* List unpushed and unpulled commits in :Gstatus.
* Show rebase status in :Gstatus.
* Greatly expanded set of mappings in :Gstatus. Try g?, c?, and r?.
* :Gstatus p (add --patch) is changed to P.
* :Gstatus U (checkout/clean) is changed to X. New U behavior is global reset.
* :Gstatus 2X/3X performs checkout --ours/--theirs.
* :Gstatus gI ignores file.
* Smarter :Gstatus automatic reload.
* :Git subcommand calls :Gsubcommand when appropriate.
* :Git add --patch and similar commands use :terminal.
* :Git diff, :Git log, and :Git --no-pager display results in temp buffer.
* :Git and subcommand wrappers use custom quoting rather than shell escaping.
* :Git ... ./path is relative to working directory.
* Add --option completion to :Git and git wrappers.
* Provide :G as wrapper for both :Gstatus and :Git.
* Support for :Grebase --interactive.
* :Gblame accepts all arguments, including filenames and commits.
* Support :Gblame --reverse to navigate forwards through history.
* Support :Gblame with range to blame subset of current file.
* Allow disabling dynamic blame colors with let g:fugitive_dynamic_colors = 0.
* :Glog opens quickfix list instead of displaying raw log output.
* Cleaner :Glog quickfix list leveraging Vim's new "module" format.
* :Glog no longer defaults to current file. Use :0Glog for that.
* :0Glog follows file across renames.
* :Glog name softly deprecated in favor of :Gclog (named after :cfile).
* Provide :Grevert.
* :Gdiff renamed to :Gdiffsplit.
* :Gdiffsplit always opens one window. Use :Gdiffsplit! for conflicts.
* Support git grep --column.
* Chdir with git -C rather than :cd for most commands. (Git 1.8.5 required)
* Show all stderr hook output on :Gcommit.
* Provide core.askPass default for Gpush and friends.
* Require bang to :Gwrite from index.
* Bug fixes.
* Polish.
2019-08-20 10:06:56 -04:00
Tim Pope
b6bbb17e3f
Expose IO functions as object
...
This is a new interface to a slightly older API for performing standard
VimL IO functions against URLs (or any other URLs, the interface is
generic). Example wrapper function:
function! IO(fn, ...) abort
let file = a:fn ==# 'writefile' ? a:2 : a:1
let obj = get(g:, 'io_' . matchstr(file, '^\a\a\+'), {})
return call(get(obj, a:fn, a:fn), a:000)
endfunction
echo IO('filereadable', @%)
2019-08-20 08:51:52 -04:00
Tim Pope
9dcf1d7d81
Document important API functions
2019-08-20 08:51:52 -04:00
Tim Pope
a510b3aadf
Deprecate :Gstatus q
2019-08-20 08:51:52 -04:00
Tim Pope
c63fd1b71b
Support a...b as notation for merge base
...
Closes https://github.com/tpope/vim-fugitive/pull/913
2019-08-19 11:25:39 -04:00
Tim Pope
e768806266
Remove obsolete Git object examples
2019-08-19 11:22:52 -04:00
Tim Pope
f29298880f
Provide FugitiveGitPath()
2019-08-19 09:04:32 -04:00
Tim Pope
2b6199594a
Use FugitiveVimPath() to normalize directories during detection
2019-08-19 09:04:32 -04:00
Tim Pope
fd7b5d8a1e
Rename s:PlatformSlash() to FugitiveVimPath()
2019-08-19 08:41:15 -04:00
Tim Pope
e759a85486
Provide separate highlight groups for file sections
...
References https://github.com/tpope/vim-fugitive/issues/1159
2019-08-19 08:05:22 -04:00
Tim Pope
85ffe4754e
Remove dead code
2019-08-19 06:42:44 -04:00
Tim Pope
c242cb6369
Provide maps to find similar diff lines
2019-08-18 10:53:21 -04:00
Tim Pope
ff058bf5b7
Fix diff after :Gwrite
...
This works around a bug in Vim that was fixed in patch 8.0.0421.
Closes https://github.com/tpope/vim-fugitive/issues/1102
References https://github.com/tpope/vim-fugitive/pull/859
2019-08-18 10:53:20 -04:00
Tim Pope
ed6f4256fc
Change work tree buffer on :Gwrite exactly once
2019-08-18 09:11:10 -04:00
Tim Pope
1c22b69652
Remove dp map in blobs
...
The built-in is actually useful so don't shadow it.
2019-08-18 09:11:10 -04:00
Tim Pope
52f71a3154
Follow renames on :0Gclog
...
Closes https://github.com/tpope/vim-fugitive/issues/563
2019-08-18 07:18:17 -04:00
Tim Pope
fdbcad0624
Allow expanding merge conflict in :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1242
2019-08-18 04:58:59 -04:00
Tim Pope
bbd9afe790
Provide map to close diff buffers
2019-08-18 04:58:59 -04:00
Tim Pope
f2ca0e43a1
Give s:MapEx() more intention revealing name
2019-08-18 04:58:59 -04:00
Tim Pope
25581bf775
Support discarding multiple changes in visual mode
...
Closes https://github.com/tpope/vim-fugitive/issues/944
2019-08-18 01:51:38 -04:00
Tim Pope
e69a3ea21a
Add nested to reload status autocommands
...
References https://github.com/tpope/vim-fugitive/pull/889
2019-08-17 08:43:21 -04:00
Tim Pope
442d56e23c
Fix :Glog
2019-08-16 13:48:46 -04:00
Daniel Hahler
cb613ca05d
Fix :Gdiffsplit with diffopt+=vertical
...
Only remove "vertical" from `&diffopt` after calling
`s:diff_modifier()`.
Regressed in c972b2a .
References https://github.com/tpope/vim-fugitive/pull/805#issuecomment-522057790 .
2019-08-16 13:40:53 -04:00
Tim Pope
d6f7eaf16c
Compensate for 'noequalalways' in merge diff
...
Closes https://github.com/tpope/vim-fugitive/issues/674
2019-08-16 07:08:05 -04:00
Tim Pope
b6dbe402e8
Fix :Glog with diff.noprefix set
...
Closes https://github.com/tpope/vim-fugitive/issues/606
2019-08-16 07:08:05 -04:00
Tim Pope
86c276d629
Fix version check for doautocmd <nomodeline>
2019-08-16 07:08:05 -04:00
Felix Archambault
22e9b26075
doc: prefer https url
2019-08-15 22:59:49 -04:00
Tim Pope
2518ef9a02
Map double click to jump to file
...
References https://github.com/tpope/vim-fugitive/pull/620
2019-08-15 22:58:37 -04:00
Tim Pope
bb82255490
Add :help reference to README
2019-08-15 22:46:36 -04:00
Tim Pope
a8163625f8
Vim automatically sets cursorbind for diff buffers
...
References https://github.com/tpope/vim-fugitive/pull/937
2019-08-15 22:39:04 -04:00
Tim Pope
7079d0c7e2
Convert all FugitivePrepare() int arguments to buffer names
2019-08-15 22:01:27 -04:00
Tim Pope
4f51d99f44
Encapsulate shell escaping user arguments
2019-08-15 22:01:27 -04:00
Tim Pope
c972b2a065
Fix :Ghdiffsplit with diffopt=vertical
...
Closes https://github.com/tpope/vim-fugitive/issues/990
2019-08-15 19:40:46 -04:00
Tim Pope
cf9ef7377f
Don't process modelines after :Gwrite
...
Closes https://github.com/tpope/vim-fugitive/issues/956
2019-08-15 17:53:27 -04:00
Tim Pope
45ca1eab83
Use platform slashes for :Gcd
...
The only current difference is backslashes on Windows, which aren't
required, but this may evolve into larger changes in the future.
2019-08-15 17:53:27 -04:00
Tim Pope
a80b965d0d
Remove legacy support for /relative/path
2019-08-15 17:53:27 -04:00
Tim Pope
03361373b1
Fix :Gstatus U map
2019-08-15 17:53:13 -04:00
Tim Pope
6a04e875f8
Provide diff maps in blobs
2019-08-15 11:49:54 -04:00
Tim Pope
557cc74141
Fix syntax error
...
Closes https://github.com/tpope/vim-fugitive/issues/1310
2019-08-15 11:49:54 -04:00
Tim Pope
b887de5ce2
Don't reuse blame buffers for Gstatus edits
2019-08-15 03:47:13 -04:00
Tim Pope
6cc52a1aab
Fix extra bang in diff maps
2019-08-15 03:47:13 -04:00
Tim Pope
faa895239b
Clean up gitdir file parsing
2019-08-15 03:34:00 -04:00
Tim Pope
6eb885c017
Always diff against parents in :Gdiffsplit!
2019-08-14 11:06:42 -04:00
Tim Pope
308e4bf241
Fix temp file gq shadowing blame gq
2019-08-14 09:38:39 -04:00
Tim Pope
7d484eaf52
Use s:Map() for nearly all maps
2019-08-14 09:38:39 -04:00
Tim Pope
34bfcd471b
Fix error generating command for :'<,'>Gblame
...
Closes https://github.com/tpope/vim-fugitive/issues/1308
2019-08-14 09:38:39 -04:00
Tim Pope
1d2821f91e
Clarify :Gstatus p behavior
...
I've seen a lot of confusion in the wild around this, and the old
behavior is immortalized in the Vimcasts. Lets make this an error while
we regroup.
2019-08-14 01:44:13 -04:00
Tim Pope
53e5e61afa
Emphasize :Glog behavior change
...
Let's go ahead and embrace :Gclog as a warning free version of the
command.
2019-08-14 01:44:13 -04:00
Tim Pope
1359d620eb
Force <nowait> for all generated maps
2019-08-13 23:32:50 -04:00
Tim Pope
5defa72b81
Provide count on blob blame maps for --reverse
2019-08-13 21:31:01 -04:00
Tim Pope
c21736dde7
Jump to file not diff for boundary commit in :Gblame
2019-08-13 21:31:01 -04:00
Tim Pope
11691b38bb
Allow :Gblame ^boundary to use scrollbind
2019-08-13 21:31:01 -04:00
Tim Pope
69bf0e3469
Accept commit.. :Gblame argument as commit not filename
2019-08-13 20:58:10 -04:00
Tim Pope
e7c2563288
Remove bang variant of :Git from README
...
This happens for the important commands automatically, and the new
override syntax is -P/--no-pager.
2019-08-13 19:44:17 -04:00
Tim Pope
c0ce201c3b
Remove :Git --paginate from docs
...
I thought the --paginate option was basically the opposite of
--no-pager, but it actually forces the entire command to run through a
pager, breaking a lot of interactive commands. Let's de-emphasize it as
a solution.
2019-08-13 19:44:17 -04:00
Tim Pope
49b777ae44
Use rev-list in lieu of log with raw format
2019-08-13 17:24:17 -04:00
Tim Pope
f33a53bceb
Remove debug
2019-08-13 17:20:56 -04:00
Tim Pope
16bfd4fa92
Fix offset jumping to patch on :Gblame --reverse
2019-08-13 17:20:03 -04:00
Tim Pope
8038ee60a9
Fix -1 effectively canceling --reverse
...
Is there a way to apply a limit at the print level rather than the query
level?
2019-08-13 17:12:28 -04:00
Tim Pope
08a9a45dbc
Support :rightbelow Gblame and other <mods>
...
Closes https://github.com/tpope/vim-fugitive/issues/976
2019-08-13 16:27:28 -04:00
Tim Pope
0a7ffc5d67
Use descendant when jumping to patch for :Gblame --reverse
...
References https://github.com/tpope/vim-fugitive/issues/1305
2019-08-13 16:27:28 -04:00
Tim Pope
0392f64a93
Make :Gblame a proper subcommand
2019-08-13 15:28:01 -04:00
Tim Pope
d1033e756e
Cleaner error on -z command failure
2019-08-13 15:28:01 -04:00
Tim Pope
79b1f16a7a
Delegate :Git grep to :Ggrep
2019-08-12 00:12:18 -04:00
Tim Pope
03710a877a
Use same window for commit message on :0Gcommit
2019-08-12 00:12:18 -04:00
Tim Pope
b4d40abb10
Use lower case for subcommand declarations
2019-08-11 22:36:29 -04:00
Tim Pope
3ca888470b
Expand diffs on :Gcommit --patch
2019-08-11 22:36:29 -04:00
Tim Pope
4460aeffdd
Use temp buffer with man filetype for :Git help
2019-08-11 18:40:25 -04:00
Tim Pope
078210c718
Use temp buffer for :Git show and :Git stash show
2019-08-11 18:40:24 -04:00
Tim Pope
d417fd3199
Move blame buffer settings to FileType event
...
The goal here is to extract just the settings that would work outside of
a vertical split with 'scrollbind' in effect, so we can one day add a
second mode.
2019-08-11 17:33:45 -04:00
Tim Pope
4daa0c558c
Support nearly all git-blame flags
2019-08-11 01:17:22 -04:00
Tim Pope
7686b7dc5c
Support blame.blankBoundary with Ignore highlight
2019-08-11 01:03:09 -04:00
Tim Pope
68f0cb87a9
Don't require <mods> for vertical/tab blame culprit maps
2019-08-11 01:03:09 -04:00
Tim Pope
9ca6e0c633
Remove q from :Gblame documentation
2019-08-10 22:24:35 -04:00
Tim Pope
97e993611e
Highlight blame --score-debug and blame -c
2019-08-10 22:24:35 -04:00
Tim Pope
54f155218a
Remove duplicate b:fugitive_status initialization
2019-08-10 22:24:35 -04:00
Tim Pope
c7e3df5283
Provide some commit --reset-author maps
...
Supporting flags with additional maps is a pretty limited solution, as
there's no way to combine them (that is, we'd need to map both cRva and
cvRa to get both verbose and reset-author, and that's as silly as it is
hard to type in under a second). I think some kind of getchar()
dispatcher is going to be the long term solution.
2019-08-10 22:24:35 -04:00
Tim Pope
bc3d36e559
Remove 'guioptions' workaround
2019-08-09 00:51:59 -04:00
Tim Pope
8227503714
Open :Gstatus for :Gcommit -i and :Gcommit -p
2019-08-09 00:33:28 -04:00
Tim Pope
f0acf3e883
Show dirty submodules in Unstaged section
...
Closes https://github.com/tpope/vim-fugitive/issues/1204
2019-08-09 00:33:28 -04:00
Tim Pope
a09e49d2bb
Support :Gblame --reverse
...
Closes https://github.com/tpope/vim-fugitive/issues/1305
2019-08-08 21:02:40 -04:00
Tim Pope
cce9ca0933
Move select temp file configuration to BufReadPre
...
This allows the natural machinery to kick in rather than invoking
FugitiveDetect() and fugitive#MapJumps() explicitly.
2019-08-08 21:02:40 -04:00
Tim Pope
0a536ed5af
Don't unnecessarily change ":verbose set scrollbind?"
2019-08-08 20:24:40 -04:00
Tim Pope
9420d05ddd
Eliminate b:fugitive_blamed_bufnr
2019-08-08 20:24:40 -04:00
Tim Pope
6db7120c9a
Don't double set temp options on blame buffer
2019-08-08 20:24:40 -04:00
Tim Pope
4a42d4e21c
Encapsulate retrieval of blamed bufnr
2019-08-08 20:24:40 -04:00
Tim Pope
206b54a147
Retool :Gblame close map
2019-08-08 20:24:40 -04:00
Tim Pope
1260de3b7d
Fix :Gread blobhash
...
References https://github.com/tpope/vim-fugitive/issues/836
2019-08-08 18:15:39 -04:00
Tim Pope
9d36dc2d74
Check for built-ins with .exe extension on Windows
2019-08-08 01:44:44 -04:00
Tim Pope
0db4ceb980
Restore press enter prompt in :Ggrep in GUI
2019-08-07 19:31:35 -04:00
Tim Pope
95c1f1525d
Fix accidental utility invocation on :Git complete
2019-08-07 18:12:07 -04:00
Tim Pope
cfca94c723
Expand simple aliases in :Git
...
This lets you alias ca = `git commit -a` and have `:Git ca` call
`:Gcommit -a`.
2019-08-07 17:31:14 -04:00
Tim Pope
edae34e02f
Fix count with jump to commit section
2019-08-07 00:52:38 -04:00
Tim Pope
d7172882b7
Add default core.askPass to :Gpull
2019-08-06 20:01:18 -04:00
Tim Pope
511e32114b
Swap gu and gU
2019-08-06 19:39:26 -04:00
Tim Pope
0cc3beeae9
Tweak commit for u rebase map
2019-08-06 14:32:39 -04:00
Tim Pope
0484c03c6b
Allow :Grevert --abort/continue/quit
2019-08-06 14:10:45 -04:00
Tim Pope
9d77fd566c
Add Git dir presence guard to all commands
...
This isn't necessary for the current implementation, but could enable
making the commands (or at least the underlying commands) global.
2019-08-06 14:10:45 -04:00
Tim Pope
35d7590354
Provide s/u mappings on commits
...
I need to figure out the big picture push story before I can document
the push maps.
2019-08-06 14:10:38 -04:00
Tim Pope
c4d4986f1e
Delegate :G command to :Gcommand for 8 commands
2019-08-04 00:05:18 -04:00
Tim Pope
fb9acc6831
Add a FAQ entry about remote passwords
2019-08-03 21:38:28 -04:00
Tim Pope
81eec879a4
Update :Gstatus description in README
2019-08-03 21:38:28 -04:00
Tim Pope
14effe7bfb
Mention :Gpull and related commands in README
2019-08-03 21:38:28 -04:00
Tim Pope
15fe543508
:Glog isn't that exciting
2019-08-03 21:38:28 -04:00
Tim Pope
bd70719f54
Provide :Grevert and :Gmerge mappings
2019-08-03 21:38:28 -04:00
Tim Pope
0f08b0cbbb
Provide separate file/hunk jump maps
2019-08-03 16:27:44 -04:00
Tim Pope
35cf80dd3b
Fix :Gbrowse with range and blame.coloring enabled
2019-08-03 16:27:03 -04:00
Tim Pope
dffa56c4ea
Retool section jump maps
2019-08-03 00:52:08 -04:00
Tim Pope
9ac6a258d6
Fall back to "commit" line for file hunk jump maps
...
This enables jumping from commit to commit in :Git log.
2019-08-02 23:41:57 -04:00
Tim Pope
e5a6a8c525
Support jump maps in visual mode
2019-08-02 20:21:23 -04:00
Tim Pope
875a58c2e1
Document :Git --paginate
...
Was planning on keeping this unofficial, but I think we need to provide
an alternative to loading :Git log in a temp file.
2019-08-02 20:21:23 -04:00
Tim Pope
3f417d7ad1
Enable fixup/squash maps in :Git log
2019-08-02 20:21:23 -04:00
Tim Pope
2b757e87d5
Disable modelines in temp files
2019-08-02 20:21:23 -04:00
Vais Salikhov
5af58f9da1
Fix a typo in the docs
2019-08-02 15:25:40 -04:00
Tim Pope
4c0dbb66eb
Always use temp file for :Git diff and :Git log
...
You can use :Git -p log to get a terminal instead.
2019-08-02 13:31:55 -04:00
Tim Pope
9118ed27c3
Add -addr= declarations
2019-08-02 13:26:18 -04:00
Tim Pope
291cf5d1bc
:0Ggrep calls :Glgrep
2019-08-02 13:17:08 -04:00
Tim Pope
928e1e71e7
Document :Git --no-pager
2019-08-02 02:00:16 -04:00
Tim Pope
b9c47cec52
Add command dispatcher
...
This will enable cleaning up some of the repetition in argument and
exception handling
2019-08-02 01:45:33 -04:00
Tim Pope
21991bcbaf
Eliminate redundant :G and :Git implementations
2019-08-02 01:09:20 -04:00
Tim Pope
665cec73d9
Provide :Grevert
2019-08-01 23:22:10 -04:00
Tim Pope
d54e98bedb
Remove overlooked 40 character limits
2019-08-01 23:22:10 -04:00
Tim Pope
0ab2d9709c
Preserve cursor position after staging last untracked file
2019-08-01 19:27:41 -04:00
Tim Pope
7df9f07e1f
Compensate for blame.coloring
...
Closes https://github.com/tpope/vim-fugitive/issues/1301
2019-08-01 12:46:45 -04:00
Tim Pope
fb3c603ce6
Always use temp file for :Git --no-pager
2019-08-01 12:46:09 -04:00
Tim Pope
44ade58ed5
Always use :terminal for :Git --paginate
...
References https://github.com/tpope/vim-fugitive/issues/1294
2019-07-30 13:05:16 -04:00
Tim Pope
881d72f1af
Preserve index on cza and czp
2019-07-29 17:16:58 -04:00
Tim Pope
f3dde245b3
Map I to :Git add --intent-to-add
2019-07-29 17:16:58 -04:00
Tim Pope
a3ab24f681
Fire synthetic QuickFix events on :Ggrep
...
References https://github.com/tpope/vim-fugitive/issues/1297
2019-07-29 13:23:59 -04:00
Tim Pope
bd89fd440b
Fix error message for rev-parse
2019-07-29 00:48:57 -04:00
Tim Pope
3c4ad5ff72
Avoid unnecessary diffing in :Gstatus
2019-07-28 21:50:49 -04:00
Tim Pope
fff24e29e6
Add czA and czP aliases for cza and czp
...
One set of these will get --index. I'll decide which later.
2019-07-28 21:50:49 -04:00
Tim Pope
0810dcc805
Fix typo
2019-07-28 20:42:37 -04:00
Tim Pope
3b0f68180f
Compensate for bad 'shellredir'
2019-07-28 19:21:01 -04:00
Tim Pope
49f3f92fd5
Guard against inadvertent :| invocation
...
I haven't been able to consistently reproduce it, but sometimes vim
takes :edit +CmdA\|CmdB to mean :CmdA followed by :| and not :CmdA
followed by :CmdB.
2019-07-28 19:16:28 -04:00
Tim Pope
645406f592
Use :Gdiffsplit! for diff maps
...
This opens a 3 way diff for merges and also focuses the more useful
window.
2019-07-28 01:20:38 -04:00
Tim Pope
7bfce97480
Provide misc :Git mappings
2019-07-28 01:12:33 -04:00
Tim Pope
3e9ef9349d
Remove error guards for old object syntax
2019-07-28 01:10:37 -04:00
Tim Pope
881ad1ed0b
Guard against missing output on :Gcommit success
2019-07-26 21:56:39 -04:00
Tim Pope
ebc3f35575
Require bang to :Gwrite from index
...
Closes https://github.com/tpope/vim-fugitive/issues/1057
2019-07-26 11:32:24 -04:00
Tim Pope
79566b5ddd
Don't override alt buffer on :Gwrite from index
2019-07-26 11:32:24 -04:00
Tim Pope
d90e912e46
Provide ignoring maps
...
Closes https://github.com/tpope/vim-fugitive/issues/235
2019-07-24 21:27:16 -04:00
Tim Pope
2bfb6e9889
Reverse inline diff mappings
...
References https://github.com/tpope/vim-fugitive/issues/1199
2019-07-24 21:27:16 -04:00
Tim Pope
b92de0138d
Provide rudimentary stash mappings
2019-07-23 20:44:25 -04:00
Tim Pope
d95cc5f8c2
Remove :Gedit HEAD and :Gedit refs/... special cases
2019-07-23 20:44:25 -04:00
Tim Pope
55cb58cd5f
Add :Git add --intent-to-add to :Gstatus P
2019-07-23 20:44:24 -04:00
Tim Pope
ce283cbdbf
Remove i special behavior on section heading
2019-07-23 20:10:48 -04:00
Tim Pope
994d1b518f
Remove --intend-to-add from :Gstatus i
...
You can't actually apply a hunk to a file added with --intend-to-add, so
this did not pair well with the hunk expansion behavior.
2019-07-23 19:37:06 -04:00
Tim Pope
d88a0f8465
Fix :Gstatus X in visual patch selection
2019-07-23 19:24:07 -04:00
Tim Pope
54bc4ab9dd
Improve error handling on :Gstatus X
2019-07-23 18:29:13 -04:00
Tim Pope
15df3f8959
Do what the user means for LANG= in g:fugitive_git_executable
2019-07-23 15:13:28 -04:00
Tim Pope
1fe6202848
Fix :Gbrowse assuming range
2019-07-22 15:20:21 -04:00
Tim Pope
a152894a55
Don't rely on exception message for :Gbrowse - error
2019-07-22 14:34:46 -04:00
Tim Pope
8a693fb7bc
Restore :Gdiffsplit :n
2019-07-22 14:34:45 -04:00
Tim Pope
80996c2e2c
Map c? and r? to show commit and rebase help
2019-07-21 15:27:21 -04:00
Tim Pope
238a5d8aaf
Map U as :Git reset -q
2019-07-21 15:27:20 -04:00
Tim Pope
76bd7d6cb4
Map gr to jump to rebasing section
2019-07-21 15:26:58 -04:00
Tim Pope
ac97fa3781
Use terminal for :Git fetch/pull/push
...
I consider :Gfetch, etc, the proper interface, but allow this as a
backdoor.
References https://github.com/tpope/vim-fugitive/issues/1292
2019-07-21 15:26:47 -04:00
Tim Pope
6e2310a154
:Gstatus called from status window forces reload
2019-07-20 23:36:42 -04:00
Tim Pope
387cb5c2a0
Clean up error reporting on :Gwrite in diff
2019-07-20 23:36:42 -04:00
Tim Pope
8d584c199a
Fix escaping for :Ggrep '#'
2019-07-20 23:36:42 -04:00
Tim Pope
adba9c6345
Provide core.askPass default
...
Closes https://github.com/tpope/vim-fugitive/issues/722
2019-07-18 16:23:01 -04:00
Tim Pope
d68efa32e8
Document parentheses movement maps
2019-07-18 14:18:09 -04:00
Tim Pope
b0de6c2811
Fix :0Glog another/path
2019-07-18 14:18:09 -04:00
Tim Pope
e25a214f78
Add an error about LANG= in g:fugitive_git_executable
2019-07-18 11:12:03 -04:00
Tim Pope
ea26a94bde
Consistently position cursor on :Gstatus
2019-07-18 11:12:03 -04:00
Tim Pope
3d305c75a0
Don't print current line on :G|chainedcommand
2019-07-18 11:12:03 -04:00
Tim Pope
68b999bfd0
Remove <C-W>C map
...
It's not worth claiming a whole map just to save one key press.
2019-07-18 11:12:03 -04:00
ganziqim
58b2b85c9e
Only check bdelete mapping in normal mode
2019-07-18 09:44:14 -04:00
Tim Pope
07661dc102
Provide additional commit maps
2019-07-16 16:36:58 -04:00
Tim Pope
2992275d8e
Don't load first quickfix result into status buffer
2019-07-16 16:36:58 -04:00
Tim Pope
d8acfc35c7
Clarify in error message that :Gbrowse handlers are user installed
2019-07-16 16:36:58 -04:00
Tim Pope
0ee0498b88
Filter out warning on :Gedit master@{2.years.ago}
2019-07-16 16:00:09 -04:00
Tim Pope
469a73f3d9
Speed up :Ggrep
2019-07-15 22:41:51 -04:00
Tim Pope
a1b78969f5
Decouple :Glog from :grep
...
One step closer to asynchronous job support.
2019-07-15 22:41:51 -04:00
Tim Pope
158ffdbb14
Extract function to create titled quickfix list
2019-07-15 22:41:51 -04:00
Tim Pope
f83072703b
Remove debugging variable
2019-07-15 22:41:35 -04:00
Tim Pope
4c650c699d
Don't require shell quoting for colons
...
References https://github.com/tpope/vim-fugitive/issues/1289
2019-07-15 15:35:02 -04:00
Tim Pope
dafb994c92
Remove unused function
2019-07-14 14:29:26 -04:00
Tim Pope
8c80cb63e2
Fix E211 handling in :Gmerge/:Grebase
2019-07-14 14:29:26 -04:00
Tim Pope
dbdc947533
Fix <CR> as :Gblame map
2019-07-14 14:29:26 -04:00
Tim Pope
4da9fb8f43
Guard against empty filename checking for conflicts
...
Closes https://github.com/tpope/vim-fugitive/issues/1287
2019-07-13 07:50:11 -04:00
Tim Pope
0c259e3016
Tighten up autowrite handling
2019-07-13 07:50:11 -04:00
Tim Pope
d0049b4417
Support double quotes for all subcommand wrappers
2019-07-12 09:20:13 -04:00
Tim Pope
e169595314
Fix finishing :Gcommit on :wqa
...
This was added to compensate for the implicit autowrite we lost when
switching from :! to system(), but it seems calling in the
VimLeavePre/BufLeave event prevents the commit from happening on exit.
I don't fully understand it but it's easy to prevent.
Closes https://github.com/tpope/vim-fugitive/issues/1285
2019-07-12 09:20:13 -04:00
Tim Pope
a1a40c360d
Provide :Gclog and :Gcgrep aliases
...
The distant future might hold a :Glog command that isn't bound by the
limitations of the quickfix list, so introduce an alias for the quickfix
variant to retire to.
:Gcgrep is a weird name since it directly maps to :grep, but provide it
anyways for symmetry.
2019-07-11 17:34:25 -04:00
Tim Pope
e250f9730e
Fix :Gblame on win32
...
Closes https://github.com/tpope/vim-fugitive/issues/1284
2019-07-11 17:34:25 -04:00
Tim Pope
c33d7fcb9f
Show stderr on :Gcommit
...
References https://github.com/tpope/vim-fugitive/pull/1115
2019-07-11 12:32:35 -04:00
Tim Pope
d176cca5ae
Don't include trailing newline in fugitive#GitVersion()
2019-07-11 12:32:35 -04:00
Tim Pope
aa68223376
More helpful error on Git without -C
...
Closes https://github.com/tpope/vim-fugitive/issues/1283
2019-07-11 07:56:28 -04:00
Tim Pope
bdf5a221fb
Use standard argument handling for :Gfetch/:Gpush
2019-07-10 14:51:56 -04:00
Tim Pope
fd48cde3b7
Fix escaping when :Grebase calls :Gcommit
2019-07-10 14:51:56 -04:00
Tim Pope
0a758c22b3
Retool :Ggrep
2019-07-10 08:22:49 -04:00
Tim Pope
bb05732d7f
Begin phasing out <line2>
2019-07-10 08:22:49 -04:00
Tim Pope
de3f6d977c
Fix commands on Vim without <mods>
...
Closes https://github.com/tpope/vim-fugitive/issues/1282
2019-07-09 19:26:44 -04:00
Tim Pope
5f9602e12f
Also support :G command commit:./path
2019-07-09 13:30:07 -04:00
Tim Pope
9afa926a23
Fix subcommand completion to match :Git completion
2019-07-09 13:30:07 -04:00
Tim Pope
23138572f4
Fix :[range]Glog
...
Closes https://github.com/tpope/vim-fugitive/issues/1280
2019-07-09 13:30:07 -04:00
Tim Pope
ad2e408e15
Treat :G ... ./path as relative to working directory
...
References https://github.com/tpope/vim-fugitive/issues/504
2019-07-09 12:26:57 -04:00
Tim Pope
f38c59af7c
Better error handling for obsolete argument syntax
2019-07-09 12:03:22 -04:00
Tim Pope
6b1e749849
Eliminate :cd in :Gread! and :Gblame
2019-07-09 12:03:22 -04:00
Tim Pope
2ddf4e97ef
Work around broken nvim reltime()
...
Closes https://github.com/tpope/vim-fugitive/issues/1277
2019-07-09 12:03:22 -04:00
Tim Pope
fb66f9a86d
Set loclist not qflist title for :Gllog
2019-07-09 12:02:53 -04:00
Tim Pope
9556e59765
Fix :Glog on Vim without quickfix "module" support
...
Closes https://github.com/tpope/vim-fugitive/issues/1279
2019-07-09 12:02:53 -04:00
Tim Pope
b48f93b550
Use proper argument parsing for :Glog
2019-07-09 06:45:58 -04:00
Tim Pope
0a4eee76e9
Don't hide :Glog errors
2019-07-09 06:45:58 -04:00
Tim Pope
1fb7fa0078
Use correct quickfix commands for :Gllog
2019-07-09 06:45:58 -04:00
Tim Pope
5c3d30223b
Further tighten :Glog format
2019-07-09 06:45:58 -04:00
Tim Pope
d22a14192f
Don't map file/hunk jumps in blobs
2019-07-09 06:45:58 -04:00
Tim Pope
f71a38db7d
Fix argument handling for :Gmerge
...
This shouldn't matter in practice since :Gmerge doesn't accept path
arguments, but may as well do the right thing.
2019-07-09 06:45:58 -04:00
Tim Pope
cecfc06be3
Tweak s:Dir() usage
2019-07-09 06:45:58 -04:00
Tim Pope
102b3a50e2
Support next/previous file/hunk in commits
...
One of these aliases is going to end up being for files only but I'll
decide which later.
2019-07-08 15:40:47 -04:00
Tim Pope
ebd7c9ddd3
Add next/previous section maps
2019-07-08 15:39:51 -04:00
Tim Pope
45fd3f4cb8
Change interface for jumping directly to blame commit
2019-07-08 15:39:51 -04:00
Tim Pope
eaa0764940
Fix false positve matching :Glog abbreviated SHA
2019-07-08 15:39:51 -04:00
Tim Pope
85a135a9b0
Complete options for subcommand wrappers
...
Closes https://github.com/tpope/vim-fugitive/issues/1265
2019-07-08 10:04:58 -04:00
Tim Pope
cd78a08543
Retool diffing
...
Support mods, rename to match the built-in :diffsplit, and (perhaps
controversially) move three-way diffing to the bang variant, so that the
default behavior always focuses the other window.
Closes https://github.com/tpope/vim-fugitive/pull/715
2019-07-08 10:04:58 -04:00
Tim Pope
e49b9a9303
Pass bang to :Gblame to get horizontal split
...
Closes https://github.com/tpope/vim-fugitive/issues/1183
2019-07-08 09:41:08 -04:00
Tim Pope
362ce47ed1
Force hyphen in :Gblame -opts
...
I want to change the interface to allow passing an optional filename.
2019-07-08 09:41:08 -04:00
Tim Pope
668a615559
DWIM for :(top)/absolute/path
2019-07-08 09:41:08 -04:00
Tim Pope
6b02026cf9
Fix :Gblame <CR> with existing q map
2019-07-08 09:41:08 -04:00
Tim Pope
bfe74225fa
Use :terminal for :Git add --patch and similar commands
2019-07-08 03:54:06 -04:00
Tim Pope
2cde9172a9
Add section jump maps
...
References https://github.com/tpope/vim-fugitive/issues/1252
2019-07-08 03:50:49 -04:00
Tim Pope
e0d4a281a8
Remove transitional g| mapping
2019-07-07 16:38:45 -04:00
Tim Pope
985861c083
Unify :G and :Git
...
The principle difference between these two is that :G uses -bar while
:Git fakes it. Faking it enables double quotes, but I don't really
trust it.
2019-07-07 14:27:37 -04:00
Tim Pope
d0212919f3
Only map q if no conflict
2019-07-07 14:27:37 -04:00
Tim Pope
7e91b47021
Move blame syntax to separate file
2019-07-07 14:03:38 -04:00
Tim Pope
2b5fdf146a
Allow disabling dynamic blame colors
...
Closes https://github.com/tpope/vim-fugitive/pull/986
2019-07-07 13:38:35 -04:00
Tim Pope
abefcb6ebd
Add --option completion to :Git
...
References https://github.com/tpope/vim-fugitive/issues/1265
2019-07-07 13:16:08 -04:00
Tim Pope
2c13dfff03
Fix completion on :vert Git <Tab>
2019-07-07 13:16:08 -04:00
Tim Pope
2e0570046b
Remove reload map
...
May as well free this up now because we're running short on maps.
2019-07-07 13:16:08 -04:00
Tim Pope
73b7e5e23f
Use proper argument parsing for :Gcommit
2019-07-07 06:39:29 -04:00
Tim Pope
e7f272a36c
Change :Git! to split by default
2019-07-07 01:41:55 -04:00
Tim Pope
20bdfee4b7
Extract :Gsplit! implementation
2019-07-06 13:48:23 -04:00
Tim Pope
a50e072587
Fix handling of bar in argument parsing
2019-07-06 13:48:23 -04:00
Tim Pope
2fdba349f5
Make completion more robust
2019-07-06 13:20:15 -04:00
Tim Pope
aa41caf6c7
Lay groundwork for running commands without Git dir
2019-07-06 13:20:15 -04:00
Tim Pope
00bced7c53
Drop support for :Gblame -fn
...
The double dash options create false positives so this feature no longer
works correctly.
2019-07-06 13:20:15 -04:00
Tim Pope
f33ac1b2a7
Use proper argument parsing in :Gmerge/:Grebase
2019-07-06 11:19:18 -04:00
Tim Pope
2503a957ff
Better helper function names for expanding split
2019-07-06 10:20:10 -04:00
Tim Pope
e87c612491
Jump to appropriate section for s/u on :Gstatus header
2019-07-06 08:56:39 -04:00
Tim Pope
0816915503
Restore popular fugitive#buffer() methods
...
I don't want outdated third party plugins to prevent people from
installing the upcoming stable release.
2019-07-06 08:56:39 -04:00
Tim Pope
81e57453ce
Compensate for very old Vim without settabvar()
2019-07-06 08:56:39 -04:00
Tim Pope
873ede7aa4
Provide argument list version of s:UserCommand()
2019-07-06 08:56:39 -04:00
Tim Pope
d1671f1fce
Fix :Gedit >
2019-07-06 08:56:39 -04:00
Daniel Hahler
48e612601b
s:BuildShell: fix E706
...
This happens with old Vim versions (before 7.4.1546):
> Vim(let):E706: Variable type mismatch for: cmd
Ref: https://github.com/vim/vim/commit/f6f32c38b
2019-07-06 07:20:40 -04:00
Tim Pope
fdb57922a4
Update escaping for dynamic :Git invocations
2019-07-06 02:17:38 -04:00
Tim Pope
a025157c5f
Don't rely on shell for quoting
...
Using shell syntax for Fugitive commands has a number of disadvantages:
* Commands behave differently depending on shell and platform.
* Checking for arguments (e.g., did :Ggrep receive --cached?) is
impossible to do robustly.
* Double quoted strings conflict with -bar command chaining.
* Need to use %:S to for expansions, and backslash escaping even inside
single quotes.
This is an experiment that instead implements the quoting ourselves.
For backwards compatibility, :Git and :Gcommit support double quoted
strings, but this is deprecated.
2019-07-06 00:55:25 -04:00
Tim Pope
3684c01ef4
Smarter :Gstatus reload
2019-07-05 10:36:06 -04:00
Tim Pope
0f46d5ce32
Don't throw exception on :Gedit :bogus
2019-07-05 10:36:06 -04:00
Tim Pope
ef820b7577
Separate argument massaging from shell quoting
2019-07-05 08:03:53 -04:00
Tim Pope
137433c3c0
Eliminate shell syntax in :Gstatus undo
2019-07-05 05:03:57 -04:00
Tim Pope
ed5ac8dc5d
Fix jump to patched line in :Gstatus
2019-07-05 05:03:57 -04:00
Tim Pope
a0e8f59b68
Make :Glog a bit less insufferable
...
This desperately needs async job support, but until I get around to
implementing that, this will have to do.
2019-07-04 08:49:00 -04:00
Tim Pope
04c68837d3
Fix stacking untracked files
2019-07-04 08:48:54 -04:00
Tim Pope
a9572e9ea6
Fix inline diff expansion
2019-07-04 08:44:42 -04:00
Tim Pope
4466eeb47a
Restore "Untracked" section
2019-07-04 07:29:08 -04:00
Tim Pope
c62d23bc18
Change s:StageInfo() to use absolute paths like s:Selection()
2019-07-04 07:29:08 -04:00
Tim Pope
51c54138ba
Fix count on :Gstatus maps
2019-07-04 07:14:07 -04:00
Tim Pope
fc6643c318
Remove hard coded length limit of 40 on hashes
...
SHA-256 is coming eventually, may as well rip these out now.
2019-07-04 02:36:26 -04:00
Tim Pope
302ee3b41c
Fix P in :Gstatus
2019-07-03 17:17:45 -04:00
Tim Pope
d238736a30
Remove weird FAQ entry
2019-07-03 06:21:52 -04:00
Tim Pope
cf5b43443f
Encapsulate "-z" null splitting
2019-07-02 06:58:50 -04:00
Tim Pope
39087fed59
Encapsulate system() plus v:shell_error
2019-07-02 06:58:50 -04:00
Tim Pope
77d86594cc
Encapsulate common v:shell_error usages
2019-07-02 06:58:50 -04:00
Tim Pope
17618402fa
Remove :terminal special case for Neovim :Git
...
Neovim appears to be better about not locking up on terminal input, and
GIT_TERMINAL_PROMPT=0 gives us belt-and-suspenders protection.
2019-07-01 18:37:00 -04:00
Tim Pope
461c1beefa
Fix extra space in win32 environment variables
...
Closes https://github.com/tpope/vim-fugitive/issues/1271
2019-07-01 17:59:25 -04:00
Tim Pope
0d6ffcc3a9
Fix docs for :0 removal
2019-07-01 05:54:55 -04:00
Tim Pope
b343a4bec0
Add error handling to s:TreeChomp()
2019-07-01 05:52:05 -04:00
Tim Pope
14649fb858
Restore autowrite before :Gcommit
2019-07-01 05:52:02 -04:00
Tim Pope
3d252dac21
Avoid use of :! in :Gcommit
...
References https://github.com/tpope/vim-fugitive/issues/435
2019-07-01 00:02:42 -04:00
Tim Pope
cf9c04af06
Eliminate environment juggling in :Gcommit
2019-07-01 00:02:42 -04:00
Tim Pope
74fc4b5eea
Avoid intermediary v:errmsg in exception handling
2019-07-01 00:02:42 -04:00
Tim Pope
384c9e1d8e
Support :tcd in initialization
2019-06-30 21:11:31 -04:00
Tim Pope
4a94b374d0
Fix bug revealing next hunk
2019-06-29 20:50:14 -04:00
Tim Pope
7c66d544e5
Only target current file if range is given to :Glog
2019-06-29 19:55:16 -04:00
Tim Pope
c8ac43422e
Adjust viewport position *after* reload
...
References https://github.com/tpope/vim-fugitive/issues/1268
2019-06-29 19:19:09 -04:00
Tim Pope
9c195de61b
Fix dd in :Gstatus staged section
...
References https://github.com/tpope/vim-fugitive/issues/1269
2019-06-28 14:42:01 -04:00
Tim Pope
cb4bb94f7b
Fix dd in :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1269
2019-06-28 14:31:37 -04:00
Tim Pope
198e9c4128
Improve :Gstatus support for renames
...
Closes https://github.com/tpope/vim-fugitive/issues/1175
2019-06-27 23:49:32 -04:00
Tim Pope
8e024f9bcc
Add <mods> helper function
2019-06-27 23:49:32 -04:00
Tim Pope
192538c0a7
Fix :Gstatus overscroll when already at bottom of document
2019-06-27 23:09:34 -04:00
Tim Pope
0f20c35b62
Fix error on :Gedit with no argument
2019-06-25 16:28:36 -04:00
Tim Pope
fc529da8ae
Work around autowrite bug when :terminal is open
2019-06-25 14:03:33 -04:00
Tim Pope
a0815c7010
Retire :Gedit -..., :Gedit @{...}, and :Gedit :n
...
I'm introducing :Gedit >... as a new shorthand because a leading > is
handled by fnameescape(), but it's very ugly, I don't think I want to
make it official.
2019-06-25 04:33:36 -04:00
Tim Pope
aff3359699
Retire :Gedit ^n and :Gedit ~n
2019-06-25 04:06:38 -04:00
Tim Pope
66a927524a
Don't map <CR> in editable index buffers
2019-06-25 04:02:02 -04:00
Tim Pope
6d42c7df44
Fix fugitive#isdirectory() with trailing slash
2019-06-08 02:42:32 -04:00
Tim Pope
bf7f05e62b
Accept a count to :Git
...
Now that <mods> support is widely available, I'm considering moving all
:Gsplit! variants onto :Git!, and making :0Git! suppress the split.
2019-06-05 22:43:31 -04:00
Tim Pope
41a734ef49
Fix Fugitive activation when historical version does not exist
...
I believe I omitted BufNewFile here because it seemed like kind of a
silly event for an unmodifiable, unwritable buffer, but I wasn't taking
into account that event is needed for Fugitive to activate.
Closes https://github.com/tpope/vim-fugitive/issues/1261
2019-06-03 21:06:59 -04:00
Tim Pope
a135d10967
Only activate Projectionist if config file exists
...
References https://github.com/tpope/vim-projectionist/issues/130
2019-06-03 00:32:19 -04:00
Tim Pope
8bbc4d8816
Eliminate repeated $GIT_DIR check
2019-06-03 00:32:19 -04:00
Tim Pope
078ffa6197
Don't assume b:git_dir is an actual directory
...
This is a quick first pass. There may be others hiding.
References https://github.com/tpope/vim-fugitive/issues/776
2019-06-02 18:56:29 -04:00
Teo Ljungberg
79f3be9f17
Abbreviate commit SHA1s for :Grebase -i
...
Rather than generating the full 40 character SHA1, this commit changes
the rebase todo file to use the abbreviated kind.
2019-06-02 12:59:47 -04:00
Tim Pope
0f9db6af70
Fix garbled screen after :Git! and related commands
...
Closes https://github.com/tpope/vim-fugitive/issues/1258
2019-05-21 17:00:12 -04:00
Tim Pope
5d99841b22
Fix fugitive#glob('[^x]')
2019-05-04 18:54:16 -04:00
Tim Pope
2bde1d9de6
Don't activate autocmds with tmp filenames
...
This was done in d4fb2a2f5c to fix
filetype modelines, but it appears to no longer be necessary and is
confusing other plugins.
2019-05-02 23:44:16 -04:00
Tim Pope
b27e71c34b
Add <nowait> to gq map
2019-05-02 23:44:16 -04:00
Tim Pope
cfbaa27d11
Fix :Gstatus log with unpushed remote
2019-05-02 23:44:16 -04:00
Teo Ljungberg
16b7a060a3
Pass in matching number of arguments for :Gread
...
This was changed in 1ac2c70 for the other git commands, leading to the
following error message:
```
E118: Too many arguments for function: s:ReadCommand
```
2019-04-24 13:18:19 -04:00
Tim Pope
1ac2c707e5
Begin moving to standard command implementation interface
...
This is just the low hanging fruit. The goal is to make these adhere to
account for all possible future parameters so that these functions can
(maybe) be made public.
2019-04-05 21:47:09 -04:00
Tim Pope
4ec81b5251
New naming scheme for completion functions
2019-04-05 21:47:09 -04:00
Tim Pope
60eac8c974
Call :Gcommit from :Grebase --continue
2019-04-05 21:47:09 -04:00
Jay Sitter
1b3668b89f
Allow --abbrev as :Gblame argument ( #1243 )
2019-04-04 14:28:14 -04:00
Tim Pope
3aaeaca87b
Fix restore of sequence editor
2019-04-04 13:59:42 -04:00
Tim Pope
59f104075c
Revert "Add documentation for --relative-date in :Gblame"
...
This option doesn't work very well.
This reverts commit 86d6872ce2 .
2019-04-04 13:59:42 -04:00
Jay Sitter
86d6872ce2
Add documentation for --relative-date in :Gblame
2019-04-04 13:48:33 -04:00
Tim Pope
bd0b87d36a
Provide gq to close status buffer
...
References https://github.com/tpope/vim-fugitive/issues/1221
2019-03-01 16:43:42 -05:00
Tim Pope
57b4d848a4
Use :setlocal for all local options
2019-02-28 20:08:59 -05:00
Tim Pope
94723902fb
Remove stopgap support for reload after :Dispatch
...
ShellCmdPost is now supported in dispatch.vim.
2019-02-28 20:08:59 -05:00
Maksim Odnoletkov
ddd0513071
Reblame at HEAD from dirty lines
...
HEAD blame seems to be much more useful than index blame. You can
continue following evolution of the line with further jumps while before
you got struck on 'not yet committed' line if it was already added to
the index.
2019-02-27 23:59:39 -05:00
Tim Pope
b44b7b8ae7
Encapsulate b:git_dir
2019-02-27 23:42:58 -05:00
Tim Pope
0171b2a5b0
Fix function name mutilated by search and replace
2019-02-27 23:42:58 -05:00
Tim Pope
666c4abc12
Brute force mapping jumps
...
This is supposed to happen on FileType git, but depending on autocommand
order, exists('b:git_dir') might erroneously fail.
2019-02-27 23:42:58 -05:00
Tim Pope
a69b0b0fd6
Fix unofficial "a" map
...
Closes https://github.com/tpope/vim-fugitive/issues/1218
2019-02-25 14:18:36 -05:00
Tim Pope
66073d955d
Use blamed file when calling :Gbrowse in blame buffer
2019-02-25 14:18:36 -05:00
bennyyip
1a3c04585b
Gblame: allow passing --relative-date
2019-02-23 19:38:43 -05:00
Tim Pope
ad32eae7e2
Override color.ui=always
...
Closes https://github.com/tpope/vim-fugitive/issues/1217
2019-02-23 18:11:31 -05:00
Tim Pope
c5d8b25c5e
Don't repeatedly trigger FocusGained on win32
...
References https://github.com/tpope/vim-fugitive/issues/1209
2019-02-23 15:21:30 -05:00
Tim Pope
f259fd5d6d
Provide "i"
...
This is a weird one, and might get axed.
2019-02-21 13:28:10 -05:00
Tim Pope
755554bb3c
Sort untracked files before unstaged files
2019-02-21 13:28:10 -05:00
Tim Pope
28a03d0b00
Provide option for status reloading
...
Closes https://github.com/tpope/vim-fugitive/issues/1209
2019-02-21 13:28:10 -05:00
Tim Pope
8caa4a0ba3
Try J/K for next/previous
...
I'm also entertaining using J to toggle the "squash" instruction in an
interactive rebase, so no documentation for these yet.
2019-02-21 12:39:16 -05:00
Tim Pope
01b9a645b6
Provide checkout --ours/--theirs on X
...
Closes https://github.com/tpope/vim-fugitive/issues/954
2019-02-20 23:49:41 -05:00
Tim Pope
74aefa53ac
Support X on newly added file
...
Closes https://github.com/tpope/vim-fugitive/issues/1212
2019-02-20 23:49:41 -05:00
Tim Pope
654f7f5432
Support "." in visual mode
2019-02-20 23:41:32 -05:00
Tim Pope
26cf153e76
Refactor status spaghetti into dispatch mechanism
2019-02-18 17:26:39 -05:00
Tim Pope
15fb5f68ad
Remove duplicate q map
2019-02-18 14:02:33 -05:00
Tim Pope
a489c6e1d3
Fix reveal of hunks on CTRL-N
2019-02-13 21:01:19 -05:00
Tim Pope
02c26619c4
Remove duplicate help tag
...
These should be unified, but for now, --patch is just stealing the
spotlight from inline diffs, so I won't shed any tears over dropping its
help tag.
Closes https://github.com/tpope/vim-fugitive/issues/1203
2019-02-12 15:58:53 -05:00
Tim Pope
e9705826bd
Trailing whitespace
2019-02-12 11:19:18 -05:00
Tim Pope
8c33bdfc26
Update :Gstatus description in README
...
This still doesn't do it justice, but it's a step in the right
direction.
2019-02-12 11:06:12 -05:00
Tim Pope
b3de2f2284
Handle mysterious tab at the end of a diff filename with spaces
...
Closes https://github.com/tpope/vim-fugitive/issues/1202
2019-02-12 10:39:24 -05:00
Tim Pope
5c5581386f
Redo :Gstatus documentation
2019-02-11 13:22:47 -05:00
Tim Pope
817fc15287
Remove comment
2019-02-11 09:06:14 -05:00
Brennen Bearnes
ce8ddf37fc
Fix autocmds & alternate file handling for "index"
...
This commit tweaks the existing autocommand for files matching
`index{,.lock}` to:
- Fire BufReadPre and BufReadPost on either side of the read
operation for files not in a `.git/` and already extant.
- Fire BufNewFile for new files not in a `.git`.
- Add `keepalt` to the `read`, thus allowing alternative file
operations such as Ctrl-^ to work correctly.
Has been tested against:
- BufReadPost,BufNewFile autocommands
- A basic test case for alternate files where one is named `index`
Closes https://github.com/tpope/vim-fugitive/issues/834
Closes https://github.com/tpope/vim-fugitive/issues/959
2019-02-11 09:05:36 -05:00
Tim Pope
7cb2ca81e3
Use current window for :0Gsplit
...
This is to enable :0Gsplit! to replace :Git!, opening that command up
for something more useful.
2019-02-10 18:49:04 -05:00
Tim Pope
0727261b38
Fix current line assumption
2019-02-10 18:49:04 -05:00
Tim Pope
489201879b
Eliminate s:StageReloadSeek()
2019-02-10 18:49:04 -05:00
Tim Pope
8899468c09
Handle git --version with (Apple ...) suffix
...
References https://github.com/tpope/vim-fugitive/issues/1194
2019-02-06 15:54:00 -05:00
Tim Pope
ed07f9a503
Guard against status reloading in wrong buffer
...
Closes https://github.com/tpope/vim-fugitive/issues/1191
2019-02-03 01:58:29 -05:00
Henrique Malheiro
c98d3cf38f
Fix bug in excluding Gstatus window from reuse
...
When Gstatus is the only window, executing Gdiff results in the Gstatus
being reused for the diff split.
Closes https://github.com/tpope/vim-fugitive/issues/853
2019-02-02 13:02:41 -05:00
David Briscoe
3304c14c63
Move filetype to after maps to allow user maps
...
The easiest way for users to define their own maps in Gstatus buffers is
using a ftplugin/fugitive.vim file with a `b:fugitive_type != 'index'`
guard. Setting the filetype after defining the maps allows users to
maniuplate "dangerous" maps and otherwise customize mappings.
For example, in ~/.vim/after/ftplugin/fugitive.vim:
if !exists('g:loaded_fugitive') || b:fugitive_type != 'index'
finish
endif
" Use s to stage *and* unstage changes: shadows -.
nmap <buffer> <silent> s -
xmap <buffer> <silent> s -
" I hit this by accident.
nunmap <buffer> X
2019-01-31 01:43:18 -05:00
Tim Pope
d27dbc40d4
Respect 'splitbelow' in :Gstatus
...
References https://github.com/tpope/vim-fugitive/issues/1169
2019-01-27 07:53:13 -05:00
John Drouhard
50cf1b3bd1
Fix s:Cd() usage in the Gblame command
...
Most usages in commit da3b2f32 (Support tab local working directories)
were updated to use this pattern, but Gblame missed the boat. Without
this, Gblame will change the root git tree but won't change back to the
previous location.
2019-01-27 05:26:00 -05:00
Tim Pope
8b32524219
Don't force foldtext for status buffer
...
Closes https://github.com/tpope/vim-fugitive/issues/1183
2019-01-26 03:55:33 -05:00
Tim Pope
5a7f5967e7
Don't set readonly globally
2019-01-24 14:11:07 -05:00
Tim Pope
552baf98b3
Support git grep --column
...
Closes
https://github.com/tpope/vim-fugitive/issues/1168
2019-01-13 15:17:09 -05:00
Tim Pope
58a4a2e102
Provide Git version comparison API
2019-01-13 15:17:09 -05:00
Maksim Odnoletkov
8bf74ceef3
Make all maps reblame at index when on dirty lines
...
Otherwise parent and grandparent maps lead to invalid URLs
2019-01-11 23:00:29 -05:00
Tim Pope
fe467f78bc
Allow ShellCmdPost to fire inside :Make
...
This was trying to block `au QuickFixCmdPost * copen` as it interfered
with restoring the working directory, but that was mainly a concern for
the other half of the conditional, so restore it to enable the status
buffer to reload.
2019-01-11 14:11:25 -05:00
Tim Pope
07845537d7
Fix :belowright Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1169
2019-01-11 13:58:40 -05:00
Tim Pope
ddc5e1a21a
Reload status after :Gpush and :Gfetch
...
So :make does indeed invoke ShellCmdPost. I just forgot about the
:noautocmd.
Closes https://github.com/tpope/vim-fugitive/issues/1166
2019-01-09 20:00:35 -05:00
Tim Pope
9211b11cd2
Use native edit commands in :Gstatus
...
This lets the :topleft modification kick in on older versions of Vim.
2019-01-09 15:00:36 -05:00
Tim Pope
6e74463965
Run :Gstatus edit command at top level
...
This results in a cleaner error when calling :edit in a modified file.
2019-01-09 14:57:07 -05:00
Tim Pope
b8a6fd204c
Always default to horizontal split for :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1163
2019-01-09 14:03:43 -05:00
Tim Pope
75ca90739b
Ignore warnings in git status --porcelain
2019-01-09 14:03:43 -05:00
Tim Pope
5a1c8bbe46
Reload status on all quickfix commands
...
I thought that I had confirmed :make triggered ShellCmdPost but
apparently not.
Closes https://github.com/tpope/vim-fugitive/issues/1166
2019-01-09 14:03:43 -05:00
Tim Pope
bb46630828
Clarify that removal notices need to be fixed at the source
2019-01-07 11:30:04 -05:00
Tim Pope
c448104332
Fix :Gread deleting too much due to closed folds
2019-01-07 10:23:17 -05:00
Tim Pope
441074f881
Fix unstaging a deleted file
...
Apparently the -- is mandatory if the file no longer exists.
Closes https://github.com/tpope/vim-fugitive/issues/1161
2019-01-07 10:23:17 -05:00
Tim Pope
68cd7ecf71
Add simple rebase maps
...
Leaving undocumented until the rebase functionality is more fleshed out.
2019-01-06 01:58:15 -05:00
Tim Pope
fbeb9d6793
Use appropriate message for :Glog --walk-reflogs
2019-01-06 01:58:15 -05:00
Tim Pope
07f4f8d2a9
Don't set global value of 'modifiable'
2019-01-06 01:58:15 -05:00
Tim Pope
29f16cd924
Deprecate :Glog defaulting to current file
2019-01-05 14:08:01 -05:00
Tim Pope
b9ea3efdf8
Fix navigation maps like ~ in commit
2019-01-05 01:57:13 -05:00
Tim Pope
b1a993964b
Fix commit maps while accommodating bad modelines
...
We need modifiable off for the maps to kick in, but we need to turn it
back off before the doautocmd or else it will throw an error if the
modeline modifies the buffer with an option like fileencoding, which you
should never do, stop doing it.
2019-01-05 01:44:04 -05:00
Tim Pope
b88d064ac4
Nobody has a version of Vim older than 7.2 anymore
2019-01-05 01:36:40 -05:00
Tim Pope
201896b9a2
Clarify - map
2019-01-05 01:33:17 -05:00
Tim Pope
acf3cb4400
Reveal full hunk on :Gstatus CTRL-N
2019-01-03 22:47:41 -05:00
Tim Pope
9c74c0d0a7
Restore :checktime for :Gstatus delete
...
I assumed this was a naive attempt to reload the status buffer, when in
fact it was concerned with reloading the deleted file.
2019-01-03 22:47:41 -05:00
Tim Pope
4df6525284
Fix check for :Gstatus window
2019-01-03 22:47:41 -05:00
Tim Pope
a4de0238bb
Try split instead of preview window for :G
2019-01-03 21:08:27 -05:00
Tim Pope
227159e964
Include backslash lines in diff hunks
2019-01-03 21:08:27 -05:00
Tim Pope
9e4fd4b3f6
Run diff for :Gstatus from project root
...
Closes https://github.com/tpope/vim-fugitive/issues/1155
2019-01-03 21:08:27 -05:00
Tim Pope
8c89c8d1f5
Enable maps in :Git! output buffers
2019-01-03 16:08:01 -05:00
Tim Pope
42408d6a2e
Don't break jump list when loading buffer
...
Closes https://github.com/tpope/vim-fugitive/issues/1124
2019-01-03 16:08:01 -05:00
Tim Pope
3383badda5
Don't stage/unstage from unstage/stage maps
...
This needs count and visual selection support.
2019-01-03 12:20:54 -05:00
Tim Pope
faeb3a9726
Enable discarding individual hunks
2019-01-03 11:44:19 -05:00
Tim Pope
357fbdbcf9
Enable staging individual hunks
2019-01-03 11:44:19 -05:00
Tim Pope
6cf448324c
Fix inline diffs including submodule logs
...
Closes https://github.com/tpope/vim-fugitive/issues/1151
2019-01-03 11:44:19 -05:00
Andrew Haust
fa6d7886e7
Fix patch mapping in README
2019-01-03 11:02:10 -05:00
Tim Pope
d948ec3376
Support expanding inline diffs in :Gstatus
2019-01-03 00:19:21 -05:00
Tim Pope
51abc6a1bb
Fix :Gstatus toggle on Unstaged heading
2019-01-02 16:58:50 -05:00
Tim Pope
d4e06150cb
Fix issue loading conflict buffers on :Grebase -i
2019-01-02 16:58:50 -05:00
Tim Pope
61d467b573
Extract function for reloading individual :Gstatus
2019-01-02 16:58:50 -05:00
Tim Pope
054ac50975
Fix reference to rebase buffer when closing tab
2019-01-01 19:28:01 -05:00
Tim Pope
037965583e
Don't overlap navigation maps with :Gcommit maps
2019-01-01 19:01:33 -05:00
Tim Pope
4c7998f58c
Add :G as alias for :Gstatus
2019-01-01 14:21:16 -05:00
Tim Pope
40e8d0b9f0
Support for :Grebase --interactive
2018-12-31 13:48:38 -05:00
Tim Pope
9aef731593
Add rebase summary to :Gstatus
...
For lack of better ideas this is heavily inspired by Magit, though I'm
not really convinced it's the best representation.
2018-12-31 12:08:31 -05:00
Tim Pope
bad1331607
Don't jump from :Gstatus another :Gstatus
2018-12-31 12:07:45 -05:00
Tim Pope
ce3d3df508
Fix maps in commit buffers
2018-12-31 01:45:12 -05:00
Tim Pope
cb18a96651
Do what I mean for :Grebase --autosquash
2018-12-31 01:01:07 -05:00
Tim Pope
b8364709e7
Refer :Gstatus p users to P
2018-12-31 01:01:07 -05:00
Tim Pope
b9825af3dc
Fix focus bug on reloading multiple :Gstatus buffers
2018-12-31 01:01:07 -05:00
Tim Pope
08179e1860
Declare highlights as defaults
2018-12-30 22:19:33 -05:00
Tim Pope
682b2acdac
Remove outdated reference to :Gcommit calling :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1144
2018-12-29 12:40:06 -05:00
Tim Pope
d41dee9c0b
Deprecate fugitive#buffer()
2018-12-28 17:54:57 -05:00
rbong
b66141e252
Open todo file on Grebase --edit-todo
2018-12-28 17:53:01 -05:00
rbong
ae8fed6dd3
Call Gcommit on Grebase --continue
...
On a rebase instruction that should result in an immediate commit,
the quickfix list will be closed and Gcommit will be called.
2018-12-28 17:53:01 -05:00
Tim Pope
0850600021
Combine unstaged and untracked files into one section
...
Is this a good idea? Let's find out!
2018-12-27 18:05:29 -05:00
Tim Pope
86990ef899
Fix - on :Gstatus section headings
2018-12-27 17:34:51 -05:00
Tim Pope
f2b644a60b
Set dispatch to :Gfetch in :Gstatus
2018-12-26 16:24:16 -05:00
Tim Pope
a1f9596d2d
Add mods support to :Gmerge
2018-12-26 16:24:16 -05:00
Tim Pope
de1f8b5a20
Fix workaround to reload status after :Dispatch
2018-12-26 16:24:16 -05:00
Tim Pope
a32c301f51
Remove :Gcommit claiming :Gstatus window
2018-12-25 19:36:26 -05:00
Tim Pope
261c00986d
Change vsplit map from S to gO
2018-12-25 19:35:13 -05:00
Tim Pope
01050c9569
Fix :Gstatus error on branch without pull source
2018-12-25 16:35:00 -05:00
Tim Pope
d3468dd09b
Prototype new :Gstatus
2018-12-25 14:11:50 -05:00
Tim Pope
d06080ae35
Reload status after dispatch.vim backed :Gpush
2018-12-24 17:25:32 -05:00
Tim Pope
1044e0f126
Fix config case sensitivity when cached
2018-12-24 17:25:29 -05:00
Tim Pope
d4eba85499
Add maps for :Gcommit --fixup/--squash
2018-12-24 14:42:47 -05:00
Tim Pope
b295f49e93
Change :Gstatus U to g|
...
I want U for a full `git reset`. This will probably end up on X, but I
don't want to do a second abrupt transition, so for now, the official
map is the ungainly g|.
2018-12-24 14:42:47 -05:00
Tim Pope
d625c55689
Fix erratic conf file type on :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1137
2018-12-24 11:36:39 -05:00
Tim Pope
baee3bbfe8
Prevent bad modeline from blocking a :split
...
Closes https://github.com/tpope/vim-fugitive/issues/1136
2018-12-23 17:15:44 -05:00
Tim Pope
38c6acf27a
Disable modelines while loading blob
...
Modelines will still be evaluated by `doautocmd BufReadPost`.
References https://github.com/tpope/vim-fugitive/issues/1136
2018-12-23 14:31:16 -05:00
Zhao Xiaojie
70170d825c
Add Gitee link ( #1099 )
2018-12-22 15:25:41 -05:00
Tim Pope
0f6038881f
Handle case sensitivity in config keys correctly
2018-12-22 14:59:59 -05:00
Tim Pope
4ecd7e8932
Allow reusing dictionary for config queries
2018-12-22 14:59:59 -05:00
Tim Pope
73220820b5
Don't open :Gstatus on empty :Gcommit
2018-12-19 17:25:05 -05:00
Tim Pope
5540d257ef
Add s and u aliases for stage/unstage in :Gstatus
2018-12-19 17:25:05 -05:00
Tim Pope
d48fc4a5ec
Cache config queries
...
Does not support includeIf directives or a system config outside of
/etc/gitconfig for cache expiration.
2018-12-19 17:25:05 -05:00
Tim Pope
c98daaacfe
Refactor :Gstatus reload cursor positioning
2018-12-18 19:53:24 -05:00
Tim Pope
e8f4f28c93
Replace deprecated repository relative path syntax
2018-12-18 18:44:49 -05:00
Tim Pope
da3b2f3285
Support tab local working directories
2018-12-16 22:28:01 -05:00
Tim Pope
2564c37d0a
fugitive.vim 2.5
...
* Support :source and :write on Fugitive URLs.
* Support :Gedit +cmd ++opt.
* Support :Gedit /absolute/path and ./relative/path.
* Support expansion flags, like :Gedit %:h.
* Support completion of commits for --fixup=/--squash=.
* Support :Gread commit to read commit message.
* Adjust :Gbrowse line range for upstream head.
* Map <CR> in blobs to jump to blamed commit.
* Map p to jump to file in preview window.
* Make :Gmove always relative to repository root.
* Load Projectionist config from .git/info/projections.json.
* Drop instaweb support.
* New public function API.
* Major robustness and error handling improvements.
* Bug fixes.
2018-11-22 09:48:10 -05:00
Tim Pope
c316b924e8
Provide FugitivePrepare()
2018-11-22 09:36:28 -05:00
Tim Pope
7a190ead85
Remove transitional functions
2018-11-19 23:01:28 -05:00
Daniel Hahler
e48cf2dadd
Gblame: allow passing --first-parent
...
Also fixes the filter for `--root` and `--show-name`.
2018-11-18 17:11:26 -05:00
Tim Pope
6d497b0e63
Fix erroneous use of :keeppatterns g/.../s//.../
...
Closes https://github.com/tpope/vim-fugitive/issues/1008
2018-10-28 19:48:15 -04:00
Tim Pope
dcf32d2b3d
Clearer errors
2018-10-27 18:22:15 -04:00
Tim Pope
0fd64f8fbf
Remove FugitiveGenerate() in favor of FugitiveFind()
2018-10-21 19:44:20 -04:00
Tim Pope
2845e6dc4f
Fail silently retrieving work tree for blank git dir
...
Closes https://github.com/tpope/vim-fugitive/issues/1113
2018-10-17 23:20:11 -04:00
Tim Pope
7fae98f263
Associate conflicted files with relevant commits
2018-10-12 15:14:49 -04:00
Tim Pope
a9100fafb8
Show 7 not 8 SHA charcters in statusline
2018-09-24 17:04:06 -04:00
Tim Pope
9fec8aadc5
Use merge-base as starting point for ranged :Gbrowse
2018-09-19 17:38:19 -04:00
Tim Pope
66697b99d6
Don't throw error on invalid URL to FugitiveParse()
2018-09-19 17:17:17 -04:00
Tim Pope
fb55319973
Show error getting type for object in BufReadCmd
2018-09-15 16:47:28 -04:00
Justin M. Keyes
02fe20ece4
Use :keeppatterns with :substitute
2018-09-15 12:26:10 -04:00
Rick
6cd8ff77f0
Fix undefined variable
2018-09-13 10:51:08 -04:00
Tim Pope
af76267c6a
Fix backport of @ to old Git
2018-09-12 12:32:43 -04:00
Tim Pope
144b73946e
Older versions of cat-file do not accept --
2018-09-12 12:06:19 -04:00
Tim Pope
d4fb2a2f5c
Fix modeline support in historical buffers
...
Closes https://github.com/tpope/vim-fugitive/issues/1092
2018-09-09 09:37:06 -04:00
Tim Pope
4bf30ce907
Dogfood fugitive#Prepare()
2018-09-02 23:26:14 -04:00
Tim Pope
0fe0964385
Enhance fugitive#Prepare()
2018-09-02 23:25:43 -04:00
Tim Pope
8b4a1017b6
Simplify :Gstatus reset logic
2018-08-29 20:35:35 -04:00
Tim Pope
66e0fe5d3e
Fix - in :Gstatus on line 1 as Vinegar like navigation
2018-08-29 20:34:42 -04:00
Tim Pope
61b09ca6b7
Fix gf in gitcommit diff
...
Closes https://github.com/tpope/vim-fugitive/issues/1084
2018-08-29 17:15:28 -04:00
Tim Pope
b3651aa744
Use platform path separator for Projectionist config
2018-08-29 17:15:28 -04:00
Tim Pope
fd83fcaf90
Support expansion flags
2018-08-28 00:35:35 -04:00
Tim Pope
1e3786734b
Add potential alternative name for FugitiveRoute()
2018-08-28 00:35:35 -04:00
Tim Pope
4d3835f637
Accept buffer number to FugitiveRoute()
2018-08-28 00:35:35 -04:00
Tim Pope
44e5df8433
Provide API for retrieving working dir relative path
2018-08-27 21:04:41 -04:00
Tim Pope
a202238b5d
Support Projectionist config in .git/info/projections.json
2018-08-26 17:42:19 -04:00
Tim Pope
bb2797d313
Special case :0Gread to get around FileReadCmd limitations
2018-08-20 15:00:55 -04:00
Tim Pope
67e9756c35
Support .git/.. to refer to work tree
2018-08-20 15:00:55 -04:00
Tim Pope
ae2005adbb
Return '' for FugitiveRoute('')
2018-08-20 15:00:55 -04:00
Tim Pope
ed36717a68
Use 2 argument system() rather than stdin redirect
2018-08-19 23:26:36 -04:00
Tim Pope
b1ab990314
Use -- to disambiguate arguments
...
This is to enable future replacement of s:Prepare() with
fugitive#Prepare().
2018-08-19 23:24:45 -04:00
Tim Pope
2b5effe2f1
Fix :Gbrowse with cwd other than work tree
2018-08-19 18:27:46 -04:00
Tim Pope
662b501eee
Resolve temp files only when using as buffer name
...
Closes https://github.com/tpope/vim-fugitive/issues/1078
2018-08-19 14:56:34 -04:00
Tim Pope
7bdf33d375
Always convert backslashes on Windows
...
The old conditional was fine for most things, but this ensures that
backslashes are used even for raw user input.
References https://github.com/tpope/vim-fugitive/issues/1079
2018-08-19 14:56:34 -04:00
Tim Pope
e9dc363745
Fix check for need to convert Windows path slashes
...
Closes https://github.com/tpope/vim-fugitive/issues/1079
2018-08-19 05:07:33 -04:00
Tim Pope
9979b2ab7c
Ignore 'shellslash' when checking for Win32 shell
2018-08-19 00:11:46 -04:00
Tim Pope
8589246545
Tweak check for Win32 shell
...
References https://github.com/tpope/vim-fugitive/issues/1079
2018-08-18 23:15:05 -04:00
Tim Pope
7b0aa58090
Accept ./ paths as relative to cwd
2018-08-15 19:24:35 -04:00
Tim Pope
45c21fc384
Normalize path specs when generating commands
2018-08-13 00:08:59 -04:00
Tim Pope
8dc13a6a72
Restore backwards compatible behavior of repo.translate()
2018-08-12 23:03:20 -04:00
Tim Pope
0614acc770
Fix issues with commit:./relative completion
2018-08-12 21:37:38 -04:00
Tim Pope
1a7b07cf22
Support commit:./relative style revisions
2018-08-11 19:15:56 -04:00
Tim Pope
4a3c6b4a56
Adjust section headers
2018-08-11 19:15:56 -04:00
Tim Pope
e3c9588e07
Extract function for getting current commit/ref
2018-08-11 19:15:56 -04:00
Tim Pope
40facfde5e
Rewrite <C-R><C-G> and y<C-G>
2018-08-11 02:41:33 -04:00
Tim Pope
236bd21b45
Use <nowait> for - maps
...
Closes https://github.com/tpope/vim-fugitive/issues/1076
2018-08-11 02:41:33 -04:00
Tim Pope
e9ce313912
Support pathspec arguments to :Gcd
2018-08-11 01:26:23 -04:00
Tim Pope
74b10425eb
Fix legacy expansion of bare caret/tilde
2018-08-11 01:26:21 -04:00
Tim Pope
1a041936da
Provide less awkward signature for s:Prepare()
2018-08-11 00:55:21 -04:00
Tim Pope
a358191cfb
Use unambiguous paths for :Gstatus dot map
...
When the current working directory isn't the work tree, use absolute
paths so that pairing with both :Git and :! works as expected.
2018-08-10 19:22:13 -04:00
Tim Pope
597289e64d
Handle :Gmove paths consistently
2018-08-10 19:22:13 -04:00
Tim Pope
7ea21ca9ac
Give precedence to absolute paths over pseudo-relative
...
I was planning on phasing out support for /path to access a file in the
root of the repo slowly, but life gets simpler if we can count on
absolute paths always working as expected.
2018-08-10 16:00:46 -04:00
Tim Pope
2ca0765dc4
Ignore dot files when globbing
2018-08-10 16:00:46 -04:00
Tim Pope
347d309efb
Mention :Gcommit %
...
Closes https://github.com/tpope/vim-fugitive/issues/1029
2018-08-10 16:00:42 -04:00
John Varga
6138aebbbb
Fix minor spelling error in help document
2018-08-08 16:26:11 -04:00
Tim Pope
dd262b7e21
Decouple routing from repo object
2018-08-06 16:38:49 -04:00
Tim Pope
f91c34069e
Decouple Head() from repo object
2018-08-06 16:38:49 -04:00
Tim Pope
40e2dcba05
Delegate to other real filename implementations
2018-08-06 16:38:49 -04:00
Tim Pope
a3e9518186
Fix file API to distinguish between commits
2018-08-06 16:38:49 -04:00
Tim Pope
8c63314381
Report error checking for merge conflict
...
References https://github.com/tpope/vim-fugitive/issues/756
2018-08-06 11:13:42 -04:00
Tim Pope
12e0151750
Adjust completion of /absolute/paths
...
Support for an initial slash to access a work tree file is being phased
out.
2018-08-06 10:55:46 -04:00
Tim Pope
887d86e920
Don't strip trailing slash from URLs
2018-08-06 10:54:09 -04:00
Tim Pope
73ed8e8a71
Fix check for empty remote
2018-08-06 01:45:39 -04:00
Tim Pope
4bf7f2fd69
Support :(top) pseudo-pathspecs
2018-08-04 20:13:47 -04:00
Tim Pope
08d471056e
Provide fugitive#Prepare()
2018-08-04 20:13:47 -04:00
Tim Pope
969a3d857f
Don't escape "!" when calling :terminal
2018-08-04 20:13:47 -04:00
Tim Pope
06b3da7204
Fix shell expansion in :Git! buffers
2018-08-04 18:54:28 -04:00
Tim Pope
db3b837e6e
Rewrite :Glog to use string argument rather than list
...
This makes shell expansion less weird.
2018-08-03 01:35:44 -04:00
Tim Pope
b780bce39b
Expand argument to :Gwrite
2018-08-02 22:50:33 -04:00
Tim Pope
a615172b14
Edit index file when no work tree present
...
Life gets simpler if this function never fails.
2018-08-02 18:39:02 -04:00
Tim Pope
caee67c748
Fix query operations in bare repositories
2018-08-02 18:39:02 -04:00
Tim Pope
1fea1e5821
Support :Gedit /absolute/path when possible
...
Usage of /relative/path is deprecated in favor of ./relative/path, but
it's still supported on top of this for now.
2018-08-02 15:32:14 -04:00
Tim Pope
80e410c81a
Fix :Gedit default from commit to work tree
2018-08-02 15:16:36 -04:00
Tim Pope
84fcfae7f0
Unify shell expansion
2018-08-01 21:49:49 -04:00
Tim Pope
4d684256ba
Update :Gbrowse docs
2018-08-01 17:21:16 -04:00
Tim Pope
0e948d514c
Fix write command with Win32 path
2018-08-01 14:14:38 -04:00
Tim Pope
4eee908ad5
Adjust :Gbrowse range for upstream head
2018-08-01 13:54:12 -04:00
Tim Pope
c1d2fc1a19
Remove filename expansion from buffer object
...
This has long haunted me as a particularly egregious design, as
expansion of "%" is always respective to the current buffer.
2018-07-31 23:57:38 -04:00
Tim Pope
c85980cd93
Rename s:shellslash() to s:Slash()
2018-07-31 16:39:15 -04:00
Tim Pope
81deb6333a
Improve worktree support
2018-07-31 16:39:13 -04:00
Tim Pope
85f340590d
Fix :Gbrowse in historical buffers
2018-07-31 15:25:14 -04:00
Tim Pope
fc8f9eda9d
Rename Fugitive revisions to Fugitive objects
...
Neither term is great, as they both exclude work tree files in Git
parlance, but "object" is a better umbrella term as "revision" can be
actively misleading in some contexts.
2018-07-31 02:44:44 -04:00
Tim Pope
c82abd0558
Fix function reference
2018-07-31 02:44:42 -04:00
Tim Pope
d859e05f00
Really fix :Gcd
...
Closes https://github.com/tpope/vim-fugitive/issues/1071
2018-07-31 02:24:31 -04:00
Tim Pope
3feda7f440
Fix :Gcd
...
Closes https://github.com/tpope/vim-fugitive/issues/1071
2018-07-31 01:00:14 -04:00
Tim Pope
c9c406a118
Fix extra slash generating work tree filenames
...
Closes https://github.com/tpope/vim-fugitive/issues/1069
2018-07-30 19:40:47 -04:00
Tim Pope
a877908acd
Fix check for absolute path in FugitiveGenerate()
2018-07-30 01:36:31 -04:00
Tim Pope
6c89a3675b
Support :Gedit +cmd ++opt
2018-07-30 00:47:26 -04:00
Tim Pope
bf796562b6
Add better name for function as alias
2018-07-29 22:41:29 -04:00
Tim Pope
023ab8e4a6
Eliminate s:repo() and s:buffer()
2018-07-29 22:41:29 -04:00
Tim Pope
da95d96ece
Replace s:repo().rev_parse()
2018-07-29 22:41:29 -04:00
Tim Pope
8a0a448f56
Show fake trees when editing directory in index
2018-07-29 15:08:31 -04:00
Tim Pope
004da420e5
Match trailing slash in FugitivePath()
2018-07-29 14:30:51 -04:00
Tim Pope
8b4194047c
Rearrange
2018-07-29 14:30:48 -04:00
Tim Pope
716edd4bc0
Redo completion
2018-07-29 00:24:28 -04:00
Tim Pope
70c0f132f5
Fix :Gblame
2018-07-29 00:24:28 -04:00
Tim Pope
a8392e0ebb
Fix fugitive#Real() with non-Fugitive URL
2018-07-29 00:24:28 -04:00
Tim Pope
64fbfc7a8d
Whitespace fix
2018-07-29 00:24:28 -04:00
Tim Pope
f232e4c6a3
Support completion of local commits for --fixup=/--squash=
2018-07-28 22:05:03 -04:00
Tim Pope
db7fd110a8
Move implementation functions below public API
2018-07-28 22:05:03 -04:00
Tim Pope
248764f2c3
Provide FugitiveGitDir()
2018-07-28 22:05:03 -04:00
Tim Pope
f8fb5eafab
Eliminate remaining s:repo().dir() and s:repo().tree() calls
2018-07-28 22:05:03 -04:00
Tim Pope
4f82d241cc
Fix jump to file
2018-07-28 22:05:03 -04:00
Tim Pope
f761ea700c
Rewrite :Gedit and :Gread
2018-07-28 20:33:28 -04:00
Tim Pope
035cdf44e8
Make fugitive#Prepare() private
2018-07-28 20:33:17 -04:00
Tim Pope
deaf4aa139
Pass absolute paths through FugitiveGenerate() unchanged
...
This is designed to exclude traditional paths, URLs, and also Vim
constructs like zipfile:c:\foo.zip::file.
2018-07-28 20:33:17 -04:00
Tim Pope
da066426fd
Use <amatch> in detection autocommands
2018-07-28 19:43:44 -04:00
Tim Pope
4643363b08
Handle FugitiveReal('') correctly
2018-07-28 19:43:44 -04:00
Tim Pope
c5d4ce7479
Fix map to follow the pattern
2018-07-28 17:37:07 -04:00
Ryo Susami
6eadff1107
Correct the directory separator of Path() on Windows ( #1067 )
2018-07-28 01:50:51 -04:00
Tim Pope
c68fb3c83a
Remove redundant maps
2018-07-27 13:42:11 -04:00
Tim Pope
6c09ce3ab4
Prefer :Gedit to s:Edit() where possible
2018-07-27 13:39:53 -04:00
Tim Pope
cec05fac01
Fix missing :Gblame in work tree files
...
Closes https://github.com/tpope/vim-fugitive/issues/1066
2018-07-27 08:54:58 -04:00
Tim Pope
4b0475f9d8
Map <CR> in blobs to jump to blamed commit
2018-07-27 01:48:44 -04:00
Tim Pope
8edc9cd006
Work around janky autocommands when returning to diffed window
...
Closes https://github.com/tpope/vim-fugitive/issues/1065
2018-07-27 01:46:13 -04:00
Tim Pope
382c0a5405
Provide config functions globally
...
This makes it easier to check for them with exists().
2018-07-27 01:46:13 -04:00
Tim Pope
c472b8f2c1
Provide file permission API
2018-07-27 01:34:49 -04:00
Tim Pope
30c2490b6e
Provide file writing API
2018-07-27 01:34:49 -04:00
Tim Pope
5a9b7a593b
Provide file deletion API
2018-07-27 01:34:49 -04:00
Tim Pope
4ce8646410
Remove s:repo().aliases()
2018-07-27 01:34:49 -04:00
Tim Pope
321f63ff19
Compartmentalize filetype support
2018-07-27 00:19:57 -04:00
Tim Pope
7f299fbbe3
Eliminate remaining uses of s:buffer().type()
2018-07-27 00:19:57 -04:00
Tim Pope
6d0df81732
Run correct auto-commands for BufWrite and FileWrite
2018-07-26 20:56:26 -04:00
Tim Pope
5cea916e9c
Support Vim without SourceCmd
2018-07-26 20:54:39 -04:00
Tim Pope
c3c39d904b
Try embedding shell cd if -C not available
...
Old Git versions lacking -C are often paired with old Vim versions
lacking haslocaldir(), so chance some shell weirdness over screwing up
Vim's local directory.
2018-07-26 15:51:06 -04:00
Tim Pope
6bab1a0c39
Map p to jump to file in preview window
...
Closes https://github.com/tpope/vim-fugitive/issues/1047
2018-07-25 16:30:54 -04:00
Tim Pope
49c2a4acb5
Revert "Unify jump to file logic"
...
This reverts commit 73c39195ae , which
broke opening in a different window from :Gstatus.
2018-07-25 16:12:19 -04:00
Tim Pope
73c39195ae
Unify jump to file logic
2018-07-25 02:04:48 -04:00
Tim Pope
f818a947ae
Map p to in :Gblame to open commit in preview window
2018-07-25 01:06:08 -04:00
Tim Pope
fbaa831e57
Show error on :Gblame jump on uncommitted line
2018-07-25 01:06:08 -04:00
Tim Pope
07d30de8be
Return relative paths with second argument to FugitivePath()
2018-07-25 01:04:36 -04:00
Tim Pope
c693da9cb0
Drop support for uppercase statusline indicator
...
If you want this, I'm happy to bring it back as a separate function. I
think it's a bit too clever to detect automatically.
2018-07-25 01:04:36 -04:00
Tim Pope
1e7e707696
Preserve trailing slash in FugitiveReal()
2018-07-24 23:13:29 -04:00
Tim Pope
d818ac93af
Make bang argument to :Glog explicit
...
Playing with some changes here and committing this part makes it easier
to reload the plugin after stashing changes.
2018-07-24 23:13:29 -04:00
Tim Pope
2fcf95467f
Remove obsolete instaweb reference from README
2018-07-24 23:13:29 -04:00
Tim Pope
286476d58f
Fix upwards navigation on "-"
2018-07-24 23:13:29 -04:00
Tim Pope
b78a8ab860
Remove indirection
2018-07-24 23:13:29 -04:00
Tim Pope
e6e3f3f225
Don't :cd if directory already correct
2018-07-24 19:58:01 -04:00
Tim Pope
240127f5a5
Eliminate use of buffer.commit()
...
Can't add a s:Commit() helper because that's the :Gcommit implementation
function, dang it.
2018-07-24 19:58:01 -04:00
Tim Pope
bfc1745f3b
Handle bare repository case when shelling out
2018-07-23 13:55:50 -04:00
Tim Pope
93f29cf831
Fix shelling out from subdirectory
...
Closes https://github.com/tpope/vim-fugitive/issues/1061
2018-07-23 13:50:48 -04:00
Tim Pope
5879304769
Move GIT_INDEX_FILE override closer to home
2018-07-23 13:50:48 -04:00
Tim Pope
196e448375
Make :Gmove always relative to repository root
2018-07-22 19:16:17 -04:00
Tim Pope
e0b770a9bd
Drop instaweb support
...
I had been considering extracting it, but it's so badly broken that
clearly nobody actually uses it.
2018-07-22 17:33:59 -04:00
Tim Pope
c938737960
Encapsulate fugitive#buffer().relative()
2018-07-22 16:17:17 -04:00
Tim Pope
978ca4a5ce
Encapsulate fugitive#repo().git_chomp_in_tree()
2018-07-22 16:14:42 -04:00
Tim Pope
a8626a4ca4
Avoid false positive matches of status files in non-status buffers
2018-07-22 01:58:20 -04:00
Tim Pope
4a5781bc1b
Fix issue generating Fugitive URLs
2018-07-22 01:57:39 -04:00
Tim Pope
71acb7da35
Provide FugitiveGenerate() and FugitiveParse()
2018-07-22 01:29:49 -04:00
Tim Pope
1e41a88ec9
Default to branch remote rather than origin
2018-07-21 21:53:26 -04:00
Tim Pope
9e7b67e9b0
Refactor repo.translate for future extraction
2018-07-21 21:53:26 -04:00
Tim Pope
445a8160d2
Provide Git dir to browse handlers
2018-07-21 21:53:26 -04:00
Tim Pope
cb49f8b4be
Drop repo.dirglob
2018-07-21 21:53:26 -04:00
Tim Pope
6aa3f09eb7
Drop buffer.up
2018-07-21 21:42:34 -04:00
Tim Pope
197ca58a95
Remove unused variable
2018-07-21 21:42:34 -04:00
Tim Pope
7165817b69
Attempt 2 at fixing :Gbrowse tagname
2018-07-21 21:42:34 -04:00
Tim Pope
be68a8ec8a
Add Git config query functions
...
Querying the remote URL is a behavior needed by Rhubarb and similar
plugins, so add a function for it in particular.
2018-07-21 17:36:51 -04:00
Tim Pope
b8046d1c5e
Reduce noise on E211 from :Git
2018-07-21 17:36:51 -04:00
Tim Pope
b7e57637ba
Add warning for editing invalid Fugitive URL
...
Closes https://github.com/tpope/vim-fugitive/issues/1060
2018-07-21 17:36:51 -04:00
Tim Pope
35f94eef48
Make argument to FugitiveTreeForGitDir optional
2018-07-21 15:43:10 -04:00
Tim Pope
c118dabb89
Fix :Glog
...
Closes https://github.com/tpope/vim-fugitive/issues/1059
2018-07-20 22:06:22 -04:00
Tim Pope
8c076e3f68
Drop some silly instance methods
2018-07-20 15:30:54 -04:00
Tim Pope
0aa3389f5c
Decouple :Gcommit from repo object
2018-07-20 15:30:54 -04:00
Tim Pope
fb2289982b
Rename overlooked snakecase function
2018-07-20 02:11:19 -04:00
Tim Pope
56e4947843
Support FileWriteCmd
...
This correctly requires a bang to write a partial file, but the error
message is E212 rather than the more appropriate E140.
2018-07-20 00:03:45 -04:00
Tim Pope
99f0431135
Thorough error reporting for broken system() calls
2018-07-19 02:59:29 -04:00
Tim Pope
29411e2801
Decouple autocommand functions from repo object
2018-07-19 02:59:29 -04:00
Tim Pope
c0b6faeae7
Support SourceCmd for Fugitive URLs
2018-07-18 20:11:19 -04:00
Tim Pope
792154e45d
Unify FileReadCmd autocommands
2018-07-18 20:01:58 -04:00
Tim Pope
0717396aa2
Avoid some redundant --git-dir arguments
2018-07-18 20:01:58 -04:00
Tim Pope
9b9a81b170
Fix error on failure to load buffer
2018-07-18 20:01:58 -04:00
Tim Pope
598ad040b3
Fix b:fugitive_type in temp buffers
2018-07-18 19:46:48 -04:00
Tim Pope
805c0bbdd9
Fix i and a in :Gstatus
...
This is a stupid feature that needs to be ripped out.
2018-07-18 19:46:48 -04:00
Tim Pope
1971f8fd62
Restore highlight after warning message
2018-07-18 17:58:56 -04:00
Tim Pope
5ba918ea7b
Support :Gread commit to read commit message
2018-07-17 01:42:57 -04:00
Tim Pope
27475a5d08
Provide function for preparing Git shell command
2018-07-17 01:42:57 -04:00
Tim Pope
e3b1af604c
Work around bad b:git_dir from ftplugin/git.vim
2018-07-17 01:42:57 -04:00
Tim Pope
c9d6c83470
Loosen regexp to allow for Windows paths
2018-07-16 21:44:32 -04:00
Tim Pope
8df073165a
Extract helper for robust tempname
2018-07-16 21:38:21 -04:00
Tim Pope
9bc425e943
Add missing function
2018-07-16 21:38:16 -04:00
Tim Pope
65346f0926
Fix readfile
2018-07-16 20:29:48 -04:00
Tim Pope
5a7469d899
Improve error reporting for BufReadCmd autocommands
2018-07-16 17:11:50 -04:00
Tim Pope
6f07b18012
Allow opting out of :terminal in Neovim
...
Closes https://github.com/tpope/vim-fugitive/issues/1051
2018-07-13 15:14:09 -04:00
Tim Pope
302f30c924
Handle :Gcommit % when working dir isn't Git dir
2018-07-11 00:21:03 -04:00
Tim Pope
7316baffdd
Fix typo in regexp
2018-07-10 17:28:00 -04:00
Tim Pope
85c6c7a837
fugitive.vim 2.4
...
* Split into plugin, autoload, and ftdetect files.
* Support mods like :vertical on :Gstatus and :Gedit family.
* Provide :Grebase (no --interactive).
* Bug fixes.
2018-07-10 00:04:17 -04:00
Tim Pope
6f9fa8a4b1
Document P as preferred :Gcommit map for patching
2018-07-02 18:26:52 -04:00
Tim Pope
65a53b5f5c
Guard against future NERDTree API changes
2018-07-02 15:12:09 -04:00
Tim Pope
0a75ec5d9b
Provide file API
...
You can call these functions directly if you want, but they're designed
to be a generic interface for any URL:
function! s:fcall(fn, file, ...) abort
let ns = matchstr(a:file, '^\a\a\+\ze:')
if len(ns) && exists('*' . ns . '#' . a:fn)
return call(ns . '#' . a:fn, [a:file] + a:000)
else
return call(a:fn, [a:file] + a:000)
endif
endfunction
2018-07-01 20:22:25 -04:00
Tim Pope
80ff014d21
Add function alias
...
This might become the official version.
2018-06-29 18:11:17 -04:00
Tim Pope
b5f7c37d93
Replace buffer.path() with buffer.relative()
2018-06-28 15:44:22 -04:00
Tim Pope
6d2a83232a
Handle bare repos in FugitivePath()
2018-06-28 15:43:52 -04:00
Tim Pope
ea38c7d664
Don't include newline in Git version
2018-06-28 15:43:52 -04:00
Tim Pope
2c30e116ed
Avoid unnecessary IO in translate()
2018-06-27 20:25:43 -04:00
Tim Pope
1988518904
Rename FugitiveFilename() to FugitivePath()
2018-06-27 17:20:15 -04:00
Tim Pope
2a817bb53a
Fix :Gbrowse tagname
2018-06-25 18:30:37 -04:00
Tim Pope
38c69cfebc
Rename blob() to relative()
...
On second thought, we should exclude .git/ files from blob, so pick a
different name for now.
2018-06-25 16:44:11 -04:00
Tim Pope
70a36ceef8
Alias buffer.path() as buffer.blob()
...
Blob isn't a great name, but it's less ambiguous.
2018-06-25 16:05:57 -04:00
Tim Pope
f71079db4d
Work around guioptions+=! on Windows
...
Closes https://github.com/tpope/vim-fugitive/issues/1042
2018-06-25 12:52:24 -04:00
Tim Pope
cbf96cc01a
Clean up repetition in URL parsing
2018-06-20 18:28:25 -04:00
Tim Pope
8fa5cad8d7
Fix references to renamed functions
2018-06-20 18:05:43 -04:00
Tim Pope
251853bc1e
Fix use of <Plug> in a <script> map
...
References https://github.com/tpope/vim-fugitive/issues/1044
2018-06-20 14:32:10 -04:00
Tim Pope
639b9f9a54
Fix load order issue setting up maps
...
References https://github.com/tpope/vim-fugitive/issues/1044
2018-06-20 14:24:35 -04:00
Tim Pope
13f39967f4
Loosen match for hunk header
2018-06-17 17:23:59 -04:00
Tim Pope
d39d5ca429
Accept alternate forms of Fugitive URL
...
This is to prepare for a potential transition to a URL replacement that
isn't mutilated by simplify().
2018-06-15 23:23:11 -04:00
Tim Pope
bb54881388
Jump directly to commit rather than ref file in more cases
2018-06-15 15:31:27 -04:00
Tim Pope
f7bcf51c56
Extract ftdetect file
2018-06-14 15:37:24 -04:00
Tim Pope
cc9d8d93c8
Add FugitiveFilename() to determine corresponding real file
2018-06-14 15:37:24 -04:00
rhysd
b571bff9ec
Specify 'nowrite' to status buffer and blame buffer
2018-06-07 11:27:48 -04:00
Tim Pope
5c2095be39
Camel case public functions
2018-06-01 16:26:05 -04:00
Tim Pope
5d11ff7501
Extract autoload file
2018-06-01 16:26:05 -04:00
Tim Pope
dd4d4c7595
Update statusline function in README
2018-06-01 16:26:05 -04:00
Tim Pope
013ee636f5
Drop 'compatible' check
...
You really have to go out of your way to load a plugin in compatible
mode.
2018-06-01 13:38:22 -04:00
Tim Pope
ddec4bfa86
Move foldtext autocommand back to folding section
2018-06-01 13:25:29 -04:00
Tim Pope
f8913cda12
Fix :Gcommit invocation of :Gstatus
...
Closes https://github.com/tpope/vim-fugitive/issues/1034
2018-05-31 20:32:52 -04:00
Tim Pope
68e097db6f
Gather up global autocommands and functions
2018-05-31 18:43:17 -04:00
Tim Pope
d850dff16e
Expose Cmd autocommand functions
2018-05-31 18:43:17 -04:00
Tim Pope
8977570aa6
Handle symlinked directories more aggressively
2018-05-31 18:43:17 -04:00
Tim Pope
caf89d797f
Provide official function for configured tree
2018-05-31 18:43:17 -04:00
Tim Pope
c8b1a7d9b6
Remove self evident comment
2018-05-31 18:43:17 -04:00
Tim Pope
0e2680f9ae
Separate detection from initialization
2018-05-31 18:43:17 -04:00
Tim Pope
8c43505037
Provide :Grebase (no --interactive)
2018-05-31 18:43:17 -04:00
Tim Pope
fecd42864a
Handle unusually named netrw buffers
2018-05-31 18:43:17 -04:00
Tim Pope
01e7a7e1e6
Switch out new and old official functions
2018-05-31 13:49:34 -04:00
Tim Pope
b129752c07
Fix maps that rely on s:Edit
2018-05-31 13:49:34 -04:00
Tim Pope
aa0210a986
Support <mods> on :Gstatus and :Gedit family
2018-05-30 00:49:48 -04:00
Tim Pope
d7c377f3ba
Loosen regexps to accept alternate comment chars
...
References https://github.com/tpope/vim-fugitive/issues/1025
2018-05-30 00:49:48 -04:00
Tim Pope
cde670ee81
fugitive.vim 2.3
...
* Support worktrees.
* Provide API for extensible :Gbrowse support.
* Remove GitHub URL support in favor of rhubarb.vim.
* Provide :Gdelete to delete both file and buffer.
* Provide :Grename to move relative to file's parent directory.
* Split to open file when :Gstatus is only window.
* Provide U in :Gstatus to discard changes.
* Provide additional :Gstatus commit maps.
* Provide d2o and d3o to obtain diff during conflict.
* Support :tab Gcommit.
* Open :Gcommit tab before current.
* Support :Gdiff +cmd.
* Support gf in Git file types.
* Add flagship.vim statusline indicator.
* Use the Neovim terminal emulator for :Git.
* Bug fixes.
2018-05-28 14:22:08 -04:00
Tim Pope
26433842e9
Revert accidentally committed changes
...
This partially reverts commit 65be0ae749 .
2018-05-27 15:21:22 -04:00
Tim Pope
eeaadf7255
Fix off by one error
2018-05-27 15:18:57 -04:00
Tim Pope
65be0ae749
Fix accidental version bump
2018-05-27 15:18:40 -04:00
Tim Pope
6faf165ef2
Avoid non-file windows for :Gstatus open
...
Closes https://github.com/tpope/vim-fugitive/issues/1002
2018-05-27 01:02:44 -04:00
Tim Pope
614e20bb65
Dispatch BufReadPre
2018-05-22 22:02:13 -04:00
Tim Pope
33b7c1a5b7
Don't run autocommands loading temp file
...
This should bring about a small performance improvement as prevent some
confusion in other plugins.
2018-05-22 22:01:19 -04:00
Tim Pope
2a4714335f
Remove #Repo and #Buffer
...
Let's save these for when we're ready to rename the instance variables
too.
2018-05-19 19:30:08 -04:00
Tim Pope
994d781f90
Add deprecation warning for :Gstatus cA
2018-05-19 15:41:25 -04:00
Tim Pope
a5a75aca92
Bring back :Gstatus C with a warning
2018-05-16 00:28:17 -04:00
Tim Pope
0078c76106
Blow up if user assigns string to map variable
2018-05-15 23:11:13 -04:00
Tim Pope
e0fa72363a
Fix missing bang on function
2018-05-15 23:03:13 -04:00
Tim Pope
a22adef4e0
Use capitalized names for official functions
...
The distinction between "Fugitive" and "fugitive#" functions is whether
it will live in the plugin or autoload file, once the separation finally
comes to pass.
2018-05-15 23:03:13 -04:00
Tim Pope
b14434bae0
Tweak :Gstatus commit maps
2018-05-11 17:12:18 -04:00
Tim Pope
5c2eccd55d
Fix unique map check
2018-05-06 22:35:44 -04:00
Tim Pope
b1df5f1226
Allow mapping overrides
...
Not bothering with the read only buffer maps for now but it would
certainly make sense to.
References https://github.com/tpope/vim-fugitive/issues/761
2018-05-06 19:14:05 -04:00
Tim Pope
b34083549e
Make :s use more robust
2018-05-06 19:10:51 -04:00
Tim Pope
dcecb762b0
Add :Grename
...
I'll rip out the weird current directory stuff later.
2018-05-04 21:42:38 -04:00
Tim Pope
fa1b8652f1
Add .gitattributes
2018-04-22 19:01:53 -04:00
Teo Ljungberg
40d78f07de
Strip out carriage returns
2018-04-15 15:54:35 -04:00
Teo Ljungberg
63a80f4bfe
Remove unused variable
2018-04-15 15:54:35 -04:00
Tim Pope
3bdac8b603
Tighten explanation of no commands FAQ
2018-04-12 20:35:14 -04:00
Tim Pope
d87ad99e28
Remove outdated FAQ about :Gbrowse
2018-04-12 19:31:30 -04:00
Tim Pope
b680699450
Don't force tab for :Gcommit --verbose
...
Keep it for -v, for now.
Closes https://github.com/tpope/vim-fugitive/issues/1011
2018-04-06 15:05:24 -04:00
Tim Pope
3ac95c4dde
Add support for :tab Gcommit
...
References https://github.com/tpope/vim-fugitive/issues/1011
2018-04-06 15:05:24 -04:00
Daniel Hahler
409b098c93
Optimize fugitive#foldtext
...
Only really relevant when using `set cursorline` [1], but good in
general after all.
1: https://github.com/vim/vim/issues/2773
2018-04-04 17:40:08 -04:00
Tim Pope
3e0bd86b99
Add a note about options
2018-03-14 17:11:34 -04:00
Tim Pope
9268cb4ea4
Link to commit.style
2018-03-14 17:11:34 -04:00
Tim Pope
b82abd5bd5
Link to quickfix help topic
...
Closes https://github.com/tpope/vim-fugitive/issues/987
2018-01-25 13:08:57 -05:00
Daniel Hahler
f3ccb0c12e
BufReadObject: handle rev-parse errors
...
With `:Gdiff ^` on a file that has just been added, you would get an
error via `git rev-parse --verify`:
> fatal: Needed a single revision
The error message is clearer when not using `--verify`:
> fatal: Path 'X' exists on disk, but not in 'SHA'.
The behavior depends on if you use `:set hidden`, where the second
invocation works, as in will open an empty buffer - apparently since it
has been created as "a buffer with read errors" ("x" in `:ls!`) before.
Fixes https://github.com/tpope/vim-fugitive/issues/866 .
2017-12-16 13:41:32 -05:00
Tim Pope
5032d9ee72
Strip backslashes on expansion
...
Closes https://github.com/tpope/vim-fugitive/issues/975
2017-11-30 15:04:21 -05:00
Carlos Coelho
de6c05720c
Use NERDTree.root instead of removed NERDTreeRoot
...
As of scrooloose/nerdtree@d36b793 , it was recommended to use
NERDTree.root instead of deprecated NERDTreeRoot. Also, this command
seems to be recently removed since it was throwing an Undefined
variable: b:NERDTreeRoot when starting Vim.
2017-11-25 23:21:51 -05:00
Jesse Atkinson
d16cd9ced1
Update "OS X" to "macOS" in README
2017-11-09 18:52:12 -05:00
Tim Pope
7c9b87a3c3
Fix escaping in :Gblame
...
Closes https://github.com/tpope/vim-fugitive/issues/952
2017-10-21 18:06:41 -04:00
Michael Budde
42daa3183b
Do not accept :Gread count in argument position
...
Use `-range` instead of `-count` to prevent Vim from interpreting a
branch name starting with a number as a count, e.g. `:Gread 123-foo`
being interpreted as `:123Gread -foo`.
2017-10-09 23:14:23 -04:00
Stephen Rasku
8f60d1d459
Use https:// to clone
...
HTTPS is better supported in proxied corporate environments.
2017-09-01 02:43:35 -04:00
Samuel Roeca
913fff1cea
Limit use of :terminal to nvim
2017-07-12 17:33:37 -04:00
Tim Pope
be2ff98db5
Provide :Gdelete
...
Closes https://github.com/tpope/vim-fugitive/issues/804
2017-06-08 01:25:15 -04:00
Tim Pope
280bbdb6eb
Fix syntax error
...
Closes https://github.com/tpope/vim-fugitive/issues/623
2017-06-07 19:32:02 -04:00
Tim Pope
366996484e
Limit use of lookbehind in :Gblame highlighting
...
Closes https://github.com/tpope/vim-fugitive/issues/921
2017-06-07 13:34:15 -04:00
Tim Pope
7be1f0aef6
Eliminate use of =...
2017-05-30 14:10:37 -04:00
Tim Pope
7195586b79
Remove debugging statement
2017-05-30 13:09:24 -04:00
Tim Pope
be770419fc
Follow redirect when determining :Gbrowse url
...
This is a really contrived feature, but I want to make it possible for
people to have their cake and eat it too when it comes to custom
repository URLs that redirect to GitHub.
2017-05-29 22:44:00 -04:00
Tim Pope
0648abc018
Fix regexp checking Git version in :Gbrowse
...
References https://github.com/tpope/vim-fugitive/issues/844
2017-05-29 21:17:47 -04:00
Tim Pope
e272080f0d
Don't trust CSApprox_loaded
...
Capitalized variables can end up in session files, folks. Don't use
them for include guards.
2017-05-29 21:17:47 -04:00
Stephen Rasku
2c8d15a790
Add help for 'a' command in :Gstatus
2017-05-26 14:19:35 -04:00
Tim Pope
d6e7e20123
Work around Vim issue with hidden diff window
...
If you call :Gdiff on a file that's also open in a separate tab, close
it, switch to another file, and call :Gdiff again, Vim thinks the first
file is part of a 3-way diff, despite no longer being displayed in a
window. Curiously, :diffoff! seems to work around this, despite both
the documentation and source code suggesting it merely iterates over
open windows.
Closes https://github.com/tpope/vim-fugitive/issues/534
2017-05-19 18:15:21 -04:00
kaihowl
1d2f150331
Unstage single files from git move and do not move them back
...
This fixes #824
2017-05-19 10:37:09 -04:00
gautaz
e5935c1165
Throw joined errors if error is empty on commit
...
Fixes tpope/vim-fugitive#907
2017-05-13 00:23:44 -04:00
Tim Pope
7ebe5c143d
Handle .git in file system root
...
References https://github.com/tpope/vim-fugitive/issues/908
2017-05-08 11:03:29 -04:00
Tim Pope
c640ee78a8
This time I actually tried it
2017-05-02 19:34:47 -04:00
Tim Pope
c9b26e20d3
Fix substitute in jump to file
2017-05-02 19:32:31 -04:00
Tim Pope
79f4a49a94
Fix regexes in jump to file
...
Closes https://github.com/tpope/vim-fugitive/issues/906
2017-05-02 19:31:17 -04:00
Tim Pope
0cb46585ac
Use same character class in all diff matches
2017-05-02 19:31:17 -04:00
Tim Pope
d4df8882c5
Better support for diff.mnemonicPrefix
2017-05-01 14:47:32 -04:00
Tim Pope
d5208d494f
Force resolution of symlinked buffers
...
Closes https://github.com/tpope/vim-fugitive/issues/831
2017-05-01 14:47:32 -04:00
Chris DeLuca
cf248fa66d
Fix readme links to Gbrowse plugins
...
Github changed the way they parse markdown, breaking a bunch of patterns.
2017-05-01 11:41:00 -04:00
Matěj Cepl
779949c255
Add a bit of documentation for d2o and d3o commands
...
Covering changes in #801 .
2017-04-29 12:10:03 -04:00
Jack Nagel
785bb15745
Highlight blame hashes if 'termguicolors' is present
2017-04-27 21:27:20 -04:00
Tim Pope
fbf89773b4
Don't assume support for remote get-url
...
References https://github.com/tpope/vim-fugitive/issues/844
2017-04-26 13:06:15 -04:00
Geoff Harcourt
02a0be79aa
Fix README typo
...
Recent update b2767d2 misspelled `instaweb`.
2017-04-24 21:09:32 -04:00
Tim Pope
b2767d204b
Mention :Gbrowse providers in README
...
Closes https://github.com/tpope/vim-fugitive/issues/898
2017-04-24 16:07:42 -04:00
Tim Pope
26504eecbd
Correctly eliminate trailing space in :Gpush
...
Note to self: don't test changes to :Gpush by pushing them.
2017-04-23 22:34:41 -04:00
Tim Pope
0d281a2607
Eliminate trailing space in :Gpush
2017-04-23 22:32:01 -04:00
Tim Pope
b2665cc650
Add g:fugitive_git_command
...
The idea is that g:fugitive_git_command is for user facing commands and
suitable to be changed to something like "hub", while
g:fugitive_git_executable is for low level internals.
2017-04-11 18:54:53 -04:00
Tim Pope
c3052fba84
Heavy handed rhubarb.vim suggestion
2017-04-11 17:59:32 -04:00
dummyunit
4f24757df2
Fix temp_files cache on Windows when TEMP is set to a short path ( #893 )
...
If %TEMP% is set to a short path (e.g. "C:\LongDi~1") then tempname()
will return a file name that contains that short path. If that path is
later used as key for entry in s:temp_files dictionary, that entry won't
be found in BufNewFile,BufReadPost events because <afile> is expand()'ed
before it is used as a key for s:temp_files.
In the end, user gets cryptic error message about
"C:\LongDirName\VI12345.tmp.fugitiveblame" not being a git repository
when he tries to open a commit in Gblame window.
To workaround that we expand paths of temp files when adding entries to
s:temp_files. Also, because expand() can't expand short path if it
doesn't exist in the file system, we have to extract the directory part
and expand it separately.
2017-04-05 14:58:03 -04:00
Tim Pope
eb945e9a11
:Gbrowse remote/branch should not resolve upstream
...
Old behavior: Follow remote/branch to local branch to upstream,
wherever that happens to live.
New behavior: Open branch at remote, without further resolution.
2017-04-03 17:18:20 -04:00
Tim Pope
90cbbf5854
Make unrecognized git type error more informative
2017-04-02 17:04:02 -04:00
Tim Pope
87c1bda4d5
Fix implicit use of v: variable
2017-02-25 17:05:12 -05:00
Tim Pope
c5c1bd66d8
Ensure v:shell_error comes from correct command
...
Closes https://github.com/tpope/vim-fugitive/issues/648
2017-02-25 16:38:19 -05:00
Jonathan Arnett
f44845e440
Fix for empty buffer :Git command in Neovim ( #785 )
...
Detects whether the current buffer is empty; opens a new empty tab if so, a new tab of the same buffer if not.
2017-02-10 12:35:36 -05:00
fREW Schmidt
245ce889e2
Support insteadOf for Gbrowse ( #874 )
...
Fixes #873
2017-02-07 18:49:17 -05:00
Nate Bosch
444ba9fda5
Stricter match for fugitive:// buffers ( #872 )
...
Fixes #871
It is valid - though odd - to open a file at `some//path`. In that case
the current check for fugitive buffers matches and changes &path
unexpectedly. A stricter match against `://` prevents this.
2017-02-03 11:04:54 -05:00
Tim Pope
b754bc2031
Fix mismatched quotes
...
References https://github.com/tpope/vim-fugitive/issues/844
2016-11-13 19:04:07 -05:00
Matěj Cepl
b3a8be6975
Add shortcuts for getting hunks from other views of the diff. ( #801 )
...
Fixes #798
2016-11-05 12:20:24 -04:00
Tommy Allen
58ed86e434
Use -z for splitting alias config. ( #850 )
2016-10-21 16:01:34 -04:00
tmsanrinsha
aac85a268e
Fix U does not delete Untracked files ( #823 )
2016-08-08 15:18:18 -04:00
KabbAmine
c00ebd75ac
Match printable character in git status
...
With `LANG=fr_FR.UTF-8`, a non-breakable space character is added to the
text of git status, this commit allows matching it.
Closes #815
2016-07-06 17:50:38 -04:00
Alex Rodionov
50cc268d29
Add --fixup= and --squash= to :Gcommit completion ( #811 )
2016-06-24 13:45:00 -04:00
canaaerus
4865891565
s:cfile: Match multi-byte characters #806 ( #810 )
...
For some locales like de_DE.UTF8 the text of `git status` contains multi-byte characters.
This change allows a subsequent file name to be matched correctly .
2016-06-22 15:46:54 -04:00
Daniel Hahler
3439f999b1
Call s:define_commands directly ( #792 )
...
This removes the fugitive_utility augroup, and allows for something like
the following:
> vim --cmd 'au User Fugitive Gbrowse!' path/to/file
Without this patch the user's User autocommand would be run before
fugitive's, and therefore the commands would not be defined already.
2016-05-11 18:01:39 -04:00
Daniel Hahler
6460734b5e
Fix typo in s:repo_translate: s/,/./ ( #791 )
2016-05-11 17:37:45 -04:00
Quinn Strahl
bdd216827a
Make :Git open a tab to the left for :terminal
...
- Users of multiple tabs will find themselves back where they started
when the terminal closes, instead of in the next tab over
2016-04-14 19:08:11 -04:00
Quinn Strahl
0ac4915cd7
Simplify tabedit invocation for :Gcommit -v
...
- `-tabedit` does the same thing as `(tabpagenr()-1).'tabedit'`
2016-04-14 19:08:11 -04:00
Ari Pollak
841adb49ad
Use "+ instead of "*
2016-04-06 19:51:16 -04:00
Andy Stewart
57afba5bdd
Trigger BufWritePost after adding to index with Gwrite
...
See airblade/vim-gitgutter#278 .
2016-03-24 18:54:08 -04:00
Tim Pope
e1ae9effbc
Document bang to :Ggrep
...
Closes https://github.com/tpope/vim-fugitive/issues/767
2016-03-18 11:26:11 -04:00
Tim Pope
19d1c944db
Remove unmerged files on :Gstatus U
2016-03-09 21:31:25 -05:00
Tyler Hallada
9315ec694d
Document StageUndo key map (U) in :Gstatus
2016-03-09 21:28:26 -05:00
Tim Pope
90250785d1
Call git clean for U on untracked file
2016-03-09 21:26:09 -05:00
Vadim Zeitlin
099d65826e
Don't use spaces in Git command to avoid problems under Windows
...
When using a helper script to make Windows Vim work with Cygwin Git, arguments
containing spaces don't survive being passed through "cmd /c" to this script
and are decomposed into several tokens.
Just use "%x20" instead of spaces in the pretty format to avoid the problem.
2016-03-05 16:14:18 -05:00
Tim Pope
008b957086
Ignore worktree with broken gitdir
...
References https://github.com/tpope/vim-fugitive/issues/751
2016-02-24 19:29:27 -05:00
Tim Pope
16c2b7abb9
Support worktrees
...
Closes https://github.com/tpope/vim-fugitive/issues/655
2016-02-24 16:20:52 -05:00
Tim Pope
1e3f1103d9
DRY up refs/ paths
2016-02-24 15:53:51 -05:00
Tim Pope
9835920a3c
Use includeexpr on default <cfile>
...
Closes https://github.com/tpope/vim-fugitive/issues/744
2016-01-22 20:03:58 -05:00
Tim Pope
fd36aa9c61
Fix issue extracting remote
2016-01-08 17:05:54 -05:00
Tim Pope
4dd41688cf
Entertain P as a p alternative in :Gstatus
...
This could potentially free up `p` as "open in new tab", which would
correspond nicely with `vim -p`.
2016-01-01 16:55:17 -05:00
Tim Pope
18d6d1ab82
Overhaul :Gbrowse remote handling
2015-12-26 19:53:07 -05:00
Tim Pope
9ce67cdc93
Always pass commit SHA to :Gbrowse handlers
2015-12-26 15:09:08 -05:00
Tim Pope
bf04261080
Revert "Remove guard against index stage in :Gbrowse handler"
...
This reverts commit 14daf094d9 . My
assertion was wrong; commit will no longer be an index stage but it
still might be an empty string.
2015-12-26 14:54:35 -05:00
Tim Pope
52d180af0a
Include trailing / in tree paths for :Gbrowse handlers
2015-12-26 14:37:45 -05:00
Tim Pope
14daf094d9
Remove guard against index stage in :Gbrowse handler
...
This parameter can now always be directly used within a URL, without any
sanity checking
2015-12-26 14:36:39 -05:00
Tim Pope
ac904e806d
Don't pass stage number as commit to :Gbrowse handler
2015-12-26 14:18:00 -05:00
Tim Pope
9f768cd3bc
Minimum viable URL escaping in :Gbrowse
...
Closes https://github.com/tpope/vim-fugitive/issues/703 .
2015-12-26 14:11:54 -05:00
Tim Pope
09cdce7add
Fix jump to file for tree at root of commit
...
Closes https://github.com/tpope/vim-fugitive/issues/735
2015-12-23 21:27:43 -05:00
Tim Pope
8851b8fe64
Fix jump from diff to file
...
This code hasn't been touched in 4 years; how did it break?!
2015-12-15 21:19:33 -05:00
Tim Pope
cfa485ede7
Better support for binary file grep results
2015-12-15 19:01:40 -05:00
Tim Pope
207c643ea4
Bring GitHub handler in line with rhubarb.vim
...
Closes https://github.com/tpope/vim-fugitive/issues/730
2015-12-11 16:38:05 -05:00
Tim Pope
cac2c8ef8e
Fix instaweb current buffer assumption
2015-12-01 18:41:29 -05:00
Tim Pope
a9a22e0e4e
Never :Gedit with a trailing slash
2015-12-01 18:35:25 -05:00
Tim Pope
c3e918072f
Accommodate @ as alias for HEAD
2015-12-01 18:06:38 -05:00
Tim Pope
d854197c03
Open release page for tags on GitHub
2015-12-01 04:04:55 -05:00
Tim Pope
d8ce8d1d03
Document transition to rhubarb.vim
2015-11-30 22:25:50 -05:00
Tim Pope
23faeadc7c
Revert "Show all untracked files in :Gstatus window"
...
This reverts commit 21b6dd7aee .
Closes https://github.com/tpope/vim-fugitive/issues/726
2015-11-30 19:38:48 -05:00
Andy Russell
1ecd12d523
Add support for fish shell syntax
...
Closes #626 .
2015-11-06 15:54:34 -05:00
Jerome Reybert
f8aa87a4b5
Fix when $GIT_DIR is set and is not an absolute path
2015-11-03 09:52:22 -05:00
Jacob Niehus
dba8a0705d
Fix diff sometimes opening in preview window
...
If the previous window no longer exists when Gedit is called, the
attempt to change windows with 'wincmd p' fails and 'wincmd w' should be
used instead.
2015-10-16 23:48:38 -04:00
Tim Pope
8cf3d94a3a
Support gf in git filetypes
...
Closes https://github.com/tpope/vim-fugitive/issues/697
2015-10-07 00:21:49 -04:00
Tim Pope
28de2a1ddd
Enable jumping on @@ hunk header
2015-10-07 00:21:49 -04:00
Tim Pope
01cda4d443
:Gdiff! keeps window focus
2015-10-07 00:21:35 -04:00
Tim Pope
b5188a1b4f
Accept +cmd with :Gdiff
2015-10-07 00:05:07 -04:00
Tim Pope
8e63140181
Resplit when :Gstatus is final window
2015-10-07 00:05:07 -04:00
Tim Pope
cec56ef5ff
Extract current file logic from s:GF
2015-10-06 21:45:40 -04:00
Tim Pope
1e755064e9
Better error on :Gwrite failure
...
References https://github.com/tpope/vim-fugitive/issues/696
2015-10-06 20:33:41 -04:00
Daniel Hahler
0b43b51d77
Expand % instead of <amatch> in the Buf* autocommands
...
This is relevant in case a previous BufReadPost autocmd changes the file
name using `:file` - fugitive should use the new/current name then.
2015-10-02 19:40:37 -04:00
Daniel Hahler
5dcf8a0175
ReplaceCmd: redirect stderr to tmp file / buffer
...
The option `status.showUntrackedFiles=all` used with `git status` for
`:Gstatus` might cause an error, which then causes fugitive to display an
empty status window / index file.
Redirecting the stderr output is useful in this case.
The generated command was:
git --git-dir=/home/user/.dotfiles/.git -c 'status.displayCommentPrefix=true' -c 'color.status=false' -c 'status.short=false' -c 'status.showUntrackedFiles=all' status
The error from git is related to submodules being moved to another
subdirectory, where the relative "gitdir" now does not exist anymore:
fatal: Not a git repository: vim/bundle.old.nobackup/CLEAN/colorscheme-base16/../../../.git/modules/vim/bundle/colorscheme-base16
While that's a Git / user error after all, fugitive should be more
helpful in that case by displaying the error.
It uses the 'shellpipe' setting to detect if '2>&1' is supported (Ref:
https://github.com/tpope/vim-fugitive/pull/661#issuecomment-120438667 ).
Closes #661 .
2015-10-02 19:39:07 -04:00
Daniel Hahler
2509641eac
Add "stash" and stash refs in repo.superglob
...
This looks for `refs/stash` and calls `git stash list` to get all of
them in case it exists.
2015-10-02 19:27:35 -04:00
Tim Pope
073f3a37b9
Short circuit when jumping too far in blame history
...
References https://github.com/tpope/vim-fugitive/issues/607
2015-09-30 18:49:56 -04:00
David Elentok
b7b23001de
Allow using the "%" variable in git commands
...
Closes https://github.com/tpope/vim-fugitive/issues/686
For example, when running:
:Git add %
neovim throws the following exception:
E499: Empty file name for '%' or '#',
only works with ":p:h": terminal git add %
It is a result of the tabnew command, it creates a new blank tab where
"%" is empty.
This commit changes "tabnew" to "tabedit %" so you're still working on
the same file.
Once the command is done running the tab closes.
2015-09-10 15:32:35 -04:00
Patrick Davey
b319b69453
Add the "L" prefix which github requires for highlighting ranges now
...
Fixes https://github.com/tpope/vim-fugitive/issues/669
2015-08-02 15:26:14 -04:00
Pieter-Jan Van de Maele
03cc95cc19
Support for Ggrep when only %f is available
2015-07-20 15:06:06 -04:00
Tim Pope
7c4a906147
Support Vim without 'wildignorecase'
...
Closes #659 .
2015-07-01 10:55:35 -04:00
Tim Pope
b5b2548a87
Support older Vim without 'fileignorecase'
2015-06-30 20:39:54 -04:00
Tim Pope
ca727b07f1
Better support for case insensitive file systems
...
Closes #451 .
2015-06-30 17:43:16 -04:00
Tim Pope
0fbbe0b3a4
Open :Gcommit tab before current
...
Pretty ridiculous, but this seems to be the only way to return to the
right tab after closing the commit message.
2015-06-29 17:52:39 -04:00
Tim Pope
1c844375fa
Add support for flagship.vim
2015-06-14 20:06:38 -04:00
Daniel Hahler
e065e4f841
(Re)store the current window in s:diffoff_all
...
This is required to make Vim execute the "Enter" autocommands when
closing the fugitive window.
Fixes: https://github.com/tpope/vim-fugitive/issues/421
2015-05-31 12:14:23 -04:00
Eli Young
21b6dd7aee
Show all untracked files in :Gstatus window
...
Previously, if there were untracked files inside an untracked folder,
:Gstatus would only show the new folder. Attempting to run a diff on the
folder would pass the directory name, which would result in Vim opening
a directory listing. This makes :Gstatus list all untracked files, even
if they're inside untracked folders. This requires Git >=1.4, and will
silently fall back to the old behavior on earlier versions.
Closes #605 .
2015-05-22 17:50:42 -04:00
Tim Pope
935a2cccd3
Don't close window after :Gremove
...
This is nothing more than a change in personal preference on my part.
It's particularly annoying when :Gstatus or the quickfix window is the
only other window open.
2015-05-19 12:27:22 -04:00
Tim Pope
c2908b174d
Support older Git in :Gpull
...
Closes #645 .
2015-05-19 11:15:30 -04:00
Diego Vera
b0e38f08dc
Make Ggrep to work properly on Mac
...
- Color were causing to appear strange characters in the result.
- These characters made impossible to navigate the results
- The solution was to disable colors while executing git grep
2015-05-16 10:12:41 -04:00
Ole Reifschneider
4cc201cbe3
Use the neovim terminal emulator for :Git
2015-03-31 13:40:01 -04:00
Tim Pope
baa05dcfda
Pass correct files to git reset --patch
2015-03-29 16:29:18 -04:00
Fedor Gusev
0095769029
Provide g:fugitive_no_maps to disable key maps
...
Add variable g:fugitive_no_maps. If set y<C-G> and <C-R><C-G> are not
mapped.
Resolves tpope/vim-fugitive#394
2015-02-20 15:50:02 -05:00
Eli Young
e8b94098bb
Support browsing with new netrw.vim
...
The previous fix for #594 didn't handle the case in which the net netrw
was installed on older versions of Vim.
2015-02-20 15:49:36 -05:00
Tim Pope
eb8eb1850a
Support for browsing with recent Vim
...
Closes #594 .
2015-02-08 22:31:37 -05:00
Daniel Hahler
933f6a1e1d
s:Diff: use winnr with <C-W>w instead of <C-W>p
...
This is more reliable and fixes an issue where the syntastic location
list of the original file would be focused after `:Gdiff`.
Ref: https://github.com/blueyed/vim-fugitive/commit/c99f0ff06bd1915b2f05c5750283aa9e826ad3d8#commitcomment-9434351
2015-01-25 19:23:45 -05:00