Closed
Description
When calling the iter_commits
method it throws an fatal: ambiguous argument error
in case the provided branch has the same name as a file.
Scenario:
> git branch -a
* test
> ls
test
python:
r = git.repo.Repo(".")
b = r.branches[0]
[c for c in r.iter_commits(r)]
'git rev-list test' returned with exit code 128
stderr: 'fatal: ambiguous argument 'test': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
As of git I would simply add --
, but what am I supposed to do in GitPython?