"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
stop mentioning "SHA1 hash"es in the manpages
To:
gameoftrees@openbsd.org
Date:
Thu, 01 Aug 2024 17:46:32 +0200

Download raw body.

Thread
instead of talking about the exact hash algorithm, just use the more
generic "commit ID" or "object ID".

ok?

diff /home/op/w/got
commit - d9048d75a8da25621fe5e1facf2b6923258311a3
path + /home/op/w/got
blob - 23c2b21008d7640d7732ca9771486cac4e72d2e6
file + cvg/cvg.1
--- cvg/cvg.1
+++ cvg/cvg.1
@@ -362,9 +362,9 @@ reference will be used.
 Check out files from the specified
 .Ar commit
 on the selected branch.
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 If this option is not specified, the most recent commit on the selected
 branch will be used.
@@ -491,9 +491,9 @@ or could be discarded with
 .It Fl c Ar commit
 Update the work tree to the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 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.
@@ -650,9 +650,9 @@ By default, 3 lines of context are shown.
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 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.
@@ -701,7 +701,7 @@ If this directory is a
 work tree, use the repository path associated with this work tree.
 .It Fl S Ar search-pattern
 If specified, show only commits with a log message, author name,
-committer name, or ID SHA1 hash matched by the extended regular
+committer name, or commit ID matched by the extended regular
 expression
 .Ar search-pattern .
 Lines in committed patches will be matched if
@@ -745,10 +745,10 @@ If one or more
 arguments are specified, only show changes within the specified paths.
 .Pp
 If two arguments are provided, treat each argument as a reference, a tag
-name, or an object ID SHA1 hash, and display differences between the
+name, or an object ID, and display differences between the
 corresponding 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
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 If none of these interpretations produce a valid result or if the
 .Fl P
@@ -774,9 +774,9 @@ When used only once, show differences between the spec
 and its first parent commit.
 When used twice, show differences between the two specified commits.
 .Pp
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .Pp
 If the
@@ -834,9 +834,9 @@ are as follows:
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .It Fl r Ar repository-path
 Use the repository at the specified path.
@@ -881,9 +881,9 @@ are as follows:
 .It Fl c Ar commit
 List files and directories as they appear in the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .It Fl i
 Show object IDs of files (blob objects) and directories (tree objects).
@@ -934,9 +934,9 @@ Make the newly created tag reference point at the spec
 .Ar commit .
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash or an existing reference or tag name which
+argument is a commit ID or an existing reference or tag name which
 will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .It Fl l
 List all existing tags in the repository instead of creating a new tag.
@@ -1449,8 +1449,8 @@ into the work tree.
 The specified
 .Ar commit
 should 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
+The expected argument is a reference or a commit ID.
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .Pp
 Show the status of each affected file, using the following status codes:
@@ -1557,8 +1557,8 @@ into the work tree.
 The specified
 .Ar commit
 should 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
+The expected argument is a reference or a commit ID.
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .Pp
 Show the status of each affected file, using the following status codes:
@@ -1665,10 +1665,10 @@ to the actual content stored in such objects.
 Blob object contents are printed as they would appear in files on disk.
 .Pp
 Attempt to interpret each argument as a reference, a tag name, or
-an object ID SHA1 hash.
+an object ID.
 References will be resolved to an object ID.
 Tag names will resolved to a tag object.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .Pp
 If none of the above interpretations produce a valid result, or if the
@@ -1685,9 +1685,9 @@ Look up paths in the specified
 .Ar commit .
 If this option is not used, paths are looked up in the commit resolved
 via the repository's HEAD reference.
-The expected argument is a commit ID SHA1 hash or an existing reference
+The expected argument is a commit ID or an existing reference
 or tag name which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a commit ID
 automatically, provided the abbreviation is unique.
 .It Fl P
 Interpret all arguments as paths only.
