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
971b67ce
Commit
971b67ce
authored
Aug 29, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix transfer project redirect loop
parent
d5632b6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
app/services/projects/transfer_service.rb
app/services/projects/transfer_service.rb
+3
-2
No files found.
app/services/projects/transfer_service.rb
View file @
971b67ce
...
...
@@ -43,8 +43,8 @@ module Projects
@new_path
=
File
.
join
(
@new_namespace
.
try
(
:full_path
)
||
''
,
project
.
path
)
@old_namespace
=
project
.
namespace
if
Project
.
where
(
path:
project
.
path
,
namespace_id:
@new_namespace
.
try
(
:id
)
).
exists?
raise
TransferError
.
new
(
"Project with same path in target namespace already exists"
)
if
Project
.
where
(
namespace_id:
@new_namespace
.
try
(
:id
)).
where
(
'path = ? or name = ?'
,
project
.
path
,
project
.
path
).
exists?
raise
TransferError
.
new
(
"Project with same
name or
path in target namespace already exists"
)
end
if
project
.
has_container_registry_tags?
...
...
@@ -118,6 +118,7 @@ module Projects
def
rollback_side_effects
rollback_folder_move
project
.
reload
update_namespace_and_visibility
(
@old_namespace
)
write_repository_config
(
@old_path
)
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