Skip to content

Get patch text from Commit class like (commit.stats) #1413

Description

@dduraipandian

Current we can get status for the commit (comparing parent). But can't get patch text.

I would like to have commit.patch to get patch text. Result will be similar to git diff shell command.

git diff <c1> <c2>
all_commits = repo.iter_commits('master')
for commit in all_commits:
    print(commit.stats)

If the community is okay with this addition, i can work on this and raise a PR.

Thanks in advance,
Durai Pandian

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions