code: def get_new_filename(diff_part):
      
      regexps = (
          # e.g. "+++ b/foo/bar"
          r'^\+\+\+ b/(.*)',
          # e.g. "+++ /dev/null"
          r'^\+\+\+ (.*)',
      )
      for regexp in regexps:
          r = re.compile(regexp, re.MULTILINE)
          match = r.search(diff_part)
          if match is not None:
              return match.groups()[0]
      raise MalformedGitDiff("No new filename in diff part found.  "
                             "Examined diff part: {}".format(diff_part))
docs: Returns the filename for the updated file in a diff part.