refactor(massive simplification of vcs now that we're using ndjson natively):
This commit is contained in:
parent
84c55311d1
commit
cb441b112c
4 changed files with 61 additions and 203 deletions
11
cmd/sync.go
11
cmd/sync.go
|
|
@ -44,7 +44,6 @@ func init() {
|
|||
}
|
||||
|
||||
func sync(manual bool) error {
|
||||
store := &Store{}
|
||||
repoDir, err := ensureVCSInitialized()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -89,18 +88,12 @@ func sync(manual bool) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := pullRemote(repoDir, remoteInfo); err != nil {
|
||||
return err
|
||||
}
|
||||
return restoreAllSnapshots(store, repoDir)
|
||||
return pullRemote(repoDir, remoteInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := exportAllStores(store, repoDir); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runGit(repoDir, "add", storeDirName); err != nil {
|
||||
if err := runGit(repoDir, "add", "-A"); err != nil {
|
||||
return err
|
||||
}
|
||||
changed, err := repoHasStagedChanges(repoDir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue