def build_files_status(self, repo):
        # get status
        status = ""
        untracked, unstaged, staged = self.get_files_status(repo)

        if not untracked and not unstaged and not staged:
            status += GIT_WORKING_DIR_CLEAN + "\n"

        # untracked files
        if untracked:
            status += SECTIONS[UNTRACKED_FILES]
            for s, f in untracked:
                status += "\t%s\n" % f.strip()
            status += "\n"

        # unstaged changes
        if unstaged:
            status += SECTIONS[UNSTAGED_CHANGES] if staged else SECTIONS[CHANGES]
            for s, f in unstaged:
                status += "\t%s %s\n" % (STATUS_LABELS[s], f)
            status += "\n"

        # staged changes
        if staged:
            status += SECTIONS[STAGED_CHANGES]
            for s, f in staged:
                status += "\t%s %s\n" % (STATUS_LABELS[s], f)
            status += "\n"

        return status
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/status.py/GitStatusBuilder.build_files_status/original