@@ -77,11 +77,11 @@ func TestResolveTag(t *testing.T) {
7777func TestSortedCommitTags (t * testing.T ) {
7878 // Create a folder for the test repository.
7979 repositoryPath , err := paths .TempDir ().MkTempDir ("gitutils-TestSortedTags-repo" )
80- require .Nil (t , err )
80+ require .NoError (t , err )
8181
8282 // Create test repository.
8383 repository , err := git .PlainInit (repositoryPath .String (), false )
84- require .Nil (t , err )
84+ require .NoError (t , err )
8585
8686 var tags []* plumbing.Reference
8787 tags = append (tags , makeTag (t , repository , "1.0.0" , makeCommit (t , repository , repositoryPath ), true ))
@@ -90,24 +90,15 @@ func TestSortedCommitTags(t *testing.T) {
9090 tags = append (tags , makeTag (t , repository , "1.0.1" , makeCommit (t , repository , repositoryPath ), false ))
9191
9292 worktree , err := repository .Worktree ()
93- require .Nil (t , err )
94- worktree .Checkout (
95- & git.CheckoutOptions {
96- Branch : "development-branch" ,
97- Create : true ,
98- },
99- )
93+ require .NoError (t , err )
94+ require .NoError (t , worktree .Checkout (& git.CheckoutOptions {Branch : "development-branch" , Create : true }))
95+
10096 var branchTags []* plumbing.Reference
10197 branchTags = append (branchTags , makeTag (t , repository , "1.0.2-rc1" , makeCommit (t , repository , repositoryPath ), true ))
10298 branchTags = append (branchTags , makeTag (t , repository , "1.0.2-rc2" , makeCommit (t , repository , repositoryPath ), true ))
10399 config , err := repository .Config ()
104- require .Nil (t , err )
105- worktree .Checkout (
106- & git.CheckoutOptions {
107- Branch : plumbing .ReferenceName (config .Init .DefaultBranch ),
108- Create : false ,
109- },
110- )
100+ require .NoError (t , err )
101+ require .NoError (t , worktree .Checkout (& git.CheckoutOptions {Branch : plumbing .ReferenceName (config .Init .DefaultBranch ), Create : false }))
111102
112103 tags = append (tags , makeTag (t , repository , "1.0.2" , makeCommit (t , repository , repositoryPath ), true ))
113104 // Throw a blob tag into the mix. This should not have any effect.
0 commit comments