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
when I would expect
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.
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...
should in fact be
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
when I would expect
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.