refactoring the assertion that git has no pending changes