Skip to content

Navigation Menu

Sign in
Appearance settings

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

Commit.getDiff is backwards? #368

Copy link
Copy link
@orderedlist

Description

@orderedlist
Issue body actions

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.

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.