-
-
Notifications
You must be signed in to change notification settings - Fork 954
Is there a way to get tripple dot diff? #1406
Answered
by
Byron
nasifimtiazohi
asked this question in
Q&A
-
I am getting the diff between two commits using gitpython
in below way:
def get_inbetween_commit_diff(repo_path, commit_a, commit_b):
repo = Repo(repo_path)
uni_diff_text = repo.git.diff(
"{}".format(commit_a), "{}".format(commit_b), ignore_blank_lines=True, ignore_space_at_eol=True
)
return uni_diff_text
However, the default repo.git.diff
shows the diff with double dot. Is there a way to achieve triple dot diff using gitpython
?
Reference on double dot and triple dot diff: https://matthew-brett.github.io/pydagogue/git_diff_dots.html
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
Byron
Jan 30, 2022
Maybe this works?
repo.git.diff("{}...{}".format(commit_a, commit_b), ignore_blank_lines=True, ignore_space_at_eol=True)
Replies: 1 comment 1 reply
-
Maybe this works?
repo.git.diff("{}...{}".format(commit_a, commit_b), ignore_blank_lines=True, ignore_space_at_eol=True)
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
yes thanks.
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
Byron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment