FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Commit.getDiff is backwards? · Issue #368 · nodegit/nodegit · GitHub

Repository navigation

Commit.getDiff is backwards? #368

Description

Using commit.getDiff in a recent project, and the diff I'm getting appears to be the reverse of what is expected. It would seem that this line...

return thisTree.diff(parentTree);

should in fact be

return parentTree(thisTree);

Mostly because, in my expectation, getDiff would give me the changes made in that commit from the previous, not the changes required to undo the commit.

Basically, I believe the current method is performing something like

git diff sha..parent

when I would expect

git diff parent..sha

Am I reading this right, or am I just going crazy? If I'm right, I can put in a PR to fix, I just wanted to make sure I'm understanding before I put in the change.

No activity

Activity on this issue will appear here.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL