mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #5076 from hulu/git-status-shadowing
git mod: status -> state_by_file, to avoid shadowing same-named func
This commit is contained in:
commit
d7871015a6
@ -450,13 +450,13 @@ def status(cwd, user=None):
|
||||
'''
|
||||
cmd = 'git status -z --porcelain'
|
||||
stdout = _git_run(cmd, cwd=cwd, runas=user)
|
||||
status = []
|
||||
state_by_file = []
|
||||
for line in stdout.split("\0"):
|
||||
state = line[:2]
|
||||
filename = line[3:]
|
||||
if filename != '' and state != '':
|
||||
status.append((state, filename))
|
||||
return status
|
||||
state_by_file.append((state, filename))
|
||||
return state_by_file
|
||||
|
||||
|
||||
def add(cwd, file_name, user=None, opts=None):
|
||||
|
Loading…
Reference in New Issue
Block a user