fix for double-check git release logic

Here's a PR with my suggested change.

As for testing, all I can say is "it works in my environment".