-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message Commit hook doesn't work with git gui #40
Labels
Comments
Thanks for raising this @bachp. We should implement this in a non-breaking fashion by defaulting to Your suggested changes make a lot of sense – a PR would be very welcome if you'd like to contribute. |
I found another way to make it work: |
satazor
added a commit
to satazor/commitlint
that referenced
this issue
Oct 13, 2017
satazor
added a commit
to satazor/commitlint
that referenced
this issue
Oct 13, 2017
satazor
added a commit
to satazor/commitlint
that referenced
this issue
Oct 13, 2017
satazor
added a commit
to satazor/commitlint
that referenced
this issue
Oct 13, 2017
bpedersen
pushed a commit
to bpedersen/commitlint
that referenced
this issue
Oct 15, 2019
* chore: adds actions * chore: updates workflow * chore: leave node 12 placeholder * chore: leave node 12 placeholder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the recommended husky commit message hook doesn't work with
git gui
.The issue is that
-e
assumes the commit message is at.git/COMMIT_EDITMSG
which is not always true.git gui
for example places the commit message at.git/GITGUI_EDITMESSAGE
.Looking at the sample commit-msg hook from Git it specifies that the location of the file containing the commit message is passed as first argument
$1
.To make this work I think there are two changes necessary:
-e
accept an argument"commitmsg": "conventional-changelog-lint -e $GIT_PARAMS"
Point two is required as husky doesn't pass the arguments directly but instead puts them into an environment variable
GIT_PARAMS
.The text was updated successfully, but these errors were encountered: