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:
Joseph Hall 2013-05-16 18:01:38 -07:00
commit d7871015a6

View File

@ -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):