- git status -s | grep "^?" > $MYTMP/needclean
- if [ -s $MYTMP/needclean ]
- then
- echo "The following files must be dealt with before commit:"
- cat $MYTMP/needclean
- echo "e.g. add them to .gitignore or remove with 'git clean -fdx'"
- status=1
+ if [ "$(git config user.signingkey)" = "" ]
+ then
+ echo "You need to set up a PGP signing key e.g.:"
+ echo " gpg --list-keys"
+ echo "and"
+ echo " git config user.signingkey SHORTID"
+ echo "or"
+ echo " git config --global user.signingkey SHORTID"
+ status=1
+ fi
+
+ git status -s | grep "^?" > $MYTMP/needclean
+ if [ -s $MYTMP/needclean ]
+ then
+ echo "The following files must be dealt with before commit:"
+ cat $MYTMP/needclean
+ echo "e.g. add them to .gitignore or remove with 'git clean -fdx'"
+ status=1
+ fi