apenwarr / apenwarr/git-subtrac

Segfault from `update`

Đang mở
#11 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
389
Fork
13
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hey! I've run into a segfault when trying to do `git subtrac update`:

```text
Scanning branch: refs/heads/master
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x78d56c]

goroutine 1 [running]:
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracCommit(0xc0000e0a80, 0xc0007eba40, 0x34, 0xc0003aea50, 0xc081097bde, 0xc0003aea50, 0x0)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:229 +0xf6c
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracTree(0xc0000e0a80, 0xc000135c50, 0x24, 0xc00007a870, 0x6, 0x85fa1e, 0x1)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:547 +0xd78
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracTree(0xc0000e0a80, 0xc000023c60, 0x1d, 0xc00007a7d0, 0x6, 0x85fa1e, 0x1)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:562 +0x43f
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracTree(0xc0000e0a80, 0xc000023be0, 0x16, 0xc00007a6e0, 0x3, 0x85fa1e, 0x1)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:562 +0x43f
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracTree(0xc0000e0a80, 0xc000023b00, 0x12, 0xc00007a5f0, 0x1, 0xc000023b00, 0x12)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:562 +0x43f
github.com/apenwarr/git-subtrac/subtrac.(*Cache).tracCommit(0xc0000e0a80, 0xc000028469, 0x11, 0xc0001720f0, 0xc013dabada, 0xc0001720f0, 0x0)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:217 +0x2e6
github.com/apenwarr/git-subtrac/subtrac.(*Cache).TracByRef(0xc0000e0a80, 0xc000028469, 0x11, 0x1, 0x1, 0xc000028469)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:188 +0x2eb
github.com/apenwarr/git-subtrac/subtrac.(*Cache).UpdateBranchRefs.func1(0xc000035b40, 0xc000035b40, 0x0)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:143 +0x150
github.com/go-git/go-git/plumbing/storer.(*referenceFilteredIter).ForEach(0xc00000fbe0, 0xc00000fc40, 0x0, 0x0)
/path/to/src/gopath/src/github.com/go-git/go-git/plumbing/storer/reference.go:82 +0xa4
github.com/apenwarr/git-subtrac/subtrac.(*Cache).UpdateBranchRefs(0xc0000e0a80, 0xc00000e080, 0x2)
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/subtrac/subtrac.go:137 +0x1a6
main.main()
/path/to/src/gopath/src/github.com/apenwarr/git-subtrac/git-subtrac.go:77 +0x6eb
```

I'm a bit lost how to diagnose what went wrong ...

This error started showing up after I tried using `--depth` on a `git submodule add` so I suspect it is somehow related to that. I did however completely remove the submodule again and tried recreating it without `--depth`. This did not fix it, unfortunately :(

Any idea A) what might have gone wrong here and B) how I can fix my repo so it works again?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.