You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possiable to passing args like refs/tags/TAG01 ..HEAD --no-merges to filter the out put commit ?
repo = Repo(path)
for commit in repo.iter_commits(rev='refs/tags/TAG1.0..HEAD --no-merges'))
print(commit)
the error show like this
File "/home/ubuntu/.local/lib/python3.8/site-packages/git/objects/commit.py", line 277, in _iter_from_process_or_stream
finalize_process(proc_or_stream)
File "/home/ubuntu/.local/lib/python3.8/site-packages/git/util.py", line 329, in finalize_process
proc.wait(**kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/git/cmd.py", line 408, in wait
raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git rev-list refs/tags/TAG01..HEAD --no-merges --
stderr: 'fatal: bad revision 'refs/tags/TAG01..HEAD --no-merges'
the cmd git rev-list refs/tags/TAG01..HEAD --no-merges -- seems work fine in cmdline run
Activity
Byron commentedon Dec 29, 2020
I think what you are trying to do might work with the help of the docs on 'how to use git directly' along with the API docs on iter_commits().
With that, you should be able to figure out which options to pass to
git rev-listaskwargsofiter_commits(…)to get the desired result.Even though I close this issue, feel free to post follow ups in the comments.