blob - e1bad37d93f3c3a3245263af0487b27292648a5e
file + got/git-repository.5
--- got/git-repository.5
+++ got/git-repository.5
@@ -23,7 +23,7 @@
 A Git repository stores a series of versioned snapshots of a file hierarchy.
 Conceptually, the repository's data model is a directed acyclic graph which
 contains four types of objects as nodes:
-.Bl -tag -width Ds
+.Bl -tag -width commits
 .It Blobs
 The content of tracked files is stored in objects of type
 .Em blob .
@@ -57,8 +57,11 @@ Tag objects also contain a tag message, as well as aut
 timestamp information.
 .El
 .Pp
-Each object is identified by a SHA1 hash calculated over both the object's
+Each object is identified by an hash calculated over both the object's
 header and the data stored in the object.
+The hashing algorithm used is specified in the repository
+.Pa config
+file for newer repositories while older ones use SHA1 implicitly.
 .Sh OBJECT STORAGE
 Loose objects are stored as individual files beneath the directory
 .Pa objects ,
@@ -88,7 +91,7 @@ This other object is referred to by its offset in the 
 .It Reference Delta Objects
 This object is represented as a delta against another object in the
 same pack file.
-The other object is referred to by its SHA1 object identifier.
+The other object is referred to by its object identifier.
 .El
 .Pp
 Pack files are self-contained and may not refer to loose objects or
blob - a3a247e21318a437ab4b94e79a0a02cca93ad2f8
file + got/got-worktree.5
--- got/got-worktree.5
+++ got/got-worktree.5
@@ -159,7 +159,7 @@ the Git repository with
 .It Pa .got
 Meta-data directory where all files listed below reside.
 .It Pa base-commit
-SHA1 hex-string representation of the current base commit.
+hash digest hex-string representation of the current base commit.
 .It Pa file-index
 File status information.
 .It Pa format
blob - 8d7484c497a231b5351f541295c4fa4d6609a5e0
file + got/got.1
--- got/got.1
+++ got/got.1
@@ -666,9 +666,9 @@ branch will be used.
 .Pp
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -831,9 +831,9 @@ branch will be used.
 .Pp
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1033,9 +1033,9 @@ if invoked in a work tree, or to the repository's HEAD
 .Pp
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1121,7 +1121,7 @@ If this directory is a
 work tree, use the repository path associated with this work tree.
 .It Fl S Ar search-pattern
 If specified, show only commits with a log message, author name,
-committer name, or ID SHA1 hash matched by the extended regular
+committer name, or commit ID matched by the extended regular
 expression
 .Ar search-pattern .
 Lines in committed patches will be matched if
@@ -1155,7 +1155,7 @@ Like
 .Fl c ,
 the expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
 This option has no effect if the specified
 .Ar commit
@@ -1178,10 +1178,10 @@ If one or more
 arguments are specified, only show changes within the specified paths.
 .Pp
 If two arguments are provided, treat each argument as a reference, a tag
-name, or an object ID SHA1 hash, and display differences between the
+name, or an object ID, and display differences between the
 corresponding 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
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 If none of these interpretations produce a valid result or if the
 .Fl P
@@ -1216,9 +1216,9 @@ arguments are provided, only show differences for the 
 .Pp
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1305,9 +1305,9 @@ are as follows:
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash, or a reference name
+The expected argument is a commit ID, or a reference name
 or a keyword which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1389,9 +1389,9 @@ are as follows:
 List files and directories as they appear in the specified
 .Ar commit .
 .Pp
-The expected argument is a commit ID SHA1 hash, or a reference name
+The expected argument is a commit ID, or a reference name
 or a keyword which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1470,10 +1470,10 @@ will point at the specified
 .Pp
 The expected
 .Ar object
-argument is an ID SHA1 hash or an existing reference or tag name
+argument is an object ID or an existing reference or tag name
 or a keyword which will be resolved to the ID of a corresponding commit,
 tree, tag, or blob object.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1621,9 +1621,9 @@ are as follows:
 .It Fl c Ar commit
 Make a newly created branch reference point at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash, or a reference name or keyword
