# Path: sgit/util.py
# def get_setting(key, default=None):
#     return get_settings().get(key, default)


import re
import os
import logging
import sublime
from .util import get_setting
                status, filename = row[:2], row[3:]
                if status[0] == 'R':
                    lines.append("%s %s -> %s" % (status, rows[idx + 1], filename))
                    idx += 1
                else:
                    lines.append("%s %s" % (status, filename))
            idx += 1
        return lines

    def get_files_status(self, repo):
        untracked, unstaged, staged = [], [], []
        status = self.get_porcelain_status(repo)
        for l in status:
            state, filename = l[:2], l[3:]
            index, worktree = state
            if state in ('DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU'):
                logger.warning("unmerged WTF: %s, %s", state, filename)
            elif state == '??':
                untracked.append(('?', filename))
            elif state == '!!':
                continue
            else:
                if worktree != ' ':
                    unstaged.append((worktree, filename))
                if index != ' ':
                    staged.append((index, filename))
        return untracked, unstaged, staged

    def get_untracked_mode(self):
        # get untracked files mode

# Path: sgit/util.py
# def get_setting(key, default=None):
#     return get_settings().get(key, default)


# Path: sgit/helpers.py
import re
import os
import logging
import sublime
from .util import get_setting

                status, filename = row[:2], row[3:]
                if status[0] == 'R':
                    lines.append("%s %s -> %s" % (status, rows[idx + 1], filename))
                    idx += 1
                else:
                    lines.append("%s %s" % (status, filename))
            idx += 1
        return lines

    def get_files_status(self, repo):
        untracked, unstaged, staged = [], [], []
        status = self.get_porcelain_status(repo)
        for l in status:
            state, filename = l[:2], l[3:]
            index, worktree = state
            if state in ('DD', 'AU', 'UD', 'UA', 'DU', 'AA', 'UU'):
                logger.warning("unmerged WTF: %s, %s", state, filename)
            elif state == '??':
                untracked.append(('?', filename))
            elif state == '!!':
                continue
            else:
                if worktree != ' ':
                    unstaged.append((worktree, filename))
                if index != ' ':
                    staged.append((index, filename))
        return untracked, unstaged, staged

    def get_untracked_mode(self):
        # get untracked files mode

        setting = get_setting('git_status_untracked_files', 'all')