See https://github.com/dulwich/dulwich/commit/24986435b81e39ab596be1e3afba418cc20444b2
mentioned in merge request !42 (closed)