GitPython icon indicating copy to clipboard operation
GitPython copied to clipboard

Join `Pathlike` Object to Tree

Open George-Ogden opened this issue 1 month ago • 0 comments

This extends the Tree.join and Tree.__truediv__ API to allow a pathlike object. For example:

repo = Repo(my_local_repo)
interesting_filepath: Path = Path(folder) / file
blob = repo.tree() / interesting_filepath

This did not work before without explicitly converting the Path to a string, but works now.

George-Ogden avatar Dec 12 '25 21:12 George-Ogden