Kaartic Sivaraam [off-list ref] writes:
quoted
By the way, the one that is still actually enabled is no longer
needed. The commit template generated internally was corrected some
time ago not to add the "Conflicts:" section without commenting it
out.
I'll send in another patch that removes it but it seems removing it
would leave sample hook without anything turned on by default. That
doesn't sound fine, does it?
Actually I was wondering if it is a good idea to remove it, as it
seems to have outlived its usefulness.
From: "Junio C Hamano" <redacted>
Kaartic Sivaraam [off-list ref] writes:
quoted
quoted
By the way, the one that is still actually enabled is no longer
needed. The commit template generated internally was corrected some
time ago not to add the "Conflicts:" section without commenting it
out.
I'll send in another patch that removes it but it seems removing it
would leave sample hook without anything turned on by default. That
doesn't sound fine, does it?
Actually I was wondering if it is a good idea to remove it, as it
seems to have outlived its usefulness.
Personally, I like the comfort of seeing the Conflicts: list, but if others
have indicated otherwise...
--
Philip
On Sat, 2017-07-01 at 10:36 -0700, Junio C Hamano wrote:
Actually I was wondering if it is a good idea to remove it, as it
seems to have outlived its usefulness.
It does seem to be a good idea but it would leave the 'prepare-commit-
msg' hook with no scripts that could be used by just activating it.
That's why I thought of adding a script that removes the "Please enter
your.." message from the comments if it exists. A typical patch will
follow.
Enabling the "prepare-commit-msg" hook with the patch that follows
would do have following result,
Before,
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch hook-test-merge
# Changes to be committed:
# new file: commit-msg
#
After,
# On branch hook-test-merge
# Changes to be committed:
# new file: commit-msg
#
A typical consequence for "git commit --amend" would be,
Before,
Test commit
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Sun Jul 2 00:11:28 2017 +0530
After,
Test commit
#
# Date: Sun Jul 2 00:11:28 2017 +0530
#