diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-16 21:30:24 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-16 21:30:24 +0200 |
| commit | 80c4657fa78eaf7d360e0f247243736387b5ce87 (patch) | |
| tree | b816855fad37f39bfcd98337aa41c038f3b82af6 /app/models/project.rb | |
| parent | f40ad6ce403e4365e4b5515cfa593437babb1298 (diff) | |
| parent | 28bb65f3637ae16c98f374248e3ffa5f26983443 (diff) | |
| download | gitlab-ce-80c4657fa78eaf7d360e0f247243736387b5ce87.tar.gz | |
Merge branch 'improve/repo_head_update'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
app/models/project.rb
Diffstat (limited to 'app/models/project.rb')
| -rw-r--r-- | app/models/project.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index d389579b3a1..1bfc27d723d 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 |
