Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tooling/bin/find_change_diffs')
-rwxr-xr-xtooling/bin/find_change_diffs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tooling/bin/find_change_diffs b/tooling/bin/find_change_diffs
index 7857945ea74..b28b20df0f4 100755
--- a/tooling/bin/find_change_diffs
+++ b/tooling/bin/find_change_diffs
@@ -33,6 +33,8 @@ end
Gitlab.merge_request_changes(mr_project_path, mr_iid).changes.each do |change|
next if change['diff'].empty?
- output_diffs_dir.join(File.dirname(change['new_path'])).mkpath
- output_diffs_dir.join("#{change['new_path']}.diff").write(change['diff'])
+ ext = change['deleted_file'] ? ".deleted.diff" : ".diff"
+ new_path = output_diffs_dir.join("#{change['new_path']}#{ext}")
+ new_path.dirname.mkpath
+ new_path.write(change['diff'])
end