{{ message }}
Commit 487a4fd
committed
Add a test for git.index.util.TemporaryFileSwap
This is a general test for TemporaryFileSwap, but by being
parametrized by the type of file_path, it reveals a regression
introduced in 9e86053 (gitpython-developers#1770). TemporaryFileSwap still works when
file_path is a string, but is now broken when it is a Path. That
worked before, and the type annotations document that it should
be able to work. This is at least a bug because TemporaryFileSwap
is public. (I am unsure whether, in practice, GitPython itself uses
it in a way that sometimes passes a Path object as file_path. But
code that uses GitPython may call it directly and pass Path.)1 parent 4023f28 commit 487a4fd
1 file changed
Lines changed: 24 additions & 1 deletion

0 commit comments