Skip to content

Commit c6942b0

Browse files
committed
Add requirements comments, update bash shebangs
1 parent 9e18fb9 commit c6942b0

14 files changed

+51
-9
lines changed

Diff for: commit-msg-hooks/enforce-insert-issue-number.hook

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# The hook should exit with non-zero status after issuing an appropriate
88
# message if it stops the commit.
99
#
10+
# Requirements:
11+
# * Python 2/3
12+
#
1013
# To enable this hook, rename this file to "commit-msg".
1114

1215
import sys, os, re

Diff for: post-checkout-hooks/delete-pyc-files.hook

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#
55
# Deletes all .pyc files every time a new branch is checked out.
66
#
7+
# Requirements:
8+
# * Python 2/3
9+
#
710
# To enable this hook, rename this file to "post-checkout".
811

912
import sys, os, re

Diff for: post-checkout-hooks/new-branch-alert.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on a hook from gist.github.com
33
# Source: https://gist.github.com/zgohr/4557894
44
#
55
# Creates a commit and displays a custom message when a new branch is checked out for the first time.
66
# A commit is made in order to help determine if a new branch has been created.
77
#
8+
# Requirements:
9+
# * Bash
10+
#
811
# To enable this hook, rename this file to "post-checkout".
912

1013
from_hash=$1

Diff for: post-update-hooks/update-server-info.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on the post-update sample generated by default in .git/hooks
33
# Source: https://www.git-scm.com/docs/githooks/1.7.1
44
#
55
# Prepares a packed repository for use over dumb transports (e.g. http).
66
#
7+
# Requirements:
8+
# * Bash
9+
#
710
# To enable this hook, rename this file to "post-update".
811

912
exec git update-server-info

Diff for: pre-commit-hooks/format-code.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
#
33
# Formats code using mvn fmt:format command.
44
# Any staged files that are modified by this command will be re-added to the commit.
55
#
6+
# Requirements:
7+
# * Bash
8+
#
69
# To enable this hook, rename this file to "pre-commit".
710

811
mvn fmt:format

Diff for: pre-commit-hooks/search-term.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on a hook from hackernoon.com
33
# Source: https://hackernoon.com/automate-your-workflow-with-git-hooks-fef5d9b2a58c
44
#
@@ -8,6 +8,9 @@
88
# The hook should exit with non-zero status after issuing an appropriate
99
# message if it stops the commit.
1010
#
11+
# Requirements:
12+
# * Bash
13+
#
1114
# To enable this hook, rename this file to "pre-commit".
1215

1316
# Redirect output to stderr

Diff for: pre-commit-hooks/spell-check-md-files.hook

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# Used to check files with the .md extension (markdown) for spelling errors.
66
# It will run each .md file through aspell and returns an exit code other than 0 when it matches.
77
#
8+
# Requirements:
9+
# * Bash
10+
#
811
# To enable this hook, rename this file to "pre-commit".
912

1013
# Where are the markdown files located?

Diff for: pre-commit-hooks/verify-name-and-email.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on a hook from tygertec.com
33
# Source: https://www.tygertec.com/git-hooks-practical-uses-windows/
44
#
@@ -7,6 +7,9 @@
77
# The hook should exit with non-zero status after issuing an appropriate
88
# message if it stops the commit.
99
#
10+
# Requirements:
11+
# * Bash
12+
#
1013
# To enable this hook, rename this file to "pre-commit".
1114

1215
# Make sure user.name is set properly

Diff for: pre-push-hooks/prevent-bad-push.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on the pre-push sample generated by default in .git/hooks
33
# Source: https://www.git-scm.com/docs/githooks/1.7.1
44
#
@@ -9,6 +9,9 @@
99
# The hook should exit with non-zero status after issuing an appropriate
1010
# message if it stops the push.
1111
#
12+
# Requirements:
13+
# * Bash
14+
#
1215
# To enable this hook, rename this file to "pre-push".
1316

1417
# This hook is called with the following parameters:

Diff for: pre-rebase-hooks/prevent-rebase.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on the pre-rebase sample generated by default in .git/hooks
33
# Source: https://www.git-scm.com/docs/githooks/1.7.1
44
# Copyright (c) 2006, 2008 Junio C Hamano
@@ -19,6 +19,9 @@
1919
# The hook should exit with non-zero status after issuing an appropriate
2020
# message if it stops the rebase.
2121
#
22+
# Requirements:
23+
# * Bash
24+
#
2225
# To enable this hook, rename this file to "pre-rebase".
2326

2427
publish=next

Diff for: prepare-commit-msg-hooks/include-git-diff-name-status.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on the pre-push sample generated by default in .git/hooks
33
# Source: https://www.git-scm.com/docs/githooks/1.7.1
44
#
@@ -13,6 +13,9 @@
1313
# commented because it doesn't cope with --amend or with squashed
1414
# commits.
1515
#
16+
# Requirements:
17+
# * Bash
18+
#
1619
# To enable this hook, rename this file to "prepare-commit-msg".
1720

1821
COMMIT_MSG_FILE=$1

Diff for: prepare-commit-msg-hooks/insert-issue-number.hook

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#
55
# Inserts issue number to beginning of the commit message.
66
#
7+
# Requirements:
8+
# * Python
9+
#
710
# To enable this hook, rename this file to "prepare-commit-msg".
811

912
import sys, os, re

Diff for: query-watchman-hooks/fsmonitor-watchman.hook

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# modified since the given time. Paths must be relative to the root of
1212
# the working tree and separated by a single NUL.
1313
#
14+
# Requirements:
15+
# * Perl
16+
#
1417
# To enable this hook, rename this file to "query-watchman" and set
1518
# 'git config core.fsmonitor .git/hooks/query-watchman'
1619

Diff for: update-hooks/prevent-unannotated-tags.hook

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Based on the update sample generated by default in .git/hooks
33
# Source: https://www.git-scm.com/docs/githooks/1.7.1
44
#
@@ -8,6 +8,9 @@
88
# The hook should exit with non-zero status after issuing an appropriate
99
# message if it stops the push.
1010
#
11+
# Requirements:
12+
# * Bash
13+
#
1114
# To enable this hook, rename this file to "update".
1215

1316
# Config

0 commit comments

Comments
 (0)