+ def test_force_fetch_after_amend(self) -> None:
+ git_cache.fetch(self.upstream, 'master')
+ _git(self.upstream, 'commit', '--amend', '-m', 'Amended')
+ git_cache.fetch(self.upstream, 'master', force=True)
+
+ def test_force_ensure_after_amend(self) -> None:
+ git_cache.fetch(self.upstream, 'master')
+ _git(self.upstream, 'commit', '--amend', '-m', 'Amended')
+ rev = _git(self.upstream, 'log', '--format=%H', '-n1').strip().decode()
+ git_cache.ensure_rev_available(
+ self.upstream, 'master', rev, force=True)
+
+ def test_force_fetch_after_amend_and_cache_delete(self) -> None:
+ d, _ = git_cache.fetch(self.upstream, 'master')
+ shutil.rmtree(d)
+ _git(self.upstream, 'commit', '--amend', '-m', 'Amended')
+ git_cache.fetch(self.upstream, 'master', force=True)
+
+ def test_force_ensure_after_amend_and_cache_delete(self) -> None:
+ d, _ = git_cache.fetch(self.upstream, 'master')
+ shutil.rmtree(d)
+ _git(self.upstream, 'commit', '--amend', '-m', 'Amended')
+ rev = _git(self.upstream, 'log', '--format=%H', '-n1').strip().decode()
+ git_cache.ensure_rev_available(
+ self.upstream, 'master', rev, force=True)
+