BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
02484930
Unverified
Commit
02484930
authored
Nov 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed Project#discover_default_branch since it not needed any more
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c28786ec
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
16 deletions
+0
-16
create_context.rb
app/contexts/projects/create_context.rb
+0
-2
projects_controller.rb
app/controllers/projects_controller.rb
+0
-4
project.rb
app/models/project.rb
+0
-8
git_push_service.rb
app/services/git_push_service.rb
+0
-1
repository_import_worker.rb
app/workers/repository_import_worker.rb
+0
-1
No files found.
app/contexts/projects/create_context.rb
View file @
02484930
...
...
@@ -47,8 +47,6 @@ module Projects
@project
.
creator
=
current_user
if
@project
.
save
@project
.
discover_default_branch
unless
@project
.
group
@project
.
users_projects
.
create
(
project_access:
UsersProject
::
MASTER
,
...
...
app/controllers/projects_controller.rb
View file @
02484930
...
...
@@ -62,10 +62,6 @@ class ProjectsController < ApplicationController
@events
=
event_filter
.
apply_filter
(
@events
)
@events
=
@events
.
limit
(
limit
).
offset
(
params
[
:offset
]
||
0
)
# Ensure project default branch is set if it possible
# Normally it defined on push or during creation
@project
.
discover_default_branch
respond_to
do
|
format
|
format
.
html
do
if
@project
.
empty_repo?
...
...
app/models/project.rb
View file @
02484930
...
...
@@ -302,14 +302,6 @@ class Project < ActiveRecord::Base
end
end
def
discover_default_branch
# Discover the default branch, but only if it hasn't already been set to
# something else
if
repository
.
exists?
&&
default_branch
.
nil?
update_attributes
(
default_branch:
self
.
repository
.
discover_default_branch
)
end
end
def
update_merge_requests
(
oldrev
,
newrev
,
ref
,
user
)
return
true
unless
ref
=~
/heads/
branch_name
=
ref
.
gsub
(
"refs/heads/"
,
""
)
...
...
app/services/git_push_service.rb
View file @
02484930
...
...
@@ -24,7 +24,6 @@ class GitPushService
create_push_event
project
.
ensure_satellite_exists
project
.
discover_default_branch
project
.
repository
.
expire_cache
if
push_to_existing_branch?
(
ref
,
oldrev
)
...
...
app/workers/repository_import_worker.rb
View file @
02484930
...
...
@@ -14,7 +14,6 @@ class RepositoryImportWorker
project
.
imported
=
true
project
.
save
project
.
satellite
.
create
unless
project
.
satellite
.
exists?
project
.
discover_default_branch
else
project
.
imported
=
false
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