Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

How can I get a diff object of a triple dot diff? #1851

Unanswered
itamarsch asked this question in Q&A
Discussion options

I'm trying to compare the diffs between two branches for a git forge project and I tried using:

diff = repo.git.diff(f"{branch1}...{branch2}")

But the diff result is a string and I need a diff object.
Is there a way to create a diff object from this string?

You must be logged in to vote

Replies: 1 comment

Comment options

This just invokes the git command, without further processing.

In order to get diffs, the higher-level API is needed, but I am not sure if diffs can be specified using the a...b syntax. It's certainly worth to just try it in place where the documentation speaks about refs or revs.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.