mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 05:36:07 +10:00
Revert "Make web editor work correctly after switch from satellites"
This reverts commit 435f680b89.
This commit is contained in:
committed by
Valery Sizov
parent
60b3d2b704
commit
fac581b170
@@ -17,8 +17,7 @@ module Files
|
||||
def after_commit(sha)
|
||||
commit = repository.commit(sha)
|
||||
full_ref = 'refs/heads/' + (params[:new_branch] || ref)
|
||||
old_sha = commit.parent_id || Gitlab::Git::BLANK_SHA
|
||||
GitPushService.new.execute(project, current_user, old_sha, sha, full_ref)
|
||||
GitPushService.new.execute(project, current_user, commit.parent_id, sha, full_ref)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require_relative "base_service"
|
||||
|
||||
module Files
|
||||
class CreateService < Files::BaseService
|
||||
class CreateService < BaseService
|
||||
def execute
|
||||
allowed = Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(ref)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require_relative "base_service"
|
||||
|
||||
module Files
|
||||
class DeleteService < Files::BaseService
|
||||
class DeleteService < BaseService
|
||||
def execute
|
||||
allowed = ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(ref)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require_relative "base_service"
|
||||
|
||||
module Files
|
||||
class UpdateService < Files::BaseService
|
||||
class UpdateService < BaseService
|
||||
def execute
|
||||
allowed = ::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(ref)
|
||||
|
||||
|
||||
@@ -133,8 +133,7 @@ class GitPushService
|
||||
end
|
||||
|
||||
def is_default_branch?(ref)
|
||||
Gitlab::Git.branch_ref?(ref) &&
|
||||
(Gitlab::Git.ref_name(ref) == project.default_branch || project.default_branch.nil?)
|
||||
Gitlab::Git.branch_ref?(ref) && Gitlab::Git.ref_name(ref) == project.default_branch
|
||||
end
|
||||
|
||||
def commit_user(commit)
|
||||
|
||||
Reference in New Issue
Block a user