diff options
| author | Romain Francoise <rfrancoise@debian.org> | 2010-09-12 10:56:36 +0200 | 
|---|---|---|
| committer | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2012-02-10 00:41:10 +0100 | 
| commit | e5f47376c8aa54c5d4eb8709b95f9cf68c4fa32f (patch) | |
| tree | 2a494a9047c9d7a366c0aba763d51b05ac8c9417 /examples/pre-commit | |
| parent | f2024c74cbb81e6f42cb878c803265e429711ddf (diff) | |
Remove prompting from example Git pre-commit hook.
Hooks now run with stdin closed (since Git version 1.5.4) and prompting
will not work when using a high-level interface such as git-gui or Emacs
anyway.
Diffstat (limited to 'examples/pre-commit')
| -rw-r--r-- | examples/pre-commit | 15 | 
1 files changed, 1 insertions, 14 deletions
| diff --git a/examples/pre-commit b/examples/pre-commit index e0e89dd..1b5d5c6 100644 --- a/examples/pre-commit +++ b/examples/pre-commit @@ -1,20 +1,7 @@  #!/bin/bash  #  # An example hook script to store metadata information using -# metastore on each commit. A verification message with a list -# of changes will first be shown and only if it is accepted will -# the commit proceed. - -echo "Going to commit the following metadata changes" >&2 -metastore -c -m >&2 -echo -n "Ok to commit? (y/n): " >&2 -read -n1 REPLY -echo "" - -if [ "$REPLY" != "y" ]; then -	echo "Aborted" >&2 -	exit 1 -fi +# metastore on each commit.  if ! metastore -s; then  	echo "Failed to execute metastore -s" >&2 | 
