It's only checking whether the incoming commit is taller than the existing commit. It doesn't check the ancestry at all. So committing x<-y<-z on top of a<-b would succeed. Worse, the ref height takes into account the entire chunk hierarchy including values, not just the commits. So committing something like x on top of a<-b<-c would also work if x contains a chunk hierarchy that is bigger than c's.
It doesn't look like it to me.
It's only checking whether the incoming commit is taller than the existing commit. It doesn't check the ancestry at all. So committing
x<-y<-z
on top ofa<-b
would succeed. Worse, the ref height takes into account the entire chunk hierarchy including values, not just the commits. So committing something likex
on top ofa<-b<-c
would also work if x contains a chunk hierarchy that is bigger thanc
's.https://github.com/attic-labs/noms/blob/master/go/datas/database_common.go#L121
In order to implement fast-forward correctly, we must know all commits refs that are reachable from a given commit.