def modified_lines(filename, extra_data, commit=None):
if extra_data is None:<EOL><INDENT>return []<EOL><DEDENT>if extra_data not in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>return None<EOL><DEDENT>if commit is None:<EOL><INDENT>commit = '<STR_LIT:0>' * <NUM_LIT><EOL><DEDENT>commit = commit.encode('<STR_LIT:utf-8>')<EOL>blame_lines = subprocess.check_output(<EOL>['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', filename]).split(<EOL>os.linesep.encode('<STR_LIT:utf-8>'))<EOL>modified_line_numbers = utils.filter_lines(<EOL>blame_lines, commit + br'<STR_LIT>', groups=('<STR_LIT>', ))<EOL>return list(map(int, modified_line_numbers))<EOL>
Returns the lines that have been modifed for this file.

    Args:
      filename: the file to check.
      extra_data: is the extra_data returned by modified_files. Additionally, a
        value of None means that the file was not modified.
      commit: the complete sha1 (40 chars) of the commit. Note that specifying
        this value will only work (100%) when commit == last_commit (with
        respect to the currently checked out revision), otherwise, we could miss
        some lines.

    Returns: a list of lines that were modified, or None in case all lines are
      new.