a qn about synchronize features
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 https://github.com/thomiceli/opengist/issues/208)
similarly sync from db is actually cleanup unknown gists in filesystem
You're right, it's not really a good semantic atm. We should change something like cleanup unknown gists in filesystem
I also was tricked into thinking I could clone a bare repository into $opengist-home/repo/user/ and have it "synced" into Opengist.
FWIW, the reason I was trying this: I'd like to synchronize the repository directory across to a laptop which can use the same repo with a distinct Openbist SQLite3 database for taking along.