Add command 'fsck'

This commit is contained in:
Alexander Neumann
2014-08-04 23:25:58 +02:00
parent b923a2065a
commit ad8125d83c
3 changed files with 89 additions and 0 deletions

View File

@@ -68,6 +68,8 @@ func LoadSnapshot(repo *Repository, id ID) (*Snapshot, error) {
return nil, err
}
// TODO: maybe inject a hashing reader here and test if the given id is correct
dec := json.NewDecoder(rd)
sn := &Snapshot{}
err = dec.Decode(sn)