dev_local_lzdx
sylor_huang@126.com 4 years ago
parent beb6937765
commit 237608b269

@ -154,17 +154,14 @@ class PullRequestsController < ApplicationController
forked_source_project = Project.find(target_project)
user_name_target = forked_source_project.owner.try(:login)
git_target_tree = '--git-dir=/home/git/repositories/' + user_name_target + '/' + identifier + '.git'
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
git_target_commit_id = @g.get_branch_commit_id(forked_source_project.gpid, git_target_tree, target_branch)
git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id)
git_target_commit_id = @g.commis(forked_source_project.gpid, :ref => target_branch).first.try(:id)
else
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
git_target_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, target_branch)
git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id)
git_target_commit_id = @g.commis(@project.gpid, :ref => target_branch).first.try(:id)
end
Rails.logger.info("=========git_sourse_commit_id========#{git_sourse_commit_id.to_json}")
Rails.logger.info("=========git_target_commit_id========#{git_target_commit_id.to_json}")
Rails.logger.info("=========git_sourse_commit_id========#{git_sourse_commit_id.try(:id)}")
Rails.logger.info("=========git_target_commit_id========#{git_target_commit_id.try(:id)}")
status = (git_sourse_commit_id.try(:commit_id) == git_target_commit_id.try(:commit_id) ? false : true)
status = (git_sourse_commit_id == git_target_commit_id ? false : true)
end
# @project_menu_type 为了控制base顶部导航

Loading…
Cancel
Save