Use "undo" instead of "revert" for discarding a hunk.

"Undo" is a better name than "revert" because:

- "revert" sounds like it has something to do with `git-revert` but they
  are entirely different;
- "undo" is consistent with vim's "undo": discarding changes and going
  back to the original.

Maintain backwards compatibility and add deprecation warnings.

Closes #306.
This commit is contained in:
Andy Stewart
2016-04-21 11:40:27 +01:00
parent 103acc7a23
commit b3db866aab
16 changed files with 45 additions and 43 deletions

View File

@@ -98,13 +98,13 @@ Commands for jumping between marked hunks:
:GitGutterPrevHunk *:GitGutterPrevHunk*
Jump to the previous marked hunk. Takes a count.
Commands for staging or reverting individual hunks:
Commands for staging or undoing individual hunks:
:GitGutterStageHunk *:GitGutterStageHunk*
Stage the hunk the cursor is in.
:GitGutterRevertHunk *:GitGutterRevertHunk*
Revert the hunk the cursor is in.
:GitGutterUndoHunk *:GitGutterUndoHunk*
Undo the hunk the cursor is in.
:GitGutterPreviewHunk *:GitGutterPreviewHunk*
Preview the hunk the cursor is in.
@@ -215,10 +215,10 @@ To change the hunk-jumping maps (defaults shown):
nmap ]c <Plug>GitGutterNextHunk
<
To change the hunk-staging/reverting/previewing maps (defaults shown):
To change the hunk-staging/undoing/previewing maps (defaults shown):
>
nmap <Leader>hs <Plug>GitGutterStageHunk
nmap <Leader>hr <Plug>GitGutterRevertHunk
nmap <Leader>hu <Plug>GitGutterUndoHunk
nmap <Leader>hp <Plug>GitGutterPreviewHunk
<