-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Description
Stacktrace
runtime stack:
runtime.throw(0xbd91e0, 0x2a)
/usr/local/go/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x5a
goroutine 2654459 [syscall, locked to thread]:
runtime.cgocall(0x8881fd, 0xc823f46eb8, 0xc800000000)
/usr/local/go/src/runtime/cgocall.go:123 +0x11b fp=0xc823f46e68 sp=0xc823f46e38
github.com/libgit2/git2go._Cfunc_git_object_lookup(0xc8202b2048, 0x7fe296dffa20, 0xc8237b0760, 0x3, 0x0)
??:0 +0x41 fp=0xc823f46eb8 sp=0xc823f46e68
github.com/libgit2/git2go.(*Repository).lookupType(0xc822bc2980, 0xc8237b0760, 0x3, 0x0, 0x0, 0x0)
/go/src/github.com/libgit2/git2go/repository.go:172 +0x288 fp=0xc823f46f60 sp=0xc823f46eb8
github.com/libgit2/git2go.(*Repository).LookupBlob(0xc822bc2980, 0xc8237b0760, 0xc8237b0760, 0x0, 0x0)
/go/src/github.com/libgit2/git2go/repository.go:203 +0x44 fp=0xc823f46fa8 sp=0xc823f46f60
Calling code
func GetBlob(repo *git.Repository, sha string) (*BlobResponse, error) {
// Ensure SHA is OID
oid, err := git.NewOid(sha)
if err != nil {
return nil, err
}
// Get blob
blob, err := repo.LookupBlob(oid)
if err != nil {
return nil, err
}
// More code
return nil, nil
}
Environment
go
:1.6
git2go
:37d3c2d9ad4c4e970cac02faec8ad184412c34e6
libgit2
:97e57e8770132d61ff2c36bee2de2c7ac5c9d609
Metadata
Metadata
Assignees
Labels
No labels