We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please consider this snippet:
package main import ( "fmt" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" ) func main() { repo, err := git.PlainClone("/tmp/foo", false, &git.CloneOptions{ URL: "https://github.com/go-git/go-git", }) if err != nil { panic(err) } fmt.Println(repo.ResolveRevision(plumbing.Revision(""))) }
If I run it:
$ go run main.go panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x73b8e6] goroutine 1 [running]: github.com/go-git/go-git/v5.(*Repository).ResolveRevision(0xc0001a4450, {0x0?, 0x7fc52f?}) /home/vagrant/.asdf/installs/golang/1.19.5/packages/pkg/mod/github.com/go-git/go-git/v5@v5.5.2/repository.go:1560 +0x86 main.main() /repos/tt/repro.go:18 +0x9c exit status 2
The text was updated successfully, but these errors were encountered:
Merge pull request #696 from pjbgf/fix-panic-rr
7e345bb
*: Fix panic for empty revisions. Fixes #674
Successfully merging a pull request may close this issue.
Please consider this snippet:
If I run it:
The text was updated successfully, but these errors were encountered: