mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: add test for commit via staging area
This commit is contained in:
@@ -35,7 +35,7 @@ import java.io.File
|
||||
import java.util.*
|
||||
|
||||
|
||||
class GitCommitTest : GitSingleRepoTest() {
|
||||
open class GitCommitTest : GitSingleRepoTest() {
|
||||
private val myMovementProvider = MyExplicitMovementProvider()
|
||||
|
||||
override fun getDebugLogCategories() = super.getDebugLogCategories().plus("#" + GitCheckinEnvironment::class.java.name)
|
||||
@@ -533,7 +533,7 @@ class GitCommitTest : GitSingleRepoTest() {
|
||||
|
||||
fun `test commit rename with conflicting staged rename`() {
|
||||
`assume version where git reset returns 0 exit code on success `()
|
||||
assumeTrue(Registry.`is`("git.force.commit.using.staging.area"))
|
||||
assumeTrue(Registry.`is`("git.force.commit.using.staging.area")) // known bug in "--only" implementation
|
||||
|
||||
tac("a.txt", "file content")
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package git4idea.tests
|
||||
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
|
||||
class GitStagingCommitTest : GitCommitTest() {
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
Registry.get("git.force.commit.using.staging.area").setValue(true)
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
try {
|
||||
Registry.get("git.force.commit.using.staging.area").resetToDefault()
|
||||
}
|
||||
finally {
|
||||
super.tearDown()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user