I have a commit-msg
where I use GIT_AUTHOR_NAME
for whitelisting specific developers for certain commit message standards.
In normal scenarios, GIT_AUTHOR_NAME
is always defined and shows the correct author of the commit.
When I am doing a release with these steps below
git checkout -b release/1.2.0 develop
git checkout master
git merge --no-ff release/1.2.0
git opens an internal message prompt for the merges.
Merge branch 'release/1.2.0'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
After I save it and exit, inside my commit-msg
hook the GIT_AUTHOR_NAME
and GIT_COMMITTER_NAME
are both empty. And not only those values, but also the email, date, and any other author-related variable.
What's the problem here?
GIT_AUTHOR_NAME
? Do you usesudo
?