devmoji icon indicating copy to clipboard operation
devmoji copied to clipboard

Bug: edit does not work with git worktree

Open nidomiro opened this issue 9 months ago • 1 comments

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.

nidomiro avatar Apr 08 '25 07:04 nidomiro

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

nidomiro avatar Apr 08 '25 07:04 nidomiro