I work in a situation where I need to track multiple branches of multiple repositories and I use git worktree to create working directories without cloning the repository repeatedly.
When I attempt to run gitbatch -m pull -q in a directory containing working copy directories of git repositories that were created with git worktree add -b <BRANCH> <WORKING LOCATION> from the main cloned location, I see an error like the following:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x18 pc=0x10507eb70]
goroutine 37 [running]:
github.com/go-git/go-git/v5/plumbing.(*Reference).Hash(...)
github.com/go-git/go-git/v5@v5.1.0/plumbing/reference.go:183
github.com/isacikgoz/gitbatch/internal/command.pullWithGit(0x14000214340, 0x140000a4ea0)
github.com/isacikgoz/gitbatch/internal/command/pull.go:72 +0x230
github.com/isacikgoz/gitbatch/internal/command.Pull(0x1400016eaf0?, 0x43?)
github.com/isacikgoz/gitbatch/internal/command/pull.go:47 +0x58
github.com/isacikgoz/gitbatch/internal/app.operate({0x1400016eaf0?, 0x0?}, {0x16b1a3444, 0x4})
github.com/isacikgoz/gitbatch/internal/app/quick.go:43 +0x84
github.com/isacikgoz/gitbatch/internal/app.quick.func1({0x1400016eaf0, 0x43}, {0x16b1a3444, 0x4})
github.com/isacikgoz/gitbatch/internal/app/quick.go:19 +0x60
created by github.com/isacikgoz/gitbatch/internal/app.quick in goroutine 1
github.com/isacikgoz/gitbatch/internal/app/quick.go:17 +0x60
When I run gitbatch in interactive mode in the same directory, I simply don't see these working directories in the list of git projects.
I work in a situation where I need to track multiple branches of multiple repositories and I use
git worktreeto create working directories without cloning the repository repeatedly.When I attempt to run
gitbatch -m pull -qin a directory containing working copy directories of git repositories that were created withgit worktree add -b <BRANCH> <WORKING LOCATION>from the main cloned location, I see an error like the following:When I run
gitbatchin interactive mode in the same directory, I simply don't see these working directories in the list of git projects.