1

I'm working on a tool to find commits that only contain whitespaces changes using GitPython. In order to do so I need to see what a commit has changed from its parent.

The second answer to the question How to diff a commit with its parent? shows that I can see the differences between a commit and its parent using:

git diff 15dc8^!

What is the equivalent in gitpython?

I would be also happy to get the same information as with

git show $COMMIT

I'm new, I really hope my question follows all the community guidelines!

2
  • In the end I fixed my issue by using res = repo.git.show(sha) Commented Jun 21, 2017 at 15:55
  • You should post it as an answer an accept it Commented Sep 18, 2017 at 13:32

1 Answer 1

1

I fixed the issue by using

res = repo.git.show(sha)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.