Prevent gpg signing of commits (fixes #30)
When using git 2.x and the commit.gpgsign option is enabled, each commit is automatically signed with gpg. As noted in #30 this usually means that the user has to enter a password, or unlock the gpg key using some other method. This is a problem when having to leave the building because of fire.
This commit solves the problem by adding the --no-gpg-sign flag to the git commit invocation if the git version being used starts with a "2". This is achieved by checking the output of git version and using grep to match the version number.
/cc @johnp this implements your suggestion
I have updated the pull request after a comment from @glensc. I am no longer using a sub-shell to check the git version, and am also silencing output from the version check.