Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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])))
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')
def git_status(args):
if len(args) == 0:
repo = _get_repo()
status = porcelain.status(repo.repo)
print status
else:
print command_help['git_staged']
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])))
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']
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
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