GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — How can I get a diff object of a triple dot diff? · gitpython-developers/GitPython · Discussion #1851

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

Unanswered
itamarsch asked this question in Q&A
How can I get a diff object of a triple dot diff? #1851
@itamarsch itamarsch
Feb 29, 2024 · 1 comment
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

itamarsch
Feb 29, 2024

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
All reactions

Replies: 1 comment

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

Byron
Feb 29, 2024
Maintainer

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
All reactions
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
@itamarsch @Byron
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.