bk201- / jira-prepare-commit-msg

Husky Git hook to add JIRA ticket ID into the commit message.
MIT License
116 stars 37 forks source link

Git rebase throws error when applying rebase #534

Open chicken-suop opened 2 years ago

chicken-suop commented 2 years ago

When I use git rebase -i `git merge-base HEAD master` --rebase-merges and apply the rebase I get this error message repeated for each commit, even though it doesn't block the rebase:

JIRA prepare commit msg > done
JIRA prepare commit msg > start
JIRA prepare commit msg > Error: Command failed: git --git-dir="/Volumes/SourceCode/myrepo/.git" symbolic-ref --short HEAD
fatal: ref HEAD is not a symbolic ref

Running this in terminal succeeds:

$ git --git-dir="/Volumes/SourceCode/myrepo/.git" symbolic-ref --short HEAD
develop
cassus commented 1 year ago

Calling this hook for every commit in a rebase makes the rebases take a lot longer. Maybe the fix could be not calling this hook?

kevindux commented 1 year ago

I've the same issue. Calling the git command by hand works though.

Any information on a possible fix?

OnkelTem commented 5 days ago

@bk201- Dmitry? What do you think?

OnkelTem commented 5 days ago

PR: #748