def parse_diff(output):
  """Return a set containing the various diff bits, broken up by file."""

  diff_set = []
  current_diff = []
  for line in output:
    if line.startswith('Index: ') and current_diff:
      diff_set.append(current_diff)
      current_diff = []
    current_diff.append(line)
  diff_set.append(current_diff)

  return diff_set