Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dea589d6
Commit
dea589d6
authored
Jan 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer leading dots over trailing dots
parent
a30f278b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+2
-2
app/services/commits/change_service.rb
app/services/commits/change_service.rb
+2
-2
No files found.
app/models/merge_request_diff.rb
View file @
dea589d6
...
@@ -169,8 +169,8 @@ class MergeRequestDiff < ActiveRecord::Base
...
@@ -169,8 +169,8 @@ class MergeRequestDiff < ActiveRecord::Base
# When compare merge request versions we want diff A..B instead of A...B
# When compare merge request versions we want diff A..B instead of A...B
# so we handle cases when user does squash and rebase of the commits between versions.
# so we handle cases when user does squash and rebase of the commits between versions.
# For this reason we set straight to true by default.
# For this reason we set straight to true by default.
CompareService
.
new
(
project
,
head_commit_sha
)
.
CompareService
.
new
(
project
,
head_commit_sha
)
execute
(
project
,
sha
,
straight:
straight
)
.
execute
(
project
,
sha
,
straight:
straight
)
end
end
def
commits_count
def
commits_count
...
...
app/services/commits/change_service.rb
View file @
dea589d6
...
@@ -70,8 +70,8 @@ module Commits
...
@@ -70,8 +70,8 @@ module Commits
# Temporary branch exists and contains the change commit
# Temporary branch exists and contains the change commit
return
if
repository
.
find_branch
(
new_branch
)
return
if
repository
.
find_branch
(
new_branch
)
result
=
ValidateNewBranchService
.
new
(
@project
,
current_user
)
.
result
=
ValidateNewBranchService
.
new
(
@project
,
current_user
)
execute
(
new_branch
)
.
execute
(
new_branch
)
if
result
[
:status
]
==
:error
if
result
[
:status
]
==
:error
raise
ChangeError
,
"There was an error creating the source branch:
#{
result
[
:message
]
}
"
raise
ChangeError
,
"There was an error creating the source branch:
#{
result
[
:message
]
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment