Oid revamp #68

Merged
carlosmn merged 5 commits from cmn/oid-revamp into master 2014-03-19 01:20:45 -05:00
2 changed files with 9 additions and 1 deletions
Showing only changes of commit b82a72a9ce - Show all commits

2
git.go
View File

@ -88,7 +88,7 @@ func (oid *Oid) Equal(oid2 *Oid) bool {
func (oid *Oid) IsZero() bool {
for _, a := range oid {
if a != '0' {
if a != 0 {
return false
}
}

View File

@ -54,3 +54,11 @@ func seedTestRepo(t *testing.T, repo *Repository) (*Oid, *Oid) {
return commitId, treeId
}
func TestOidZero(t *testing.T) {
var zeroId Oid
if !zeroId.IsZero() {
t.Error("Zero Oid is not zero")
}
}