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
fa8b0662
Commit
fa8b0662
authored
Mar 01, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed remote name for mirrors in Geo to not conflict with old Mirrors
Fixed non-fast-forward fetch
parent
e56c01d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
app/models/repository.rb
app/models/repository.rb
+9
-3
No files found.
app/models/repository.rb
View file @
fa8b0662
...
...
@@ -6,6 +6,7 @@ class Repository
class
CommitError
<
StandardError
;
end
MIRROR_REMOTE
=
"upstream"
MIRROR_GEO
=
"geo"
include
Gitlab
::
ShellAdapter
...
...
@@ -192,6 +193,11 @@ class Repository
gitlab_shell
.
fetch_remote
(
path_with_namespace
,
remote
)
end
def
fetch_remote_forced!
(
remote
)
args
=
%W(
#{
Gitlab
.
config
.
git
.
bin_path
}
fetch
#{
remote
}
-f)
Gitlab
::
Popen
.
popen
(
args
,
path_to_repo
)
end
def
branch_names
cache
.
fetch
(
:branch_names
)
{
raw_repository
.
branch_names
}
end
...
...
@@ -750,9 +756,9 @@ class Repository
end
def
fetch_geo_mirror
(
url
)
add_remote
(
Repository
::
MIRROR_
REMOTE
,
url
)
set_remote_as_mirror
(
Repository
::
MIRROR_
REMOTE
)
fetch_remote
(
Repository
::
MIRROR_REMOTE
)
add_remote
(
Repository
::
MIRROR_
GEO
,
url
)
set_remote_as_mirror
(
Repository
::
MIRROR_
GEO
)
fetch_remote
_forced!
(
Repository
::
MIRROR_GEO
)
end
def
upstream_branches
...
...
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