Repository navigation
$1 necessity in commit-msg hook
#1108
|
In the docs, using Upon testing,
Is there an edge case where |
Replies: 2 comments 2 replies
|
Pinging you in case you missed this. |
|
I investigated in the git source code and it seems like The Anyway, it should be safe to assume Investigation
|
I investigated in the git source code and it seems like
$1always ends with/COMMIT_EDITMSG.The
.gitdirectory can be configured so the directory path may be different. I haven't worked with submodules enough but perhaps this is can be different for submodules too, as you speculate.Anyway, it should be safe to assume
.git/COMMIT_EDITMSGas long as you're not changing the.gitdirectory.Investigation
The
commit-msgcommit hook is called here with argumentgit_path_commit_editmsg():https://github.com/git/git/blob/715d08a9e51251ad8290b181b6ac3b9e1f9719d7/builtin/commit.c#L1088
git_path_commit_editmsgis defined usingGIT_PATH_FUNChere:https://github.com/git/git/blob/715d08a9e51251a…