[pitivi] Make the pre-commit optional and let the user know about it



commit baa6c3f465a5467ca68194de69348c3b4c56e0b1
Author: Thibault Saunier <tsaunier gnome org>
Date:   Thu Apr 7 14:41:26 2016 +0200

    Make the pre-commit optional and let the user know about it

 autogen.sh |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 13a9fa9..3ddf2e0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -46,20 +46,6 @@ autoheader_check || DIE=1
 
 die_check $DIE
 
-# install pre-commit hook for doing clean commits
-rm -f .git/hooks/pre-commit
-ln -s ../../pre-commit.hook .git/hooks/pre-commit
-
-which pre-commit
-PRE_COMMIT=$?
-if ((PRE_COMMIT != 0)); then
-  echo "Please install pre-commit from http://pre-commit.com/ and try again"
-  exit 1
-else
-  pre-commit install
-fi
-
-
 # if no arguments specified then this will be printed
 if test -z "$*"; then
   echo "+ checking for autogen.sh options"
@@ -105,3 +91,16 @@ echo
         echo "  configure failed"
         exit 1
 }
+
+# install pre-commit hook for doing clean commits
+rm -f .git/hooks/pre-commit
+ln -s ../../pre-commit.hook .git/hooks/pre-commit
+which pre-commit > /dev/null
+PRE_COMMIT=$?
+echo ""
+if ((PRE_COMMIT != 0)); then
+  echo "Please install pre-commit from http://pre-commit.com/ before proposing patches"
+  echo ""
+else
+  pre-commit install
+fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]