Commit cd78e020 authored by Rémy Coutable's avatar Rémy Coutable

Ensure we sanitize branch names with path-unfriendly characters

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent b8980e89
...@@ -149,7 +149,7 @@ module Gitlab ...@@ -149,7 +149,7 @@ module Gitlab
end end
def ce_patch_name def ce_patch_name
@ce_patch_name ||= "#{ce_branch}.patch" @ce_patch_name ||= patch_name_from_branch(ce_branch)
end end
def ce_patch_full_path def ce_patch_full_path
...@@ -161,13 +161,17 @@ module Gitlab ...@@ -161,13 +161,17 @@ module Gitlab
end end
def ee_patch_name def ee_patch_name
@ee_patch_name ||= "#{ee_branch}.patch" @ee_patch_name ||= patch_name_from_branch(ee_branch)
end end
def ee_patch_full_path def ee_patch_full_path
@ee_patch_full_path ||= patches_dir.join(ee_patch_name) @ee_patch_full_path ||= patches_dir.join(ee_patch_name)
end end
def patch_name_from_branch(branch_name)
branch_name.parameterize << '.patch'
end
def step(desc, cmd = nil) def step(desc, cmd = nil)
puts "\n=> #{desc}\n" puts "\n=> #{desc}\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment