We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a10a1e6 + 09a3c93 commit 7422403Copy full SHA for 7422403
1 file changed
cli/command/image/build/internal/git/gitutils_test.go
@@ -216,14 +216,15 @@ func TestCheckoutGit(t *testing.T) {
216
server := httptest.NewServer(&githttp)
217
defer server.Close()
218
219
- autocrlf := gitGetConfig("core.autocrlf")
220
- if !(autocrlf == "true" || autocrlf == "false" ||
221
- autocrlf == "input" || autocrlf == "") {
222
- t.Logf("unknown core.autocrlf value: \"%s\"", autocrlf)
223
- }
224
eol := "\n"
225
- if autocrlf == "true" {
+ autocrlf := gitGetConfig("core.autocrlf")
+ switch autocrlf {
+ case "true":
226
eol = "\r\n"
+ case "false", "input", "":
+ // accepted values
+ default:
227
+ t.Logf(`unknown core.autocrlf value: "%s"`, autocrlf)
228
}
229
230
must := func(out []byte, err error) {
0 commit comments