Skip to content

incorrect change_type #1561

Answered by Byron
grumpyp asked this question in Q&A
Discussion options

You must be logged in to vote

Which way around is right has always been troublesome for me as diff doesn't convey the direction into which the diff should go, at least not without prior training.

In gitoxide, I use tree.(get_)changes_to_obtain(other_tree) which makes clear what needs to be done to turn tree into other_tree. Without the notion of direction, things can look reversed pretty quickly.

Changing anything in GitPython would be a breaking change and thus can't be done, but either one can add new names to make direction clear, or code has to be adjusted to be target.diff(index).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
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
Converted from issue

This discussion was converted from issue #1560 on March 10, 2023 07:00.