devmoji
devmoji copied to clipboard
Bug: edit does not work with git worktree
When using git worktree the --edit flag fails, because .git isn't a directory but a file with content like
gitdir: $MY_ORIG_REPO_PATH/.git/worktrees/$MY_WORKTREE_NAME
When I look at the content of the folder the file links to it contains the COMMIT_EDITMSG file as usual.
my current workaround in husky:
prepare-commit-msg:
set -e -o pipefail
echo 'Changing git message with devmoji'
cat $1 | pnpm exec devmoji | tee $1