1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 05:20:26 +00:00

explictly fail if git can't operate (#194)

* explictly fail if git can't operate

* Update revision.go
This commit is contained in:
V 2023-03-11 23:57:14 -08:00 committed by GitHub
parent 9a458a78a6
commit 96d7401f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,10 @@ func (stream *recentChangesStream) next(n int) []Revision {
// currHash is the last revision from the last call, so skip it
args = append(args, "--skip=1", stream.currHash)
}
// I don't think this can fail, so ignore the error
res, _ := gitLog(args...)
res, err := gitLog(args...)
if err != nil {
log.Fatal(err)
}
if len(res) != 0 {
stream.currHash = res[len(res)-1].Hash
}