# Path: vilya/libs/diff.py
# class Diff(object):
# 
#     def __init__(self, diff):
#         self.diff = diff
# 
#     def __len__(self):
#         return len(self.diff)
# 
#     def __iter__(self):
#         for p in self.diff:
#             yield Patch(p)
# 
#     @cached_property
#     def additions(self):
#         additions = 0
#         for p in self.patches:
#             additions += p.additions
#         return additions
# 
#     @cached_property
#     def deletions(self):
#         deletions = 0
#         for p in self.patches:
#             deletions += p.deletions
#         return deletions
# 
#     @property
#     def patches(self):
#         for p in self.diff:
#             yield Patch(p)
# 
#     @property
#     def deltas(self):
#         return iter(self.diff)


from ellen.repository import Repository as _Repository
from .diff import Diff
# -*- coding: utf-8 -*-


PULL_REF_H = 'refs/pulls/%s/head'
PULL_REF_M = 'refs/pulls/%s/merge'


class Repository(object):

    def __init__(self, path):
        self.path = path
        self.repository = _Repository(path)

    @property
    def is_empty(self):
        return self.repository.is_empty

    @property

# Path: vilya/libs/diff.py
# class Diff(object):
# 
#     def __init__(self, diff):
#         self.diff = diff
# 
#     def __len__(self):
#         return len(self.diff)
# 
#     def __iter__(self):
#         for p in self.diff:
#             yield Patch(p)
# 
#     @cached_property
#     def additions(self):
#         additions = 0
#         for p in self.patches:
#             additions += p.additions
#         return additions
# 
#     @cached_property
#     def deletions(self):
#         deletions = 0
#         for p in self.patches:
#             deletions += p.deletions
#         return deletions
# 
#     @property
#     def patches(self):
#         for p in self.diff:
#             yield Patch(p)
# 
#     @property
#     def deltas(self):
#         return iter(self.diff)


# Path: vilya/libs/git.py
from ellen.repository import Repository as _Repository
from .diff import Diff

# -*- coding: utf-8 -*-


PULL_REF_H = 'refs/pulls/%s/head'
PULL_REF_M = 'refs/pulls/%s/merge'


class Repository(object):

    def __init__(self, path):
        self.path = path
        self.repository = _Repository(path)

    @property
    def is_empty(self):
        return self.repository.is_empty

    @property

    def head(self):