diff options
author | Florian Klink <flokli@flokli.de> | 2023-10-10T21·03+0200 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-10-11T11·43+0000 |
commit | fb04645b0d6242b1f75da0b2d20d3371a7a9be51 (patch) | |
tree | 9c38ed532379af65a6c29710fff7ecb558cbe599 /tvix/store/protos | |
parent | 673f5febbb0fe08a8465d1f12854b603935bb15f (diff) |
docs(tvix/store/protos): explain a bit more what we're doing r/6782
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>
Diffstat (limited to 'tvix/store/protos')
-rw-r--r-- | tvix/store/protos/pathinfo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/store/protos/pathinfo.go b/tvix/store/protos/pathinfo.go index 6607b5c879fb..595a1b4fab72 100644 --- a/tvix/store/protos/pathinfo.go +++ b/tvix/store/protos/pathinfo.go @@ -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)) |