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

@@ -15,18 +15,39 @@ class GitHelpCommandsTest {
@Test
fun parsesGitSubcommandShortHelpCommand() {
val invocation = parseGitHelpInvocation("git tag -h")
assertEquals("tag", invocation?.topic)
assertEquals("git tag -h", invocation?.command)
assertNull(parseGitHelpInvocation("git tag -h"))
}
@Test
fun parsesGitGlobalShortHelpCommand() {
val invocation = parseGitHelpInvocation("git -h tag")
val invocation = parseGitHelpInvocation("git --help tag")
assertEquals("tag", invocation?.topic)
assertEquals("git -h tag", invocation?.command)
assertEquals("git --help tag", invocation?.command)
}
@Test
fun parsesManGitCommand() {
val invocation = parseGitHelpInvocation("man git-cherry-pick")
assertEquals("cherry-pick", invocation?.topic)
assertEquals("man git-cherry-pick", invocation?.command)
}
@Test
fun parsesSplitManGitCommand() {
val invocation = parseGitHelpInvocation("man git cherry-pick")
assertEquals("cherry-pick", invocation?.topic)
assertEquals("man git cherry-pick", invocation?.command)
}
@Test
fun parsesMainGitManpageCommand() {
val invocation = parseGitHelpInvocation("man git")
assertEquals("git", invocation?.topic)
assertEquals("man git", invocation?.command)
}
@Test

View File

@@ -276,6 +276,16 @@ class GitSandboxEngineTest {
assertFalse(updatedRepo.files.any { it.name == "deleteme.txt" })
}
@Test
fun interactiveStageDoesNotThrow() {
val repo = RepoState(initialized = true, files = listOf(GitFile("README")))
val (updatedRepo, output) = GitSandboxEngine.execute(repo, "git stage -i")
assertEquals(repo, updatedRepo)
assertTrue(output.any { it.contains("Interactive staging is not supported") })
}
private fun testGitBinary(): File {
System.getenv("GITHUG_TEST_GIT_BINARY")
?.takeIf { it.isNotBlank() }