commit 0db75f06169f5af911de5666bbdcb7a7e65a7285 from: Stefan Sperling date: Sun Jul 07 11:50:58 2019 UTC document the 'abbreviated SHA1 argument' feature commit - 561c3678469226992b85a1fa3d10d79cd0826c53 commit + 0db75f06169f5af911de5666bbdcb7a7e65a7285 blob - 46a99086d2e9aa39a2d214a39a1d256cb06f5921 blob + 624c27f370b30aa52e3dca9fe9b353c3b14e74ea --- got/got.1 +++ got/got.1 @@ -139,6 +139,8 @@ This option requires that all paths in the work tree a Update the work tree to the specified .Ar commit . The expected argument is a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. If this option is not specified, the most recent commit on the work tree's branch will be used. .El @@ -179,6 +181,8 @@ will be omitted. Start traversing history at the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. If this option is not specified, default to the work tree's current branch if invoked in a work tree, or to the repository's HEAD reference. .It Fl C Ar number @@ -207,6 +211,8 @@ is specified, only show changes within this path. If two arguments are provided, treat each argument as a reference, or an object ID SHA1 hash, and display differences between these objects. Both objects must be of the same type (blobs, trees, or commits). +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .Pp The options for .Cm got diff @@ -234,6 +240,8 @@ are as follows: Start traversing history at the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .It Fl r Ar repository-path Use the repository at the specified path. If not specified, assume the repository is located at or above the current @@ -266,6 +274,8 @@ are as follows: List files and directories as they appear in the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .It Fl r Ar repository-path Use the repository at the specified path. If not specified, assume the repository is located at or above the current @@ -288,6 +298,8 @@ and make it point at the given .Ar target . The target may be an object ID SHA1 hash or an existing reference which will be resolved to an object ID. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .Pp The options for .Cm got ref @@ -415,6 +427,8 @@ The specified .Ar commit must be on a different branch than the work tree's base commit. The expected argument is a reference or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .Pp Show the status of each affected file, using the following status codes: .Bl -column YXZ description @@ -453,6 +467,8 @@ The specified .Ar commit must be on the same branch as the work tree's base commit. The expected argument is a reference or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .Pp Show the status of each affected file, using the following status codes: .Bl -column YXZ description blob - aae147e10a736201457765360242f34c13da438a blob + 98b634646628e868e9c779d14a0ac3dc5a12e063 --- tog/tog.1 +++ tog/tog.1 @@ -127,6 +127,8 @@ are as follows: Start traversing history at the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. If this option is not specified, default to the work tree's current branch if invoked in a work tree, or to the repository's HEAD reference. .It Fl r Ar repository-path @@ -139,6 +141,8 @@ Display the differences between two objects in the rep Each .Ar object argument is an object ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. Both objects must be of the same type (blobs, trees, or commits). If the .Ar repository path @@ -214,6 +218,8 @@ are as follows: Start traversing history at the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .It Fl r Ar repository-path Use the repository at the specified path. If not specified, assume the repository is located at or above the current @@ -267,6 +273,8 @@ are as follows: Start traversing history at the specified .Ar commit . The expected argument is the name of a branch or a commit ID SHA1 hash. +An abbreviated hash argument will be expanded to a full SHA1 hash +automatically, provided the abbreviation is unique. .El .El .Sh EXIT STATUS