I am trying to get the status of a repository, but the following code will not return.
But I am not sure if this even the correct approach, so I wanted to check if the following snippet is valid? (For readability I removed the error checking.)
repo, _ := git.PlainOpen("/path/to/repo")
work, _ := repo.Worktree()
st, _ := work.Status() // will not return
I am trying to get the status of a repository, but the following code will not return. But I am not sure if this even the correct approach, so I wanted to check if the following snippet is valid? (For readability I removed the error checking.)
The last code I was able to see while debugging was https://github.com/src-d/go-git/blob/1a7db85bca7027d90afdb5ce711622aaac9feaed/worktree_status.go#L227
So it could be that the Storer has to be initialized first? Would be glad for feedback. Thanks.