summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-07-14 11:06:14 +0200
committerMarin Jankovski <marin@gitlab.com>2014-07-14 11:06:14 +0200
commit207bc8a0e70be38e49cd28bee1bc0b6bea50687a (patch)
tree9ad1fba7733ef3e6c45062ebb40181ad5892bd55 /lib
parent25c9bf4b6a637c028f29dc36338d4c5ac8c8376c (diff)
downloadgitlab-ce-207bc8a0e70be38e49cd28bee1bc0b6bea50687a.tar.gz
Branches without parent commit cannot be merged.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/satellite/compare_action.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/satellite/compare_action.rb b/lib/gitlab/satellite/compare_action.rb
index c923bb9c0f0..9c9e69e3515 100644
--- a/lib/gitlab/satellite/compare_action.rb
+++ b/lib/gitlab/satellite/compare_action.rb
@@ -1,5 +1,7 @@
module Gitlab
module Satellite
+ class BranchesWithoutParent < StandardError; end
+
class CompareAction < Action
def initialize(user, target_project, target_branch, source_project, source_branch)
super user, target_project
@@ -22,7 +24,7 @@ module Gitlab
diffs
end
rescue Grit::Git::CommandFailed => ex
- handle_exception(ex)
+ raise BranchesWithoutParent
end
# Retrieve an array of commits between the source and the target