@staticmethod
    def splitoutputofgitstatusz(lines, filterprefix=None):
        """
        Split the output of 'git status -z' into single files

        :param lines: the unstripped output line(s) from the command
        :param filterprefix: if given, only the files of those entries matching the prefix will be returned
        :return: a list of repository files with status changes
        """
        repositoryfiles = []
        for line in lines:                           # expect exactly one line
            entries = line.split(sep='\x00')         # ascii 0 is the delimiter
            for entry in entries:
                if len(entry) > 0:
                    if not filterprefix or entry.startswith(filterprefix):
                        start = entry.find(' ')
                        if 0 <= 2 <= start:
                            repositoryfile = entry[3:]   # output is formatted
                        else:
                            repositoryfile = entry       # file on a single line (e.g. rename continuation)
                        repositoryfiles.append(repositoryfile)
        return repositoryfiles
dataset/ETHPy150Open rtcTo/rtc2git/gitFunctions.py/Commiter.splitoutputofgitstatusz/swapped operands of `<=`