OSDN Git Service

Merge branch 'improve/repo_head_update'
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Mon, 16 Dec 2013 19:30:24 +0000 (21:30 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Mon, 16 Dec 2013 19:30:24 +0000 (21:30 +0200)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
app/models/project.rb

1  2 
app/models/project.rb

@@@ -475,11 -473,8 +475,16 @@@ class Project < ActiveRecord::Bas
      visibility_level
    end
  
 +  def archive!
 +    update_attribute(:archived, true)
 +  end
 +
 +  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