Skip to content

Commit b710602

Browse files
rscgopherbot
authored andcommitted
sumdb/dirhash: correct documentation of hash
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 <[email protected]> Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Russ Cox <[email protected]>
1 parent a42224d commit b710602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sumdb/dirhash/hash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Hash func(files []string, open func(string) (io.ReadCloser, error)) (string
3333
// Hash1 is "h1:" followed by the base64-encoded SHA-256 hash of a summary
3434
// prepared as if by the Unix command:
3535
//
36-
// find . -type f | sort | sha256sum
36+
// sha256sum $(find . -type f | sort) | sha256sum
3737
//
3838
// More precisely, the hashed summary contains a single line for each file in the list,
3939
// ordered by sort.Strings applied to the file names, where each line consists of

0 commit comments

Comments
 (0)