Misc Changes

This commit is contained in:
Joe Tretter
2026-05-09 22:49:15 -05:00
parent f49e8a96b1
commit 8f829fb969
13 changed files with 139 additions and 583 deletions

View File

@@ -176,7 +176,7 @@ class GitRepositoryRuntime private constructor(
add(" binary path: nativeLibraryDir/libgit.so")
add(" selected ABI: ${Build.SUPPORTED_ABIS.firstOrNull() ?: "unknown"}")
add(" helper commands: ls/dir, pwd, cat, touch, mkdir/md, cd.., rm/del, echo")
add(" visual editors: vi, nano, emacs, ed, ex")
add(" visual editors: vi, vim, nano, emacs, ed, ex, edit, notepad")
add(" git help <command>")
}
}
@@ -548,7 +548,7 @@ class GitRepositoryRuntime private constructor(
}
val shouldUseSandboxSemantics = when (gitCommand) {
"add" -> tokens.any { it == "-p" || it == "--patch" || it == "-i" || it == "--interactive" }
"rebase" -> "-i" in tokens || "--onto" in tokens
"rebase" -> "-i" in tokens || "--interactive" in tokens || "--onto" in tokens
"merge" -> "--squash" in tokens || tokens.lastOrNull() == "mybranch" || tokens.lastOrNull() == "feature"
"revert", "stash" -> true
"checkout" -> tokens.any { it == "file3" } || tokens.takeLast(2) == listOf("--", "config.rb")