You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have investigated how to solve this, but I'm unsure if the parser should return an error, or ResolveRevision() should catch the empty items slice. Oh well. Here's the problem:
func (r*Repository) ResolveRevision(rev plumbing.Revision) (*plumbing.Hash, error) {
p:=revision.NewParserFromString(string(rev))
items, err:=p.Parse()
iferr!=nil {
returnnil, err
}
varcommit*object.Commit// <- nil zero value.for_, item:=rangeitems {
...
}
return&commit.Hash, nil// <- dereferences the nil pointer, if the for-loop is never executed.
}
The text was updated successfully, but these errors were encountered:
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
To reproduce after a simple
$ git init .
:I have investigated how to solve this, but I'm unsure if the parser should return an error, or
ResolveRevision()
should catch the emptyitems
slice. Oh well. Here's the problem:The text was updated successfully, but these errors were encountered: