Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_changes_per_file_in(git_diff):
files_with_changes = {}
file_name = None
for line in git_diff.split("\n"):
# read ahead until we note the diff for a file:
new_file = maybe_new_module(line)
if new_file:
file_name=new_file
# one we have the diff of a file, accumulate the changes:
if file_name:
change = changed_line(line)
proximity.record_change_to(file_name, change,files_with_changes)
return files_with_changes