misc config updates
[distro-setup] / .git_template / hooks / pre-commit
index ad2218a75005212d19a5da44fe034cc6a788f6ea..182dcb9af9ea5fcac76786e4bf293c677afbd5ed 100755 (executable)
@@ -14,9 +14,8 @@
 # limitations under the License.
 
 
-# This is the git upstream example hook, but it's actually useful.
+# ian: This section is the git upstream example hook, but it's actually useful.
 
-#
 # An example hook script to verify what is about to be committed.
 # Called by "git commit" with no arguments.  The hook should
 # exit with non-zero status after issuing an appropriate message if
@@ -58,17 +57,18 @@ EOF
     exit 1
 fi
 
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
 
 
-# inspired from:
+# ian: inspired from:
 # https://github.com/ntc2/conf/blob/master/dot.gitconfig
+# last checked for any changes there on 7/2016
 # duplicated at,
 # http://stackoverflow.com/a/15398512/14456
-# last checked for any changes there on 7/2016
 
 
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
+
 if [[ $(git config --bool hooks.allowwhitespace) == true ]] || \
        [[ $GIT_ALLOWWHITESPACE == true ]]; then
     exit 0