Commit de29d2ae authored by Lin Jen-Shin's avatar Lin Jen-Shin

Rename ee_merge_base to ee_fetch_base

This is more aligning with ce_fetch_base, which is the merge-base
between the forked branch and master.
parent f5c0e2d7
......@@ -8,7 +8,7 @@ git_version
base = find_compare_base
new_files_in_this_branch_not_at_the_ee_top_level =
run_git_command("diff #{base.ee_merge_base}...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2").lines.map(&:strip)
run_git_command("diff #{base.ee_fetch_base}...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2").lines.map(&:strip)
ee_specific_files_in_ce_master_not_at_the_ee_top_level =
run_git_command("diff #{base.ce_updated_base}..HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2").lines.map(&:strip)
......
......@@ -7,7 +7,7 @@ git_version
base = find_compare_base
current_numstat = updated_diff_numstat(base.ce_merge_base, base.ee_merge_base)
current_numstat = updated_diff_numstat(base.ce_merge_base, base.ee_fetch_base)
updated_numstat = updated_diff_numstat(base.ce_updated_base, 'HEAD')
offenses = updated_numstat.select do |file, updated_delta|
......
......@@ -14,7 +14,7 @@ module EESpecificCheck
'locale/gitlab.pot'
].freeze
CompareBase = Struct.new(:ce_merge_base, :ee_merge_base, :ce_updated_base)
CompareBase = Struct.new(:ce_merge_base, :ee_fetch_base, :ce_updated_base)
module_function
......@@ -39,7 +39,7 @@ module EESpecificCheck
ce_fetch_head = fetch_remote_ce_branch
ce_fetch_base = run_git_command("merge-base canonical-ce/master #{ce_fetch_head}")
ce_merge_base = run_git_command("merge-base canonical-ce/master canonical-ee/master")
ee_merge_base = run_git_command("merge-base canonical-ee/master HEAD")
ee_fetch_base = run_git_command("merge-base canonical-ee/master HEAD")
ce_updated_base =
if ce_fetch_head.start_with?('canonical-ce') || # No specific CE branch
......@@ -50,7 +50,7 @@ module EESpecificCheck
ce_fetch_head, ce_fetch_base, ce_merge_base)
end
CompareBase.new(ce_merge_base, ee_merge_base, ce_updated_base)
CompareBase.new(ce_merge_base, ee_fetch_base, ce_updated_base)
end
def setup_canonical_remotes
......@@ -90,7 +90,7 @@ module EESpecificCheck
# o -> o -> ! -> x CE master
# v (ce_merge_base)
# o -> o -> o -> x EE master
# \ (ee_merge_base)
# \ (ee_fetch_base)
# v-> o EE branch
#
# We want to rebase above into this: (we only change the connection)
......@@ -100,7 +100,7 @@ module EESpecificCheck
# o -> o -> ! -> x CE master
# v (ce_merge_base)
# o -> o -> o -> x EE master
# \ (ee_merge_base)
# \ (ee_fetch_base)
# v-> o EE branch
#
# Therefore we rebase onto ce_merge_base, which is based off CE master,
......@@ -109,8 +109,8 @@ module EESpecificCheck
# merged into EE yet, therefore won't be available in the EE branch.
#
# After rebase is done, then we could compare against
# ce_merge_base..ee_merge_base along with ce_fetch_head..HEAD (EE branch)
# where ce_merge_base..ee_merge_base is the update-to-date
# ce_merge_base..ee_fetch_base along with ce_fetch_head..HEAD (EE branch)
# where ce_merge_base..ee_fetch_base is the update-to-date
# CE/EE difference and ce_fetch_head..HEAD is the changes we made in
# CE and EE branches.
run_git_command("rebase --onto #{ce_merge_base} #{ce_fetch_base}~1 #{ce_fetch_head}")
......
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