isacikgoz / gitbatch

manage your git repositories in one place
MIT License
1.54k stars 53 forks source link

Crash on remoteless repositories #59

Closed philipperemy closed 5 years ago

philipperemy commented 5 years ago
│ ↖ 0 ↘ 0 | master ✗          | Stanford-OpenIE-Python             |panic: runtime error: index out of range                                                          │
│                                                                                                                                                                     │
goroutine 120 [running]:                                                                                                                                              │
github.com/isacikgoz/gitbatch/core/git.(*Repository).initRemotes(0xc420344000, 0xc420344000, 0xc42031c4b0)                                                            │
│       /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/gitbatch/core/git/remote.go:42 +0x5ce                                                                │
github.com/isacikgoz/gitbatch/core/git.(*Repository).loadComponents(0xc420344000, 0x1, 0xc420344000, 0x0)                                                             │
│       /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/gitbatch/core/git/repository.go:142 +0x2f                                                            │
github.com/isacikgoz/gitbatch/core/git.InitializeRepo(0xc4201a0330, 0x2f, 0xc42025e000, 0x1, 0x0)                                                                     │
│       /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/gitbatch/core/git/repository.go:136 +0x7d                                                            │
github.com/isacikgoz/gitbatch/core/load.AsyncLoad.func1(0xc42025c000, 0xc42022a008, 0xc420143520, 0xc4201a0330, 0x2f)                                                 │
│       /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/gitbatch/core/load/load.go:79 +0x89                                                                  │
created by github.com/isacikgoz/gitbatch/core/load.AsyncLoad                                                                                                          │
│       /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/gitbatch/core/load/load.go:76 +0x112
philipperemy commented 5 years ago

Using 0.4.0 on MacOS

philipperemy commented 5 years ago

@isacikgoz if you could help a look that'd be great

isacikgoz commented 5 years ago

@philipperemy thanks for the feedback. It caused by a repository that does not have a remote. I will patch this soon, There are two quick workarounds for now:

philipperemy commented 5 years ago

@isacikgoz got it thanks!

isacikgoz commented 5 years ago

fixed with #60

philipperemy commented 5 years ago

@isacikgoz thanks!