From b22a3079466b72e8a8b76065d6c28efe7eea4b16 Mon Sep 17 00:00:00 2001 From: Kaartic Sivaraam Date: Tue, 11 Jul 2017 19:41:08 +0530 Subject: hook: cleanup script Prepare the 'preare-commit-msg' sample script for upcoming changes. Preparation includes removal of an example that has outlived it's purpose. The example is the one that comments the "Conflicts:" part of a merge commit message. It isn't relevant anymore as it's done by default since 261f315b ("merge & sequencer: turn "Conflicts:" hint into a comment", 2014-08-28). Further update the relevant comments from the sample script and update the documentation. Signed-off-by: Kaartic Sivaraam Signed-off-by: Junio C Hamano --- Documentation/githooks.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index b2514f4d44..43f3555075 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -121,9 +121,6 @@ it is not suppressed by the `--no-verify` option. A non-zero exit means a failure of the hook and aborts the commit. It should not be used as replacement for pre-commit hook. -The sample `prepare-commit-msg` hook that comes with Git comments -out the `Conflicts:` part of a merge's commit message. - commit-msg ~~~~~~~~~~ -- cgit v1.2.3 From 0ef1a4e32a720928a497a13ef08aa8f0a63dc476 Mon Sep 17 00:00:00 2001 From: Kaartic Sivaraam Date: Tue, 11 Jul 2017 20:00:54 +0530 Subject: hook: add a simple first example Add a simple example that replaces an outdated example that was removed. This ensures that there's at the least a simple example that illustrates what could be done using the hook just by enabling it. Also, update the documentation. Signed-off-by: Kaartic Sivaraam Signed-off-by: Junio C Hamano --- Documentation/githooks.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation') diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 43f3555075..623ed1a138 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -121,6 +121,9 @@ it is not suppressed by the `--no-verify` option. A non-zero exit means a failure of the hook and aborts the commit. It should not be used as replacement for pre-commit hook. +The sample `prepare-commit-msg` hook that comes with Git removes the +help message found in the commented portion of the commit template. + commit-msg ~~~~~~~~~~ -- cgit v1.2.3