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
80c4657f
Unverified
Commit
80c4657f
authored
Dec 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'improve/repo_head_update'
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
Conflicts: app/models/project.rb
parents
f40ad6ce
28bb65f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
update_context.rb
app/contexts/projects/update_context.rb
+1
-7
project.rb
app/models/project.rb
+5
-0
No files found.
app/contexts/projects/update_context.rb
View file @
80c4657f
...
...
@@ -10,13 +10,7 @@ module Projects
new_branch
=
params
[
:project
].
delete
(
:default_branch
)
if
project
.
repository
.
exists?
&&
new_branch
!=
project
.
default_branch
GitlabShellWorker
.
perform_async
(
:update_repository_head
,
project
.
path_with_namespace
,
new_branch
)
project
.
reload_default_branch
project
.
change_head
(
new_branch
)
end
project
.
update_attributes
(
params
[
:project
],
as:
role
)
...
...
app/models/project.rb
View file @
80c4657f
...
...
@@ -482,4 +482,9 @@ class Project < ActiveRecord::Base
def
unarchive!
update_attribute
(
:archived
,
false
)
end
def
change_head
(
branch
)
gitlab_shell
.
update_repository_head
(
self
.
path_with_namespace
,
branch
)
reload_default_branch
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