git-fire icon indicating copy to clipboard operation
git-fire copied to clipboard

Prevent gpg signing of commits (fixes #30)

Open tkw1536 opened this issue 8 years ago • 2 comments

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.

tkw1536 avatar Aug 27 '17 20:08 tkw1536

/cc @johnp this implements your suggestion

tkw1536 avatar Aug 27 '17 20:08 tkw1536

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.

tkw1536 avatar Aug 28 '17 13:08 tkw1536