def test_errors_when_remote_has_changes(self):
with git_bare_repo() as bare_repo:
with git_repo() as repo:
touch('README.md')
repo.index.add(['README.md'])
repo.index.commit('Initial commit')
repo.create_remote('origin', url=bare_repo)
repo.remotes.origin.push(repo.refs.master)
with temp_directory() as path:
clone = Repo(bare_repo).clone(path)
touch('CHANGELOG.md')
clone.index.add(['README.md'])
clone.index.commit('Second commit')
clone.remotes.origin.push(clone.refs.master)
with self.assertRaises(Exception):
GitReleaser()
评论列表
文章目录