From fc8f9eda9dbbcd711300f67b9040eb1bf32d8ac4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 30 Jul 2018 16:31:02 -0400 Subject: [PATCH] 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. --- doc/fugitive.txt | 84 +++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 8ab30b6..eccf1fa 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -124,19 +124,19 @@ that are part of Git repositories). |quickfix| list. *fugitive-:Gedit* *fugitive-:Ge* -:Gedit [revision] |:edit| a |fugitive-revision|. +:Gedit [object] |:edit| a |fugitive-object|. *fugitive-:Gsplit* -:Gsplit [revision] |:split| a |fugitive-revision|. +:Gsplit [object] |:split| a |fugitive-object|. *fugitive-:Gvsplit* -:Gvsplit [revision] |:vsplit| a |fugitive-revision|. +:Gvsplit [object] |:vsplit| a |fugitive-object|. *fugitive-:Gtabedit* -:Gtabedit [revision] |:tabedit| a |fugitive-revision|. +:Gtabedit [object] |:tabedit| a |fugitive-object|. *fugitive-:Gpedit* -:Gpedit [revision] |:pedit| a |fugitive-revision|. +:Gpedit [object] |:pedit| a |fugitive-object|. :Gsplit! [args] *fugitive-:Gsplit!* *fugitive-:Gvsplit!* :Gvsplit! [args] *fugitive-:Gtabedit!* *fugitive-:Gpedit!* @@ -144,13 +144,12 @@ that are part of Git repositories). :Gpedit! [args] split, tab, or preview window. *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 git-checkout on a work tree file or git-add on a stage file, but without writing anything to disk. -:{range}Gread [revision] - |:read| in a |fugitive-revision| after {range}. +:{range}Gread [object] |:read| in a |fugitive-object| after {range}. *fugitive-:Gread!* :Gread! [args] Empty the buffer and |:read| the output of a Git @@ -179,23 +178,24 @@ that are part of Git repositories). succeeded. *fugitive-:Gdiff* -:Gdiff [revision] Perform a |vimdiff| against the current file in the - given revision. With no argument, the version in the - index is used (which means a three-way diff during a - merge conflict, making it a git-mergetool - alternative). The newer of the two files is placed - to the right or bottom, depending on 'diffopt' and - the width of the window relative to 'textwidth'. Use - |do| and |dp| and write to the index file to simulate - "git add --patch". For the three-way diff, there is - also d2o and d3o pulling the hunk to the middle from - the left or the right window, respectively. +:Gdiff [object] Perform a |vimdiff| against the given file, or if a + commit is given, the current file in that commit. + With no argument, the version in the index is used + (which means a three-way diff during a merge conflict, + making it a git-mergetool alternative). The newer of + the two files is placed to the right or bottom, + depending on 'diffopt', and the width of the window + relative to 'textwidth'. Use |do| and |dp| and write + to the index file to simulate "git add --patch". For + the three-way diff, there is also d2o and d3o pulling + the hunk to the middle from the left or the right + window, respectively. *fugitive-:Gsdiff* -:Gsdiff [revision] Like |:Gdiff|, but always split horizontally. +:Gsdiff [object] Like |:Gdiff|, but always split horizontally. *fugitive-:Gvdiff* -:Gvdiff [revision] Like |:Gdiff|, but always split vertically. +:Gvdiff [object] Like |:Gdiff|, but always split vertically. *fugitive-:Gmove* :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 . -: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 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 selected lines. You almost certainly want to give a "-" 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 than opening it. @@ -268,26 +268,29 @@ These maps are available everywhere. *fugitive-c_CTRL-R_CTRL-G* On the command line, recall the path to the current - object (that is, a representation of the object - recognized by |:Gedit|). + |fugitive-object| (that is, a representation of the + object recognized by |:Gedit|). *fugitive-y_CTRL-G* -["x]y Yank the commit SHA and path to the current object. +["x]y 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-* - Jump to the revision under the cursor. + Jump to the |fugitive-object| under the cursor. *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* -S Jump to the revision under the cursor in a new - vertical split. +S Jump to the |fugitive-object| under the cursor in a + new vertical split. *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--* - 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. *fugitive-.* -. Start a |:| command line with the current revision - prepopulated at the end of the line. +. Start a |:| command line with the current + |fugitive-object| prepopulated at the end of the line. *fugitive-a* a Show the current tag, commit, or tree in an alternate format. -SPECIFYING REVISIONS *fugitive-revision* +SPECIFYING OBJECTS *fugitive-object* *fugitive-revision* -Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING -REVISIONS" section in the git-rev-parse man page. For commands that accept an -optional revision, the default is the file in the index for work tree files -and the work tree file for everything else. Example revisions follow. +Fugitive objects are either work tree files or Git revisions as defined in the +"SPECIFYING REVISIONS" section in the git-rev-parse man page, with a few +convenience notations thrown in for good measure. For commands that accept an +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 refs/heads/x .git/refs/heads/x @ The commit referenced by @ aka HEAD