

def __init__(self, repo, a_path, b_path, a_commit, b_commit, a_mode, b_mode, new_file, deleted_file, rename_from, rename_to, diff):
    self.repo = repo
    self.a_path = a_path
    self.b_path = b_path
    if ((not a_commit) or re.search('^0{40}$', a_commit)):
        self.a_commit = None
    else:
        self.a_commit = commit.Commit(repo, id=a_commit)
    if ((not b_commit) or re.search('^0{40}$', b_commit)):
        self.b_commit = None
    else:
        self.b_commit = commit.Commit(repo, id=b_commit)
    self.a_mode = a_mode
    self.b_mode = b_mode
    self.new_file = new_file
    self.deleted_file = deleted_file
    self.rename_from = rename_from
    self.rename_to = rename_to
    self.renamed = (rename_from != rename_to)
    self.diff = diff

dataset/ETHPy150Open kergoth/git-origin/git-python/lib/git/diff.py Diff.__init__/original