Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
bbe0d57d7209
Commit
bbe0d57d
authored
Feb 17, 2016
by
P.S.V.R
Browse files
Use rugged to change HEAD
parent
01d27728b979
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
bbe0d57d
...
...
@@ -32,6 +32,7 @@
- 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 @
bbe0d57d
...
...
@@ -865,7 +865,9 @@
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
Supports
Markdown
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