Permalink
Browse files

merge-base returns garbage on baseless merge_base.

  • Loading branch information...
spraints committed Mar 14, 2013
1 parent 58812e0 commit df6cd4ac15e1effc529e924fa8b0f3f42bdcf53e
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/repo_test.rb
View
@@ -169,5 +169,11 @@ def test_write_to_odb
assert_equal "76b1b55ab653581d6f2c7230d34098e837197674", oid
assert @repo.exists?("76b1b55ab653581d6f2c7230d34098e837197674")
end
+
+ def test_no_merge_base_between_unrelated_branches
+ info = @repo.rev_parse('HEAD').to_hash
+ baseless = Rugged::Commit.create(@repo, info.merge(:parents => []))
+ assert_nil @repo.merge_base('HEAD', baseless)
+ end
end

0 comments on commit df6cd4a

Please sign in to comment.