MCPcopy Index your code
hub / github.com/jetify-com/devbox / isStateUpToDate

Function isStateUpToDate

internal/lock/statehash.go:57–72  ·  view source on GitHub ↗
(args UpdateStateHashFileArgs)

Source from the content-addressed store, hash-verified

55}
56
57func isStateUpToDate(args UpdateStateHashFileArgs) (bool, error) {
58 filesystemStateHash, err := readStateHashFile(args.ProjectDir)
59 if err != nil {
60 return false, err
61 }
62 newStateHash, err := getCurrentStateHash(args)
63 if err != nil {
64 return false, err
65 }
66
67 if ignoreShellMismatch {
68 filesystemStateHash.IsFish = newStateHash.IsFish
69 }
70
71 return *filesystemStateHash == *newStateHash, nil
72}
73
74func readStateHashFile(projectDir string) (*stateHashFile, error) {
75 hashFile := &stateHashFile{}

Callers 1

Calls 2

readStateHashFileFunction · 0.85
getCurrentStateHashFunction · 0.85

Tested by

no test coverage detected