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

Sign up
Appearance settings

incorrect change_type #1561

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

image

image

shouldn't this be a A instead of a D as I am not deleting anything?

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

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).

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.

AltStyle によって変換されたページ (->オリジナル) /