How to use the dulwich.porcelain.status function in dulwich

To help you get started, we’ve selected a few dulwich examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github khilnani / pythonista-scripts / thirdparty / GitHub Tools / gitview / gitui.py View on Github external
def refresh_thread():
             if self.g:
                self.list[0]=list(self.g.untracked_files)
                #self.view['tableview1'].reload()
                self.list[1]=porcelain.status(self.g.path).unstaged
                #self.view['tableview1'].reload()
                self.list[2]=porcelain.status(self.g.path).staged['add']
                #self.view['tableview1'].reload()
                self.list[3]=porcelain.status(self.g.path).staged['delete']
                #self.view['tableview1'].reload()
                self.list[4]=porcelain.status(self.g.path).staged['modify']
                #self.view['tableview1'].reload()
                self.list[5]=list(self.g.tracked_files-set(itertools.chain(*self.list[1:4])))
github ywangd / stash / bin / git.py View on Github external
def _confirm_dangerous():
    repo = _get_repo()
    status = porcelain.status(repo.path)
    if any(status.staged.values() + status.unstaged):
        force = input(
            'WARNING: there are uncommitted modified files and/or staged changes. These could be overwritten by this command. Continue anyway? [y/n] '
        )
        if not force == 'y':
            raise Exception('User cancelled dangerous operation')
github briarfox / ShellistaExt / ShellistaExt / plugins / extensions / git / git_plugin.py View on Github external
def git_status(args):
        if len(args) == 0:
            repo = _get_repo()
            status = porcelain.status(repo.repo)
            print status
        else:
            print command_help['git_staged']
github khilnani / pythonista-scripts / thirdparty / GitHub Tools / gitview / gitui.py View on Github external
def refresh_thread():
             if self.g:
                self.list[0]=list(self.g.untracked_files)
                #self.view['tableview1'].reload()
                self.list[1]=porcelain.status(self.g.path).unstaged
                #self.view['tableview1'].reload()
                self.list[2]=porcelain.status(self.g.path).staged['add']
                #self.view['tableview1'].reload()
                self.list[3]=porcelain.status(self.g.path).staged['delete']
                #self.view['tableview1'].reload()
                self.list[4]=porcelain.status(self.g.path).staged['modify']
                #self.view['tableview1'].reload()
                self.list[5]=list(self.g.tracked_files-set(itertools.chain(*self.list[1:4])))
github khilnani / pythonista-scripts / thirdparty / GitHub Tools / gitview / gitui.py View on Github external
def git_status(self,args):
        if len(args) == 0:
            repo = _get_repo()
            status = porcelain.status(repo.repo)
            print status
        else:
            print command_help['git_staged']
github khilnani / pythonista-scripts / thirdparty / GitHub Tools / gitview / gitui.py View on Github external
def has_uncommitted_changes(self):
        if(porcelain.status(self.g.path).unstaged or
            porcelain.status(self.g.path).staged['add'] or 
            porcelain.status(self.g.path).staged['modify'] or
            porcelain.status(self.g.path).staged['delete']):
                return True
github jsbain / gitview / gitui.py View on Github external
def has_uncommitted_changes(self):
        if(porcelain.status(self.g.path).unstaged or
            porcelain.status(self.g.path).staged['add'] or 
            porcelain.status(self.g.path).staged['modify'] or
            porcelain.status(self.g.path).staged['delete']):
                return True