Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dduraipandian opened this issue Feb 25, 2022 · 1 comment
Open

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

dduraipandian opened this issue Feb 25, 2022 · 1 comment

Comments

@dduraipandian
Copy link

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

@dduraipandian dduraipandian changed the title Get patch text under stats from Commit class Get patch text from Commit class like (commit.stats) Feb 25, 2022
@Byron
Copy link
Member

Byron commented Feb 25, 2022

That sounds like something useful worth having.
Please feel free to sketch an implementation in a draft PR for early feedback.

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

No branches or pull requests

2 participants