Add git re-entry alias for packaged runtime helpers
- Add a plain git alias in the runtime git-exec directory so Git's internal `git <helper>` re-entry can resolve on Android. - Keep prefixed and unprefixed helper aliases plus GIT_EXEC_PATH/PATH wiring for direct helper lookup. - Verify Push no longer reproduces `cannot run merge-base` or `cannot run fetch` in the host libgit.so runtime tests.
This commit is contained in:
@@ -853,6 +853,7 @@ class GitRepositoryRuntime private constructor(
|
||||
.apply {
|
||||
environment()["HOME"] = workingDir.absolutePath
|
||||
environment()["GIT_EXEC_PATH"] = gitExecPath.absolutePath
|
||||
environment()["PATH"] = gitExecPath.absolutePath
|
||||
environment()["GIT_CONFIG_NOSYSTEM"] = "1"
|
||||
environment()["GIT_AUTHOR_NAME"] = "GitHug"
|
||||
environment()["GIT_AUTHOR_EMAIL"] = "githug@example.com"
|
||||
@@ -878,12 +879,19 @@ class GitRepositoryRuntime private constructor(
|
||||
}
|
||||
directory.mkdirs()
|
||||
|
||||
RequiredGitCommandAliases.forEach { command ->
|
||||
val alias = File(directory, "git-$command")
|
||||
File(directory, "git").also { alias ->
|
||||
if (!alias.exists()) {
|
||||
createGitAlias(binary, alias)
|
||||
}
|
||||
}
|
||||
RequiredGitCommandAliases.forEach { command ->
|
||||
listOf("git-$command", command).forEach { aliasName ->
|
||||
val alias = File(directory, aliasName)
|
||||
if (!alias.exists()) {
|
||||
createGitAlias(binary, alias)
|
||||
}
|
||||
}
|
||||
}
|
||||
return directory
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user