ethanmdavidson/packer-plugin-git

Support with git worktrees

Closed this issue · 0 comments

If I try to use the the git-commit datasource in a git worktree (that isn't primary) I get the following error:

Error: Datasource.Execute failed: reference not found

This is because go-git is failing to resolve HEAD inside a git worktree. I think you need to enable commirdir support using the EnableDotGitCommonDir field of PlainOpenOptions to make this work.