diff options
Diffstat (limited to 'modules/repository/commits_test.go')
-rw-r--r-- | modules/repository/commits_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/repository/commits_test.go b/modules/repository/commits_test.go index afcb183d72..827b2a9849 100644 --- a/modules/repository/commits_test.go +++ b/modules/repository/commits_test.go @@ -144,7 +144,7 @@ func TestCommitToPushCommit(t *testing.T) { When: now, } const hexString = "0123456789abcdef0123456789abcdef01234567" - sha1, err := git.IDFromString(hexString) + sha1, err := git.NewIDFromString(hexString) assert.NoError(t, err) pushCommit := CommitToPushCommit(&git.Commit{ ID: sha1, @@ -169,12 +169,11 @@ func TestListToPushCommits(t *testing.T) { When: now, } - hashType := git.Sha1ObjectFormat const hexString1 = "0123456789abcdef0123456789abcdef01234567" - hash1, err := hashType.NewIDFromString(hexString1) + hash1, err := git.NewIDFromString(hexString1) assert.NoError(t, err) const hexString2 = "fedcba9876543210fedcba9876543210fedcba98" - hash2, err := hashType.NewIDFromString(hexString2) + hash2, err := git.NewIDFromString(hexString2) assert.NoError(t, err) l := []*git.Commit{ |