refactor(massive simplification of vcs now that we're using ndjson natively):

This commit is contained in:
Lewis Wynne 2026-02-11 00:28:56 +00:00
parent 84c55311d1
commit cb441b112c
4 changed files with 61 additions and 203 deletions

View file

@ -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)