Skip to content

Add non-elevated admin owner patch to libgit2 overlay#1983

Open
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/libgit2-overlay-patch
Open

Add non-elevated admin owner patch to libgit2 overlay#1983
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/libgit2-overlay-patch

Conversation

@tyrielv
Copy link
Copy Markdown
Contributor

@tyrielv tyrielv commented May 22, 2026

Add patch from libgit2/libgit2#7200 to the vcpkg libgit2 overlay port.

Problem

When a repository is owned by the Administrators group, libgit2 only considers the current user to be the owner if the process is running elevated. This causes safe-directory ownership checks to fail for non-elevated admin users.

Solution

Carry the patch from libgit2/libgit2#7200 in our vcpkg overlay until it ships in an official libgit2 release. The patch modifies \src/util/fs_path.c\ to check the linked token for Administrators group membership when the process is running non-elevated, matching the corresponding change in git.

Related: libgit2/libgit2#6279

Changes

  • \overlays/libgit2/non-elevated-admin-owner.diff\ — patch from PR #7200
  • \overlays/libgit2/portfile.cmake\ — added patch to PATCHES list
  • \overlays/libgit2/README.md\ — documented new patch

Add patch from libgit2/libgit2#7200 to vcpkg overlay. Allows
non-elevated processes run by Administrators group members to be
considered the owner of repositories owned by that group.

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv enabled auto-merge May 22, 2026 21:14
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.

2 participants