Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash1: Make comment more precisely describe how to emulate logic from shell #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sumdb/dirhash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ 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
// find . -type f -printf 'prefix/%P\n' | sort | xargs sha256sum
//
// (where prefix is something like foo/[email protected])
//
// 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