Skip to content

a qn about synchronize features #375

@phanirithvij

Description

@phanirithvij
func syncReposFromFS () {
  gists, err := db.GetAllGistsRows()
  for range gists {
    // if repository does not exist, delete gist from database
    if _, err := os.Stat(git.RepositoryPath(gist.User.Username, gist.Uuid)); err != nil && !os.IsExist(err) {
      if err2 := gist.Delete(); {}
    }
  }

I read this as cleanup unknown gists in db

But synchronize gists from filesystem means the following ideally.

I clone a github gist for eg. in opengist-home/repos/{user}/{gistid} as a bare repo, then synchronize should add it to db. (i.e. the index and import feature on the backend as supposted to from the UI #208)

similarly sync from db is actually cleanup unknown gists in filesystem

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions