Rename field in Snapshot: Tree -> TreeID

This commit is contained in:
Alexander Neumann
2014-08-04 23:25:32 +02:00
parent 500f4f9997
commit b923a2065a
4 changed files with 5 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import (
type Snapshot struct {
Time time.Time `json:"time"`
Tree ID `json:"tree"`
TreeID ID `json:"tree"`
Dir string `json:"dir"`
Hostname string `json:"hostname,omitempty"`
Username string `json:"username,omitempty"`
@@ -39,7 +39,7 @@ func NewSnapshot(dir string) *Snapshot {
}
func (sn *Snapshot) Save(repo *Repository) (ID, error) {
if sn.Tree == nil {
if sn.TreeID == nil {
panic("Snapshot.Save() called with nil tree id")
}