commit d0b08f642ab2e59e63043f9df1029c927679ad2a from: Dan Villiom Podlaski Christiansen date: Fri Jun 10 17:40:40 2022 UTC Add a failing test that shows that Dulwich cannot push to itself commit - 4af5055095e5a61e781fe44c8d2efb497b3cc130 commit + d0b08f642ab2e59e63043f9df1029c927679ad2a blob - bb294223e62ffeb4c3b83ba0ea35a4e8df522ebb blob + 6ed9cac2c3b9e595b3eba070fd0ccef979c56148 --- dulwich/tests/test_porcelain.py +++ dulwich/tests/test_porcelain.py @@ -50,7 +50,9 @@ from dulwich.repo import ( NoIndexPresent, Repo, ) -from dulwich import server +from dulwich.server import ( + DictBackend, +) from dulwich.tests import ( TestCase, ) @@ -2906,3 +2908,10 @@ class ServerTests(PorcelainTestCase): with self._serving() as url: porcelain.pull(self.repo, url, "master") + + def test_push(self): + c1, = build_commit_graph(self.repo.object_store, [[1]]) + self.repo.refs[b"refs/heads/master"] = c1.id + + with self._serving() as url: + porcelain.push(self.repo, url, "master")