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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
8ca9bf1d
Commit
8ca9bf1d
authored
Mar 01, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix variable name and change copy
parent
80543e0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/services/files/base_service.rb
app/services/files/base_service.rb
+1
-1
app/services/git_operation_service.rb
app/services/git_operation_service.rb
+2
-2
No files found.
app/services/files/base_service.rb
View file @
8ca9bf1d
...
...
@@ -63,7 +63,7 @@ module Files
end
if
!
project
.
empty_repo?
&&
different_branch?
&&
repository
.
branch_exists?
(
@branch_name
)
raise
ValidationError
,
'Branch with such name already exists. You need to switch to this branch in order to make changes'
raise
ValidationError
,
"A branch called
#{
@branch_name
}
already exists. Switch to that branch in order to make changes"
end
end
...
...
app/services/git_operation_service.rb
View file @
8ca9bf1d
...
...
@@ -56,7 +56,7 @@ class GitOperationService
start_project:
repository
.
project
,
&
block
)
start_branch
||=
branch_name
start_branch
_name
||=
branch_name
verify_start_branch_exists!
(
start_project
.
repository
,
start_branch_name
)
...
...
@@ -154,7 +154,7 @@ class GitOperationService
def
verify_start_branch_exists!
(
start_repository
,
start_branch_name
)
return
if
start_repository
.
empty_repo?
return
if
start_repository
.
branch_exists?
(
start_branch_name
)
raise
ArgumentError
,
"Cannot find branch
#{
start_branch_name
}
in
#{
start_repository
.
path_with_namespace
}
"
end
end
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