Skip to content

Add support for 'C'-type diffs #945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Satisfying flake8
  • Loading branch information
thetwoj committed Oct 18, 2019
commit a6e133c76220f5a4e546f99f38e7aabb22e35d13
4 changes: 2 additions & 2 deletions git/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Diff(object):
NULL_BIN_SHA = b"\0" * 20

__slots__ = ("a_blob", "b_blob", "a_mode", "b_mode", "a_rawpath", "b_rawpath",
"new_file", "deleted_file", "copied_file", "raw_rename_from",
"new_file", "deleted_file", "copied_file", "raw_rename_from",
"raw_rename_to", "diff", "change_type", "score")

def __init__(self, repo, a_rawpath, b_rawpath, a_blob_id, b_blob_id, a_mode,
Expand Down Expand Up @@ -432,7 +432,7 @@ def _index_from_patch_format(cls, repo, proc):
a_path, b_path = header.groups()

new_file, deleted_file, copied_file = \
bool(new_file_mode), bool(deleted_file_mode), bool(copied_file_name)
bool(new_file_mode), bool(deleted_file_mode), bool(copied_file_name)

a_path = cls._pick_best_path(a_path, rename_from, a_path_fallback)
b_path = cls._pick_best_path(b_path, rename_to, b_path_fallback)
Expand Down