Repository navigation
Use correct path to .git/COMMIT_EDITMSG when using non-standard .git dir location - #461
Conversation
|
Hi @pascal-hofmann, Thanks for the PR. Can you give me steps to reproduce this issue? See: |
|
Yep, but the path may be relative and directory is changed, so the relative path is incorrect afterwards. Will post steps/versions required to reproduce. |
|
Steps / versions to reproduce: phpro/grumphp (v0.13.1) Result for me is this error message on red background:
This happens, because the path passed to the hook is My PR fixes this. |
|
This PR has now been open for nearly 4 weeks. How can I help to get this merged? |
|
This is happening to me too, can this get merged ? |
|
Thanks for merging! 👍 |
When grumphp is used with a
.gitdir in a non-standard location thecommit-msghook may look for the.git/COMMIT_EDITMSGfile in the wrong location.This PR prefixes the path with
git_dirconfigured ingrumphp.ymlif it's a relative path, so the correct path is used in all cases.Note: The path supplied to the hook by git may be absolute. In this case there is no need to fix it. This happens when grumphp is used inside a git submodule.