Skip to content

Commit 295900c

Browse files
author
Vicent Marti
committed
Merge pull request #508 from felipebalbi/make-sure-to-abbreviate-with-7-characters
test: make sure to set core.abbrev to 7
2 parents 283ab90 + ce7e327 commit 295900c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test/commit_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
class TestCommit < Rugged::TestCase
44
def setup
55
@repo = FixtureRepo.from_rugged("testrepo.git")
6+
@repo.config['core.abbrev'] = 7
67
end
78

89
def test_lookup_raises_error_if_object_type_does_not_match
@@ -179,6 +180,7 @@ class CommitWriteTest < Rugged::TestCase
179180
def setup
180181
@source_repo = FixtureRepo.from_rugged("testrepo.git")
181182
@repo = FixtureRepo.clone(@source_repo)
183+
@repo.config['core.abbrev'] = 7
182184
end
183185

184186
def test_write_commit_with_time
@@ -266,6 +268,7 @@ def test_write_empty_email_fails
266268
class CommitToMboxTest < Rugged::TestCase
267269
def setup
268270
@repo = FixtureRepo.from_libgit2 "diff_format_email"
271+
@repo.config['core.abbrev'] = 7
269272
end
270273

271274
def test_format_to_mbox

test/patch_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
class PatchTest < Rugged::TestCase
44
def test_to_s
55
repo = FixtureRepo.from_libgit2("diff")
6+
repo.config['core.abbrev'] = 7
67

78
a = repo.lookup("d70d245ed97ed2aa596dd1af6536e4bfdb047b69")
89
b = repo.lookup("7a9e0b02e63179929fed24f0a3e0f19168114d10")

0 commit comments

Comments
 (0)