Skip to content

Commit

Permalink
sumdb/dirhash: correct documentation of hash
Browse files Browse the repository at this point in the history
The "equivalent Unix command" was missing a layer of sha256sum.

Fixes golang/go#48498.

Change-Id: I1051bfa5fcbbf1625623d11cf21686b33da19b88
Reviewed-on: https://go-review.googlesource.com/c/mod/+/464295
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
  • Loading branch information
rsc authored and gopherbot committed Feb 2, 2023
1 parent a42224d commit b710602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sumdb/dirhash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Hash func(files []string, open func(string) (io.ReadCloser, error)) (string
// Hash1 is "h1:" followed by the base64-encoded SHA-256 hash of a summary
// prepared as if by the Unix command:
//
// find . -type f | sort | sha256sum
// sha256sum $(find . -type f | sort) | sha256sum
//
// More precisely, the hashed summary contains a single line for each file in the list,
// ordered by sort.Strings applied to the file names, where each line consists of
Expand Down

0 comments on commit b710602

Please sign in to comment.