docs(tvix/store/protos): explain a bit more what we're doing

Explain a bit better what we do in the codeblock below,
and add a newline to make it clear we don't just document the first
branch.

Change-Id: Ifb142d9984e6d2cbca648525c10298f2fcbdfedf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9645
Tested-by: BuildkiteCI
Reviewed-by: Brian McGee <brian@bmcgee.ie>
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2023-10-10 23:03:47 +02:00 committed by flokli
parent 673f5febbb
commit fb04645b0d

View file

@ -51,7 +51,9 @@ func (p *PathInfo) Validate() (*storepath.StorePath, error) {
return nil, fmt.Errorf("root node must be set")
}
// ensure it properly parses to a store path, and in case it refers to a digest, ensure it has the right length.
// for all three node types, ensure the name properly parses to a store path,
// and in case it refers to a digest, ensure it has the right length.
if node := rootNode.GetDirectory(); node != nil {
if len(node.Digest) != 32 {
return nil, fmt.Errorf("invalid digest size for %s, expected %d, got %d", node.Name, 32, len(node.Digest))