From e5fcfd6ebf32a2a27d6e18ec48968d55dd79e6ef Mon Sep 17 00:00:00 2001 From: cmasone-attic Date: Thu, 1 Sep 2016 17:21:31 -0700 Subject: [PATCH] Make poke hang on to parent's Commit metadata (#2504) Before this, poke would drop any commit metadata from the dataset being modified. Now, it just pulls it forward. --- samples/go/poke/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/go/poke/main.go b/samples/go/poke/main.go index 41d9dc5930..9847b245dc 100644 --- a/samples/go/poke/main.go +++ b/samples/go/poke/main.go @@ -8,6 +8,7 @@ import ( "fmt" "os" + "github.com/attic-labs/noms/go/datas" "github.com/attic-labs/noms/go/dataset" "github.com/attic-labs/noms/go/spec" "github.com/attic-labs/noms/go/types" @@ -83,7 +84,7 @@ func poke() (win bool) { return } - _, err = outDS.CommitValue(outRoot) + _, err = outDS.Commit(outRoot, dataset.CommitOptions{Meta: inDS.Head().Get(datas.MetaField).(types.Struct)}) if err != nil { fmt.Fprintf(os.Stderr, "Could not commit: %s\n", err) return