Merge pull request #49885 from mmorel-35/fix-staticcheck

fix staticcheck linting issues for golangci-lint v2
This commit is contained in:
Sebastiaan van Stijn
2025-05-01 17:08:40 +02:00
committed by GitHub
@@ -216,14 +216,15 @@ func TestCheckoutGit(t *testing.T) {
server := httptest.NewServer(&githttp)
defer server.Close()
autocrlf := gitGetConfig("core.autocrlf")
if !(autocrlf == "true" || autocrlf == "false" ||
autocrlf == "input" || autocrlf == "") {
t.Logf("unknown core.autocrlf value: \"%s\"", autocrlf)
}
eol := "\n"
if autocrlf == "true" {
autocrlf := gitGetConfig("core.autocrlf")
switch autocrlf {
case "true":
eol = "\r\n"
case "false", "input", "":
// accepted values
default:
t.Logf(`unknown core.autocrlf value: "%s"`, autocrlf)
}
must := func(out []byte, err error) {