Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/credits/canonical_names_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ class CanonicalNamesTest < ActiveSupport::TestCase
end

test "evgeny.zislis\100gmail.com" do
assert_contributor_names '842ce34', 'Evgeny Zislis'
assert_contributor_names '842ce34b', 'Evgeny Zislis'
end

test 'f.svehla' do
Expand Down Expand Up @@ -2064,7 +2064,7 @@ class CanonicalNamesTest < ActiveSupport::TestCase
end

test "jeff\100ministrycentered.com" do
assert_contributor_names 'a5991d8', 'Jeff Berg'
assert_contributor_names 'a5991d84', 'Jeff Berg'
end

test "jeff\100opendbms.com" do
Expand Down
6 changes: 5 additions & 1 deletion test/support/assert_contributor_names.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ module AssertContributorNames
def assert_contributor_names(sha1, *contributor_names, **options)
begin
commit = Commit.new_from_rugged_commit(REPO.repo.lookup(sha1))
rescue Rugged::OdbError
rescue Rugged::OdbError => e
if e.message == "ambiguous OID prefix - found multiple pack entries"
raise "#{sha1} is ambiguous, please use the full commit SHA"
end

raise "#{sha1} was not found, please make sure the local Rails checkout is up to date"
end

Expand Down
Loading