'Return status of repository or file.
Without file argument: returns status of the repository:
:First column: working directory status (D: dirty / space)
:Second column: index status (I: index dirty / space)
:Third column: presence of untracked files (U: untracked files / space)
:None: repository clean
With file argument: returns status of this file. Output is
equivalent to the first two columns of ``git status --porcelain``
(except for merge statuses as they are not supported by libgit2).'

def status(self, path=None):

    if path:
        gitd = git_directory(self.directory)
        return get_file_status(directory=self.directory, dirstate_file=join(gitd, u'index'), file_path=path, ignore_file_name=u'.gitignore', get_func=self.do_status, create_watcher=self.create_watcher, extra_ignore_files=tuple((join(gitd, x) for x in (u'logs/HEAD', u'info/exclude'))))
    return self.do_status(self.directory, path)
