Require native Git runtime and bundle full manpages
- Remove the app fallback path when native Git is unavailable and show a startup blocker instead - Fix native level setup for staged file counting and cherry-pick parity - Improve manpage loading/search and bundle full Git documentation assets - Integrate Git cross-compilation into AndroidProjectTooling.sh and remove debug AAB support
This commit is contained in:
@@ -12,10 +12,26 @@ internal fun cherryPickLevel(): Level = level(
|
||||
title = "Cherry Pick",
|
||||
description = "Your new feature isn't worth the time and you're going to delete it. But it has one commit that fills in `README` file, and you want this commit to be on the master as well.",
|
||||
hints = listOf("Sneak a peek at the `git help cherry-pick` command."),
|
||||
commandSuggestions = listOf("git cherry-pick feature"),
|
||||
setup = { RepoState(initialized = true, files = listOf(GitFile("nokia.js", tracked = true)), commits = listOf(CommitNode("1", "Initial"), CommitNode("2", "Master work")), branches = mapOf("master" to 2, "feature" to 3)) },
|
||||
validator = repoPredicate { repo -> repo.files.any { it.name == "README" && it.tracked } && repo.headBranch == "master" },
|
||||
commandSuggestions = listOf("git log --oneline new-feature", "git cherry-pick new-feature"),
|
||||
setup = { RepoState(initialized = true, files = listOf(GitFile("nokia.js", tracked = true)), commits = listOf(CommitNode("1", "Added fancy branded output"), CommitNode("2", "Filled in README.md with proper input")), branches = mapOf("master" to 1, "new-feature" to 2)) },
|
||||
validator = repoPredicate { repo ->
|
||||
repo.files.any { it.name == "README.md" && it.tracked } &&
|
||||
repo.headBranch == "master" &&
|
||||
repo.commits.take(2).map { it.message } == listOf("Filled in README.md with proper input", "Added fancy branded output")
|
||||
},
|
||||
nativeSetup = {
|
||||
resetFiles()
|
||||
write("nokia.js", "console.log('Nokia tune')\n")
|
||||
addCommit("Added fancy branded output", "nokia.js")
|
||||
checkoutNew("new-feature")
|
||||
write("README.md", "Proper input instructions\n")
|
||||
addCommit("Filled in README.md with proper input", "README.md")
|
||||
checkout("master")
|
||||
git("branch", "-f", "feature", "new-feature")
|
||||
true
|
||||
},
|
||||
testCases = listOf(
|
||||
levelTestCase("cherry pick feature tip", "git cherry-pick feature"),
|
||||
levelTestCase("cherry pick new feature tip", "git cherry-pick new-feature"),
|
||||
levelTestCase("cherry pick feature alias", "git cherry-pick feature"),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user