summaryrefslogtreecommitdiff
path: root/Utilities/Git
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-10-24 10:18:36 -0400
committerBrad King <brad.king@kitware.com>2011-10-24 10:18:36 -0400
commit3d5869ca3c065c872d6365164b301d2f8d7e2b64 (patch)
tree9065e7b8fbf06ec93a64bf4291c88f012db68e25 /Utilities/Git
parent89742d73cc684a78586fad2497048d9329c1160e (diff)
downloadcmake-3d5869ca3c065c872d6365164b301d2f8d7e2b64.tar.gz
Add pre-commit|commit-msg|prepare-commit-msg hook placeholders
Add CMake-specific hook placeholders that chain from the main hooks branch after it is installed into the local .git/hooks directory.
Diffstat (limited to 'Utilities/Git')
-rwxr-xr-xUtilities/Git/commit-msg23
-rwxr-xr-xUtilities/Git/pre-commit23
-rwxr-xr-xUtilities/Git/prepare-commit-msg15
3 files changed, 61 insertions, 0 deletions
diff --git a/Utilities/Git/commit-msg b/Utilities/Git/commit-msg
new file mode 100755
index 0000000000..9a5d1c1b39
--- /dev/null
+++ b/Utilities/Git/commit-msg
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#=============================================================================
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+die() {
+ echo 'commit-msg hook failure' 1>&2
+ echo '-----------------------' 1>&2
+ echo '' 1>&2
+ echo "$@" 1>&2
+ exit 1
+}
+
+# This is a placeholder for future commit-msg checks.
+exit 0
diff --git a/Utilities/Git/pre-commit b/Utilities/Git/pre-commit
new file mode 100755
index 0000000000..e4f9fd0a70
--- /dev/null
+++ b/Utilities/Git/pre-commit
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#=============================================================================
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+die() {
+ echo 'pre-commit hook failure' 1>&2
+ echo '-----------------------' 1>&2
+ echo '' 1>&2
+ echo "$@" 1>&2
+ exit 1
+}
+
+# This is a placeholder for future pre-commit checks.
+exit 0
diff --git a/Utilities/Git/prepare-commit-msg b/Utilities/Git/prepare-commit-msg
new file mode 100755
index 0000000000..1517bb2db6
--- /dev/null
+++ b/Utilities/Git/prepare-commit-msg
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+#=============================================================================
+# CMake - Cross Platform Makefile Generator
+# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# This is a placeholder for future prepare-commit-msg hooks.
+exit 0