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:
Joe Tretter
2026-05-08 17:43:46 -05:00
parent 64743ff4a9
commit 4fab442939
219 changed files with 58133 additions and 129 deletions

View File

@@ -7,11 +7,22 @@ data class GitHelpInvocation(
fun parseGitHelpInvocation(command: String): GitHelpInvocation? {
val tokens = GitSandboxEngine.tokenizeCommand(command)
if (tokens.size >= 2 && tokens[0] == "man") {
val topic = when {
tokens[1] == "git" -> tokens.getOrNull(2) ?: "git"
tokens[1].startsWith("git-") -> tokens[1].removePrefix("git-")
tokens[1].startsWith("git") && tokens[1].length > 3 -> tokens[1].removePrefix("git")
else -> tokens[1]
}
.takeIf { it.matches(Regex("[A-Za-z0-9_-]+")) }
?: return null
return GitHelpInvocation(topic = topic, command = command)
}
if (tokens.size < 3 || tokens[0] != "git") return null
val topic = when {
tokens[1] == "help" -> tokens[2]
tokens[1] == "-h" || tokens[1] == "--help" -> tokens[2]
tokens.drop(2).any { it == "-h" || it == "--help" } -> tokens[1]
tokens[1] == "--help" -> tokens[2]
tokens.drop(2).any { it == "--help" } -> tokens[1]
else -> return null
}.takeIf { it.matches(Regex("[A-Za-z0-9_-]+")) } ?: return null
return GitHelpInvocation(topic = topic, command = command)