Fix failed History.txt update
Raise immediately if a git revision is missing

Previously RubyGems would continue to try to determine the git hash for
a reference even if it did not exist.  This would cause RubyGems to
spew git errors on the console but continue to install and create a bad
lockfile.

Now RubyGems raises immediately if it cannot find a hash for a
revision.

Fixes #1031
Set issue type properly