Merge pull request #978 from nulltoken/fix/reset-hard reset: prevent hard reset in a bare repository