debcargo-conf is incompatible with git worktrees
At times (e.g. when I'm working on multiple transitions at once) I want to do parallel builds on different debcargo-conf branches. To do so, instead of re-cloning the repo, I'd do one set of builds in the main git directory, and then create a separate git worktree using
git worktree add $SOME_PATH $SOME_BRANCH
build whatever I need to build on that branch, then
git worktree remove $SOME_PATH
Right now debcargo-conf is not compatible with git-worktree
because of the way vars.sh.frag
discovers the .git
directory (L#11-12):
mkdir -p "$(dirname "$0")/.git/hooks"
HOOK_COMMIT="$(dirname "$0")/.git/hooks/pre-commit"
Inside a git worktree, .git
is a file, not a directory, so the first command fails and the second one makes no sense. I'll submit a MR for this.