diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-05-03 18:37:34 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-05-03 21:25:57 +0100 |
commit | 268ec199da09f3d2c3e93b1f3546f2c3c89c48d0 (patch) | |
tree | c92d198186f7606279d17321d99d284c944ce714 /lib | |
parent | 3ff8d8020e495df319f0b0921bc94b1c3470f6f0 (diff) | |
download | gitlab-ce-268ec199da09f3d2c3e93b1f3546f2c3c89c48d0.tar.gz |
removes the possibility of commit messages having carriage returns
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d7dac9f6149..876c90802e7 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -872,27 +872,6 @@ module Gitlab rugged.remotes[remote_name].push(refspecs) end - # Merge the +source_name+ branch into the +target_name+ branch. This is - # equivalent to `git merge --no_ff +source_name+`, since a merge commit - # is always created. - def merge(source_name, target_name, options = {}) - our_commit = rugged.branches[target_name].target - their_commit = rugged.branches[source_name].target - - raise "Invalid merge target" if our_commit.nil? - raise "Invalid merge source" if their_commit.nil? - - merge_index = rugged.merge_commits(our_commit, their_commit) - return false if merge_index.conflicts? - - actual_options = options.merge( - parents: [our_commit, their_commit], - tree: merge_index.write_tree(rugged), - update_ref: "refs/heads/#{target_name}" - ) - Rugged::Commit.create(rugged, actual_options) - end - AUTOCRLF_VALUES = { "true" => true, "false" => false, |