Fix suspicious indentation in Migrations.kt (#1956)

This commit is contained in:
Harsh Shandilya 2022-06-14 13:53:25 +05:30 committed by GitHub
parent d65fc88a14
commit 58342ca426
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,13 +48,15 @@ private fun migrateToGitUrlBasedConfig(sharedPrefs: SharedPreferences, gitSettin
"$userPart$hostnamePart:$serverPath" "$userPart$hostnamePart:$serverPath"
} else { } else {
// Only absolute paths are supported with custom ports. // Only absolute paths are supported with custom ports.
if (!serverPath.startsWith('/')) null if (!serverPath.startsWith('/')) {
else null
} else {
// We have to specify the ssh scheme as this is the only way to pass a custom // We have to specify the ssh scheme as this is the only way to pass a custom
// port. // port.
"ssh://$userPart$hostnamePart$portPart$serverPath" "ssh://$userPart$hostnamePart$portPart$serverPath"
} }
} }
}
Protocol.Https -> { Protocol.Https -> {
val portPart = if (serverPort == "443" || serverPort.isEmpty()) "" else ":$serverPort" val portPart = if (serverPort == "443" || serverPort.isEmpty()) "" else ":$serverPort"
val pathPart = serverPath.trimStart('/', ':') val pathPart = serverPath.trimStart('/', ':')