'Reads git repository settings and sets several methods
so that they refer to the git module.  This object
encapsulates cola\'s interaction with git.'

def __init__(self, cwd=None):

    Observable.__init__(self)
    self.git = git.current()
    self.initialized = False
    self.head = u'HEAD'
    self.diff_text = u''
    self.mode = self.mode_none
    self.filename = None
    self.is_merging = False
    self.is_rebasing = False
    self.currentbranch = u''
    self.directory = u''
    self.project = u''
    self.remotes = []
    self.filter_paths = None
    self.commitmsg = u''
    self._auto_commitmsg = u''
    self._prev_commitmsg = u''
    self.modified = []
    self.staged = []
    self.untracked = []
    self.unmerged = []
    self.upstream_changed = []
    self.staged_deleted = set()
    self.unstaged_deleted = set()
    self.submodules = set()
    self.local_branches = []
    self.remote_branches = []
    self.tags = []
    if cwd:
        self.set_worktree(cwd)
