You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	test: make test git init compatible with older git versions
Signed-off-by: Carlos Becker <caarlos0@gmail.com>
This commit is contained in:
		| @@ -11,10 +11,12 @@ import ( | ||||
| // GitInit inits a new git project. | ||||
| func GitInit(tb testing.TB) { | ||||
| 	tb.Helper() | ||||
| 	out, err := fakeGit("init", "-b", "main") | ||||
| 	out, err := fakeGit("init") | ||||
| 	require.NoError(tb, err) | ||||
| 	require.Contains(tb, out, "Initialized empty Git repository") | ||||
| 	require.NoError(tb, err) | ||||
| 	GitCheckoutBranch(tb, "main") | ||||
| 	_, _ = fakeGit("branch", "-D", "master") | ||||
| } | ||||
|  | ||||
| // GitRemoteAdd adds the given url as remote. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user