How can i set create_patch=true, and meanwhile get change_type in Diff #1898
Answered
by
topp
SongXueZhi
asked this question in
Q&A
-
I find that when i use commit1.diff(commit2,create_patch = true), chang_type of Diff is aways none. if create_patch = False, i kown that i can get chang_type of Diff , but I can get hunk text. Can i get Diff text ,and meanWhile get chang_type of Diff? |
Beta Was this translation helpful? Give feedback.
Answered by
topp
Apr 15, 2024
Replies: 1 comment 1 reply
-
+1 For getting change_type also set on diff item when create_patch=True. @SongXueZhi Approach depends on your intention for further processing, but you can certainly retrieve the change type info even from a Diff generated with create_patch=True:
Usage Example:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
SongXueZhi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 For getting change_type also set on diff item when create_patch=True.
@SongXueZhi Approach depends on your intention for further processing, but you can certainly retrieve the change type info even from a Diff generated with create_patch=True:
Usage Example: