Skip to content

add OpenHarmony (OHOS) target support#2954

Open
ystyle wants to merge 2 commits into
gitui-org:masterfrom
ystyle:feature/ohos-support
Open

add OpenHarmony (OHOS) target support#2954
ystyle wants to merge 2 commits into
gitui-org:masterfrom
ystyle:feature/ohos-support

Conversation

@ystyle
Copy link
Copy Markdown

@ystyle ystyle commented May 20, 2026

On OpenHarmony the user/process model is sandbox-based. libgit2's owner validation (GIT_OPT_SET_OWNER_VALIDATION) compares file UID with process EUID, which is not applicable and causes spurious "not owned by current user" errors (code=Owner -36).

Changes

  • Disable libgit2 owner validation on OHOS targets (cfg(target_env = "ohos")) in both repository-opening entry points
  • Use std::sync::Once to ensure the init runs exactly once
  • Add OpenHarmony cross-compilation instructions to CONTRIBUTING.md

Affected targets

All OHOS targets share target_env = "ohos": aarch64, armv7, x86_64

ystyle added 2 commits May 20, 2026 15:34
On OpenHarmony the user/process model is sandbox-based. libgit2's
owner validation (GIT_OPT_SET_OWNER_VALIDATION) compares file UID
with process EUID, which is not applicable and causes spurious
"not owned by current user" errors (code=Owner -36).

This disables owner validation on all OHOS targets
(cfg(target_env = "ohos"): aarch64/armv7/x86_64) via a
std::sync::Once in the repository opening entry points.

Also adds cross-compilation instructions to CONTRIBUTING.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant