mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-05 11:21:58 -05:00
Rename noms-pull -> shove, and fix shove
I busted noms-pull in the patch where I added MaybeHeads. So, fix it and rename to 'shove' per issue #210
This commit is contained in:
@@ -1 +0,0 @@
|
||||
noms-pull
|
||||
@@ -0,0 +1 @@
|
||||
shove
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/attic-labs/noms/clients/util"
|
||||
"github.com/attic-labs/noms/d"
|
||||
"github.com/attic-labs/noms/dataset"
|
||||
"github.com/attic-labs/noms/ref"
|
||||
"github.com/attic-labs/noms/sync"
|
||||
)
|
||||
|
||||
@@ -30,10 +31,14 @@ func main() {
|
||||
defer util.StopCPUProfile()
|
||||
}
|
||||
|
||||
newHead := source.Head().Ref()
|
||||
refs := sync.DiffHeadsByRef(sink.Head().Ref(), newHead, source.Store())
|
||||
newHeadRef := source.Head().Ref()
|
||||
currentHeadRef := ref.Ref{}
|
||||
if currentHead, ok := sink.MaybeHead(); ok {
|
||||
currentHeadRef = currentHead.Ref()
|
||||
}
|
||||
refs := sync.DiffHeadsByRef(currentHeadRef, newHeadRef, source.Store())
|
||||
sync.CopyChunks(refs, source.Store(), sink.Store())
|
||||
for ok := false; !ok; *sink, ok = sync.SetNewHead(newHead, *sink) {
|
||||
for ok := false; !ok; *sink, ok = sync.SetNewHead(newHeadRef, *sink) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user