Skip to content

Commit 09a3c93

Browse files
mmorel-35thaJeztah
authored andcommitted
fix(QF1001): Apply De Morgan’s law
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent a10a1e6 commit 09a3c93

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

cli/command/image/build/internal/git/gitutils_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,15 @@ func TestCheckoutGit(t *testing.T) {
216216
server := httptest.NewServer(&githttp)
217217
defer server.Close()
218218

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-
}
224219
eol := "\n"
225-
if autocrlf == "true" {
220+
autocrlf := gitGetConfig("core.autocrlf")
221+
switch autocrlf {
222+
case "true":
226223
eol = "\r\n"
224+
case "false", "input", "":
225+
// accepted values
226+
default:
227+
t.Logf(`unknown core.autocrlf value: "%s"`, autocrlf)
227228
}
228229

229230
must := func(out []byte, err error) {

0 commit comments

Comments
 (0)