+The expected argument is a commit ID, or a reference name or keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -1746,9 +1746,9 @@ Make the newly created tag reference point at the spec
 .Ar commit .
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference or keyword
+argument is a commit ID, or a reference or keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -2054,9 +2054,9 @@ than producing merge conflicts in the patched target f
 .Pp
 The expected
 .Ar commit
-argument is a commit ID SHA1 hash, or a reference name or a keyword
+argument is a commit ID, or a reference name or a keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -2538,9 +2538,9 @@ The specified
 .Ar commit
 should be on a different branch than the work tree's base commit.
 .Pp
-The expected argument is a commit ID SHA1 hash, or a reference name or
+The expected argument is a commit ID, or a reference name or
 keyword which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -2681,9 +2681,9 @@ The specified
 .Ar commit
 should be on the same branch as the work tree's base commit.
 .Pp
-The expected argument is a commit ID SHA1 hash, or a reference name
+The expected argument is a commit ID, or a reference name
 or keyword which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -3092,7 +3092,7 @@ Quitting the editor without saving the file will abort
 The format of the histedit script is line-based.
 Each line in the script begins with a command name, followed by
 whitespace and an argument.
-For most commands, the expected argument is a commit ID SHA1 hash.
+For most commands, the expected argument is a commit ID.
 Any remaining text on the line is ignored.
 Lines which begin with the
 .Sq #
@@ -3712,10 +3712,10 @@ to the actual content stored in such objects.
 Blob object contents are printed as they would appear in files on disk.
 .Pp
 Attempt to interpret each argument as a reference, a tag name, or
-an object ID SHA1 hash.
+an object ID.
 References will be resolved to an object ID.
 Tag names will resolved to a tag object.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 .Pp
 If none of the above interpretations produce a valid result, or if the
@@ -3733,9 +3733,9 @@ Look up paths in the specified
 If this option is not used, paths are looked up in the commit resolved
 via the repository's HEAD reference.
 .Pp
-The expected argument is a commit ID SHA1 hash, or a reference name
+The expected argument is a commit ID, or a reference name
 or keyword which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
blob - d8658727083f485410ad107da6f6be22bc730f01
file + tog/tog.1
--- tog/tog.1
+++ tog/tog.1
@@ -207,7 +207,7 @@ aborts the running operation.
 Prompt for a search pattern and start searching for matching commits.
 The search pattern is an extended regular expression which is matched
 against a commit's author name, committer name, log message, and
-commit ID SHA1 hash.
+commit ID.
 Regular expression syntax is documented in
 .Xr re_format 7 .
 .It Cm &
@@ -224,7 +224,7 @@ For example, a search started with
 will search the limited list of commits, rather than searching all commits.
 The pattern is an extended regular expression which is matched
 against a commit's author name, committer name, log message, and
-commit ID SHA1 hash.
+commit ID.
 Regular expression syntax is documented in
 .Xr re_format 7 .
 .It Cm n
@@ -282,9 +282,9 @@ key binding can be used to toggle display of merged co
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash, or a reference name or keyword
+The expected argument is a commit ID, or a reference name or keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -340,10 +340,10 @@ work tree, use the repository path associated with thi
 .Xc
 Display the differences between two objects in the repository.
 Treat each of the two arguments as a reference, a tag name, an object
-ID SHA1 hash, or a keyword and display differences between the corresponding
+ID, or a keyword and display differences between the corresponding
 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
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -564,9 +564,9 @@ are as follows:
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash, or a reference name or keyword
+The expected argument is a commit ID, or a reference name or keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base
@@ -701,9 +701,9 @@ are as follows:
 .It Fl c Ar commit
 Start traversing history at the specified
 .Ar commit .
-The expected argument is a commit ID SHA1 hash, or a reference name or keyword
+The expected argument is a commit ID, or a reference name or keyword
 which will be resolved to a commit ID.
-An abbreviated hash argument will be expanded to a full SHA1 hash
+An abbreviated hash argument will be expanded to a full commit ID
 automatically, provided the abbreviation is unique.
 The keywords
 .Qq :base