Browse code

Add implementation

Robert Cranston authored on 25/04/2020 14:27:05
Showing 1 changed files
... ...
@@ -2,7 +2,16 @@
2 2
 
3 3
 A [Git hook][] that prevents you from committing unintended content.
4 4
 
5
+`git-hook-nocommit` is intended to be used as a [pre-commit][] hook and will
6
+refuse to commit any files with content that matches (case insensitively) the
7
+[extended regex][] `$GIT_HOOK_NOCOMMIT_REGEX` (or `nocommit|nocheckin` if it is
8
+empty) unless `$GIT_HOOK_NOCOMMIT_DISABLE` is non-empty (or `git commit` is run
9
+with the [`-n,--no-verify`][] flag).
10
+
5 11
 [Git hook]: https://git-scm.com/docs/githooks
12
+[pre-commit]: https://git-scm.com/docs/githooks#_pre_commit
13
+[extended regex]: https://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended
14
+[`-n,--no-verify`]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--n
6 15
 
7 16
 ## License
8 17
 
Browse code

Add license

Robert Cranston authored on 25/04/2020 14:19:53
Showing 1 changed files
... ...
@@ -3,3 +3,9 @@
3 3
 A [Git hook][] that prevents you from committing unintended content.
4 4
 
5 5
 [Git hook]: https://git-scm.com/docs/githooks
6
+
7
+## License
8
+
9
+Licensed under the [ISC license][], see the [`LICENSE`](LICENSE) file.
10
+
11
+[ISC license]: https://en.wikipedia.org/wiki/ISC_license
Browse code

Add readme

Robert Cranston authored on 25/04/2020 14:19:12
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+# `git-hook-nocommit`
2
+
3
+A [Git hook][] that prevents you from committing unintended content.
4
+
5
+[Git hook]: https://git-scm.com/docs/githooks