# just hide the details of the 'git ls-files' command we use
raise GitException, \
'Some of the given paths are either missing or not known to GIT'
+ return list(fileset)
+ def parse_git_ls(output):
+ t = None
+ for line in output.split('\0'):
+ if not line:
+ # There's a zero byte at the end of the output, which
+ # gives us an empty string as the last "line".
+ continue
+ if t == None:
+ mode_a, mode_b, sha1_a, sha1_b, t = line.split(' ')
+ else:
+ yield (t, line)
+ t = None
+
def tree_status(files = None, tree_id = 'HEAD', unknown = False,
noexclude = True, verbose = False, diff_flags = []):
"""Get the status of all changed files, or of a selected set of