mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 12:33:46 -05:00
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.
This commit is contained in:
@@ -124,19 +124,19 @@ that are part of Git repositories).
|
|||||||
|quickfix| list.
|
|quickfix| list.
|
||||||
|
|
||||||
*fugitive-:Gedit* *fugitive-:Ge*
|
*fugitive-:Gedit* *fugitive-:Ge*
|
||||||
:Gedit [revision] |:edit| a |fugitive-revision|.
|
:Gedit [object] |:edit| a |fugitive-object|.
|
||||||
|
|
||||||
*fugitive-:Gsplit*
|
*fugitive-:Gsplit*
|
||||||
:Gsplit [revision] |:split| a |fugitive-revision|.
|
:Gsplit [object] |:split| a |fugitive-object|.
|
||||||
|
|
||||||
*fugitive-:Gvsplit*
|
*fugitive-:Gvsplit*
|
||||||
:Gvsplit [revision] |:vsplit| a |fugitive-revision|.
|
:Gvsplit [object] |:vsplit| a |fugitive-object|.
|
||||||
|
|
||||||
*fugitive-:Gtabedit*
|
*fugitive-:Gtabedit*
|
||||||
:Gtabedit [revision] |:tabedit| a |fugitive-revision|.
|
:Gtabedit [object] |:tabedit| a |fugitive-object|.
|
||||||
|
|
||||||
*fugitive-:Gpedit*
|
*fugitive-:Gpedit*
|
||||||
:Gpedit [revision] |:pedit| a |fugitive-revision|.
|
:Gpedit [object] |:pedit| a |fugitive-object|.
|
||||||
|
|
||||||
:Gsplit! [args] *fugitive-:Gsplit!* *fugitive-:Gvsplit!*
|
:Gsplit! [args] *fugitive-:Gsplit!* *fugitive-:Gvsplit!*
|
||||||
:Gvsplit! [args] *fugitive-:Gtabedit!* *fugitive-:Gpedit!*
|
:Gvsplit! [args] *fugitive-:Gtabedit!* *fugitive-:Gpedit!*
|
||||||
@@ -144,13 +144,12 @@ that are part of Git repositories).
|
|||||||
:Gpedit! [args] split, tab, or preview window.
|
:Gpedit! [args] split, tab, or preview window.
|
||||||
|
|
||||||
*fugitive-:Gread*
|
*fugitive-:Gread*
|
||||||
:Gread [revision] Empty the buffer and |:read| a |fugitive-revision|.
|
:Gread [object] Empty the buffer and |:read| a |fugitive-object|.
|
||||||
When the argument is omitted, this is similar to
|
When the argument is omitted, this is similar to
|
||||||
git-checkout on a work tree file or git-add on a stage
|
git-checkout on a work tree file or git-add on a stage
|
||||||
file, but without writing anything to disk.
|
file, but without writing anything to disk.
|
||||||
|
|
||||||
:{range}Gread [revision]
|
:{range}Gread [object] |:read| in a |fugitive-object| after {range}.
|
||||||
|:read| in a |fugitive-revision| after {range}.
|
|
||||||
|
|
||||||
*fugitive-:Gread!*
|
*fugitive-:Gread!*
|
||||||
:Gread! [args] Empty the buffer and |:read| the output of a Git
|
:Gread! [args] Empty the buffer and |:read| the output of a Git
|
||||||
@@ -179,23 +178,24 @@ that are part of Git repositories).
|
|||||||
succeeded.
|
succeeded.
|
||||||
|
|
||||||
*fugitive-:Gdiff*
|
*fugitive-:Gdiff*
|
||||||
:Gdiff [revision] Perform a |vimdiff| against the current file in the
|
:Gdiff [object] Perform a |vimdiff| against the given file, or if a
|
||||||
given revision. With no argument, the version in the
|
commit is given, the current file in that commit.
|
||||||
index is used (which means a three-way diff during a
|
With no argument, the version in the index is used
|
||||||
merge conflict, making it a git-mergetool
|
(which means a three-way diff during a merge conflict,
|
||||||
alternative). The newer of the two files is placed
|
making it a git-mergetool alternative). The newer of
|
||||||
to the right or bottom, depending on 'diffopt' and
|
the two files is placed to the right or bottom,
|
||||||
the width of the window relative to 'textwidth'. Use
|
depending on 'diffopt', and the width of the window
|
||||||
|do| and |dp| and write to the index file to simulate
|
relative to 'textwidth'. Use |do| and |dp| and write
|
||||||
"git add --patch". For the three-way diff, there is
|
to the index file to simulate "git add --patch". For
|
||||||
also d2o and d3o pulling the hunk to the middle from
|
the three-way diff, there is also d2o and d3o pulling
|
||||||
the left or the right window, respectively.
|
the hunk to the middle from the left or the right
|
||||||
|
window, respectively.
|
||||||
|
|
||||||
*fugitive-:Gsdiff*
|
*fugitive-:Gsdiff*
|
||||||
:Gsdiff [revision] Like |:Gdiff|, but always split horizontally.
|
:Gsdiff [object] Like |:Gdiff|, but always split horizontally.
|
||||||
|
|
||||||
*fugitive-:Gvdiff*
|
*fugitive-:Gvdiff*
|
||||||
:Gvdiff [revision] Like |:Gdiff|, but always split vertically.
|
:Gvdiff [object] Like |:Gdiff|, but always split vertically.
|
||||||
|
|
||||||
*fugitive-:Gmove*
|
*fugitive-:Gmove*
|
||||||
:Gmove {destination} Wrapper around git-mv that renames the buffer
|
:Gmove {destination} Wrapper around git-mv that renames the buffer
|
||||||
@@ -246,7 +246,7 @@ that are part of Git repositories).
|
|||||||
supported by installing rhubarb.vim, available at
|
supported by installing rhubarb.vim, available at
|
||||||
<https://github.com/tpope/vim-rhubarb>.
|
<https://github.com/tpope/vim-rhubarb>.
|
||||||
|
|
||||||
:Gbrowse {revision} Like :Gbrowse, but for a given |fugitive-revision|. A
|
:Gbrowse {object} Like :Gbrowse, but for a given |fugitive-object|. A
|
||||||
useful value here is -, which ties the URL to the
|
useful value here is -, which ties the URL to the
|
||||||
latest commit rather than a volatile branch.
|
latest commit rather than a volatile branch.
|
||||||
|
|
||||||
@@ -257,7 +257,7 @@ that are part of Git repositories).
|
|||||||
:{range}Gbrowse [args] Appends an anchor to the URL that emphasizes the
|
:{range}Gbrowse [args] Appends an anchor to the URL that emphasizes the
|
||||||
selected lines. You almost certainly want to give a
|
selected lines. You almost certainly want to give a
|
||||||
"-" argument in this case to force the URL to include
|
"-" argument in this case to force the URL to include
|
||||||
an exact revision.
|
an exact commit.
|
||||||
|
|
||||||
:[range]Gbrowse! [args] Like :Gbrowse, but put the URL on the clipboard rather
|
:[range]Gbrowse! [args] Like :Gbrowse, but put the URL on the clipboard rather
|
||||||
than opening it.
|
than opening it.
|
||||||
@@ -268,26 +268,29 @@ These maps are available everywhere.
|
|||||||
|
|
||||||
*fugitive-c_CTRL-R_CTRL-G*
|
*fugitive-c_CTRL-R_CTRL-G*
|
||||||
<C-R><C-G> On the command line, recall the path to the current
|
<C-R><C-G> On the command line, recall the path to the current
|
||||||
object (that is, a representation of the object
|
|fugitive-object| (that is, a representation of the
|
||||||
recognized by |:Gedit|).
|
object recognized by |:Gedit|).
|
||||||
|
|
||||||
*fugitive-y_CTRL-G*
|
*fugitive-y_CTRL-G*
|
||||||
["x]y<C-G> Yank the commit SHA and path to the current object.
|
["x]y<C-G> Yank the commit SHA and path to the current
|
||||||
|
|fugitive-object|.
|
||||||
|
|
||||||
These maps are available in Git objects.
|
These maps are available in committed Git objects.
|
||||||
|
|
||||||
*fugitive-<CR>*
|
*fugitive-<CR>*
|
||||||
<CR> Jump to the revision under the cursor.
|
<CR> Jump to the |fugitive-object| under the cursor.
|
||||||
|
|
||||||
*fugitive-o*
|
*fugitive-o*
|
||||||
o Jump to the revision under the cursor in a new split.
|
o Jump to the |fugitive-object| under the cursor in a
|
||||||
|
new split.
|
||||||
|
|
||||||
*fugitive-S*
|
*fugitive-S*
|
||||||
S Jump to the revision under the cursor in a new
|
S Jump to the |fugitive-object| under the cursor in a
|
||||||
vertical split.
|
new vertical split.
|
||||||
|
|
||||||
*fugitive-O*
|
*fugitive-O*
|
||||||
O Jump to the revision under the cursor in a new tab.
|
O Jump to the |fugitive-object| under the cursor in a
|
||||||
|
new tab.
|
||||||
|
|
||||||
*fugitive--*
|
*fugitive--*
|
||||||
- Go to the tree containing the current tree or blob.
|
- Go to the tree containing the current tree or blob.
|
||||||
@@ -303,21 +306,22 @@ P Go to the current file in the [count]th parent.
|
|||||||
C Go to the commit containing the current file.
|
C Go to the commit containing the current file.
|
||||||
|
|
||||||
*fugitive-.*
|
*fugitive-.*
|
||||||
. Start a |:| command line with the current revision
|
. Start a |:| command line with the current
|
||||||
prepopulated at the end of the line.
|
|fugitive-object| prepopulated at the end of the line.
|
||||||
|
|
||||||
*fugitive-a*
|
*fugitive-a*
|
||||||
a Show the current tag, commit, or tree in an alternate
|
a Show the current tag, commit, or tree in an alternate
|
||||||
format.
|
format.
|
||||||
|
|
||||||
SPECIFYING REVISIONS *fugitive-revision*
|
SPECIFYING OBJECTS *fugitive-object* *fugitive-revision*
|
||||||
|
|
||||||
Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING
|
Fugitive objects are either work tree files or Git revisions as defined in the
|
||||||
REVISIONS" section in the git-rev-parse man page. For commands that accept an
|
"SPECIFYING REVISIONS" section in the git-rev-parse man page, with a few
|
||||||
optional revision, the default is the file in the index for work tree files
|
convenience notations thrown in for good measure. For commands that accept an
|
||||||
and the work tree file for everything else. Example revisions follow.
|
optional object, the default is the file in the index for work tree files and
|
||||||
|
the work tree file for everything else. Example objects follow.
|
||||||
|
|
||||||
Revision Meaning ~
|
Object Meaning ~
|
||||||
HEAD .git/HEAD
|
HEAD .git/HEAD
|
||||||
refs/heads/x .git/refs/heads/x
|
refs/heads/x .git/refs/heads/x
|
||||||
@ The commit referenced by @ aka HEAD
|
@ The commit referenced by @ aka HEAD
|
||||||
|
|||||||
Reference in New Issue
Block a user