Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
GitLab Community Edition
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
14,052
Issues
14,052
List
Boards
Labels
Service Desk
Milestones
Merge Requests
806
Merge Requests
806
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GitLab.org
GitLab Community Edition
Commits
a5755812
Commit
a5755812
authored
Feb 17, 2016
by
Minqi Pan
Committed by
Rémy Coutable
Apr 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use rugged to change HEAD
parent
94e130ce
Pipeline
#1772159
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CHANGELOG
CHANGELOG
+1
-0
project.rb
app/models/project.rb
+3
-1
No files found.
CHANGELOG
View file @
a5755812
...
...
@@ -32,6 +32,7 @@ v 8.7.0 (unreleased)
- Add default scope to projects to exclude projects pending deletion
- Allow to close merge requests which source projects(forks) are deleted.
- Ensure empty recipients are rejected in BuildsEmailService
- Use rugged to change HEAD in Project#change_head (P.S.V.R)
- API: Ability to filter milestones by state `active` and `closed` (Robert Schilling)
- API: Fix milestone filtering by `iid` (Robert Schilling)
- API: Delete notes of issues, snippets, and merge requests (Robert Schilling)
...
...
app/models/project.rb
View file @
a5755812
...
...
@@ -865,7 +865,9 @@ class Project < ActiveRecord::Base
def
change_head
(
branch
)
repository
.
before_change_head
gitlab_shell
.
update_repository_head
(
self
.
path_with_namespace
,
branch
)
repository
.
rugged
.
references
.
create
(
'HEAD'
,
"refs/heads/
#{
branch
}
"
,
force:
true
)
reload_default_branch
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