mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Allow getting git authentication result from GitCommandResult fix
This commit is contained in:
@@ -641,7 +641,7 @@ public class GitImpl extends GitImplBase {
|
||||
@NotNull
|
||||
private static GitCommandResult toCancelledResult(@NotNull GitCommandResult result) {
|
||||
int exitCode = result.getExitCode() == 0 ? 1 : result.getExitCode();
|
||||
return new GitCommandResult(false, exitCode, result.getErrorOutput(), result.getOutput()) {
|
||||
return new GitCommandResult(false, exitCode, false, result.getErrorOutput(), result.getOutput()) {
|
||||
@Override
|
||||
public boolean cancelled() {
|
||||
return true;
|
||||
|
||||
@@ -664,7 +664,7 @@ class GitBranchWorkerTest : GitPlatformTest() {
|
||||
repository.git("branch todelete")
|
||||
}
|
||||
git.onBranchDelete {
|
||||
if (second == it) GitCommandResult(false, 1, listOf("Couldn't remove branch"), listOf())
|
||||
if (second == it) GitCommandResult(false, 1, false, listOf("Couldn't remove branch"), listOf())
|
||||
else null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class GitPushOperationMultiRepoTest : GitPushOperationBaseTest() {
|
||||
fun `test try push from all roots even if one fails`() {
|
||||
// fail in the first repo
|
||||
git.onPush {
|
||||
if (it == ultimate) GitCommandResult(false, 128, listOf("Failed to push to origin"), listOf<String>())
|
||||
if (it == ultimate) GitCommandResult(false, 128, false, listOf("Failed to push to origin"), listOf<String>())
|
||||
else null
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.io.File
|
||||
*/
|
||||
val UNKNOWN_ERROR_TEXT: String = "unknown error"
|
||||
|
||||
val SUCCESS_RESULT = GitCommandResult(true, 0, emptyList(), emptyList())
|
||||
val SUCCESS_RESULT = GitCommandResult(true, 0, false, emptyList(), emptyList())
|
||||
|
||||
class TestGitImpl : GitImpl() {
|
||||
private val LOG = Logger.getInstance(TestGitImpl::class.java)
|
||||
@@ -171,7 +171,7 @@ class TestGitImpl : GitImpl() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun fatalResult() = GitCommandResult(false, 128, listOf("fatal: error: $UNKNOWN_ERROR_TEXT"), emptyList<String>())
|
||||
private fun fatalResult() = GitCommandResult(false, 128, false, listOf("fatal: error: $UNKNOWN_ERROR_TEXT"), emptyList<String>())
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user