mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-08 02:36:27 -05:00
b33cab2b34
This is in preparation for renaming the 'Commit' abstraction to DataStore. So we will essentially have a 'chunkstore' abstraction and a 'datastore' abstraction.
20 lines
386 B
Go
20 lines
386 B
Go
package enc
|
|
|
|
import (
|
|
"github.com/attic-labs/noms/chunks"
|
|
. "github.com/attic-labs/noms/dbg"
|
|
"github.com/attic-labs/noms/ref"
|
|
"github.com/attic-labs/noms/types"
|
|
)
|
|
|
|
func init() {
|
|
types.Reffer = refferImpl
|
|
}
|
|
|
|
func refferImpl(v types.Value) ref.Ref {
|
|
r, err := WriteValue(v, chunks.NopSink{})
|
|
// This can never fail because NopSink doesn't write anywhere.
|
|
Chk.Nil(err)
|
|
return r
|
|
}
|