This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
panic in object.getFileStatsFromFilePatches() for commits updating submodules: both from and to are nil #654
Closed
Description
Got this error on some private repository with submodules for commits that only update submodules refs: both from
and to
files are nil
here https://github.com/src-d/go-git/blob/master/plumbing/object/patch.go#L278
Here is the panic stacktrace:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x110fe8e]
goroutine 1 [running]:
gopkg.in/src-d/go-git.v4/plumbing/object.getFileStatsFromFilePatches(0xc4203b8a00, 0x1, 0x1, 0xc42032b830, 0x0, 0x0)
/Users/krylovsk/src/gopkg.in/src-d/go-git.v4/plumbing/object/patch.go:278 +0x43e
gopkg.in/src-d/go-git.v4/plumbing/object.(*Patch).Stats(0xc42032b830, 0x0, 0x1, 0xc42032b830)
/Users/krylovsk/src/gopkg.in/src-d/go-git.v4/plumbing/object/patch.go:111 +0x41
main.main()
/tmp/git-test/main.go:38 +0x35a
exit status 2