tools/git/for-all-touched-files.py
def ForAllTouchedFiles(branch_name, extensions, token, command):
  """For each new or modified file output by [git diff branch_name],
  run command with token replaced with the filename. If extensions is
  not empty, do this only for files with one of the extensions in that
  list.
  """
  filenames = FilenamesFromGit(branch_name, extensions)
  for filename in filenames:
    os.system(command.replace(token, filename))
For each new or modified file output by [git diff branch_name],
  run command with token replaced with the filename. If extensions is
  not empty, do this only for files with one of the extensions in that
  list.
  
For each new or modified file output by [git diff branch_name],
run command with token replaced with the filename. If extensions is
not empty, do this only for files with one of the extensions in that
list.
For each new or modified file output by [ git diff branch_name ] run command with token replaced with the filename . If extensions is not empty do this only for files with one of the extensions in that list .
def ForAllTouchedFiles(branch_name, extensions, token, command):
  filenames = FilenamesFromGit(branch_name, extensions)
  for filename in filenames:
    os.system(command.replace(token, filename))
def ForAllTouchedFiles ( branch_name , extensions , token , command ) : filenames = FilenamesFromGit ( branch_name , extensions ) for filename in filenames : os . system ( command . replace ( token , filename ) )
For each new or modified file output by [git diff branch_name],
run command with token replaced with the filename.
For each new or modified file output by [ git diff branch_name ] run command with token replaced with the filename .
"""For each new or modified file output by [git diff branch_name],
  run command with token replaced with the filename. If extensions is
  not empty, do this only for files with one of the extensions in that
  list.
  """
branch_name
extensions
token
command