Commit 18f91b7b authored by Lin Jen-Shin's avatar Lin Jen-Shin

Update wordings accordingly because:

It's not that it must be rebased, it could also be merged.
This also raises a question: Why we could only rebase on
GitLab, but not merge whenever merge should also be an option?

After this change, we could also not enforce a linear history
because we also allow merging.
parent 644e7c46
......@@ -268,7 +268,7 @@ class MergeRequest < ActiveRecord::Base
check_if_can_be_merged
can_be_merged? && !must_be_rebased?
can_be_merged? && !should_be_rebased?
end
def gitlab_merge_status
......@@ -612,7 +612,7 @@ class MergeRequest < ActiveRecord::Base
last_commit.sha) > 0
end
def must_be_rebased?
def should_be_rebased?
self.project.ff_merge_must_be_possible? && !ff_merge_possible?
end
......
......@@ -19,11 +19,11 @@
%strong Merge commit with semi-linear history
%br
%span.descr
A merge commit is created for every merge, but merging is only allowed if the branch has been rebased.
This way you get a history that reads linearly (as with fast-forward merges), with the addition of merge commits.
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible.
This way you could make sure that if this merge request would build, after merging to target branch it would also build.
%br
%span.descr
When the branch has not been rebased, the user is given the option to do so.
When fast-forward merge is not possible, the user is given the option to rebase.
.radio
= label_tag :project_merge_method_ff do
......@@ -31,10 +31,10 @@
%strong Fast-forward merge
%br
%span.descr
No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch has been rebased.
No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded.
%br
%span.descr
When the branch has not been rebased, the user is given the option to do so.
When fast-forward merge is not possible, the user is given the option to rebase.
.form-group
= f.label :merge_requests_template, class: 'label-light' do
......
......@@ -21,7 +21,7 @@
= render 'projects/merge_requests/widget/open/merge_when_build_succeeds'
- elsif !@merge_request.can_be_merged_by?(current_user)
= render 'projects/merge_requests/widget/open/not_allowed'
- elsif @merge_request.must_be_rebased?
- elsif @merge_request.should_be_rebased?
= render 'projects/merge_requests/widget/open/rebase'
- else
= render 'projects/merge_requests/widget/open/accept'
......
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