Skip to content

[rush] Preserve unmanaged Git hooks and diagnose Git LFS conflicts - #6121

Draft
Ian Clanton-Thuon (iclanton) with Copilot wants to merge 3 commits into
mainfrom
copilot/rush-managed-git-lfs-hooks-issue
Draft

Ian Clanton-Thuon (iclanton) with Copilot wants to merge 3 commits into
mainfrom
copilot/rush-managed-git-lfs-hooks-issue

Conversation

Copilot AI commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Rush’s hook-directory cleanup can delete Git LFS hooks, allowing pointer commits to be pushed without their objects. Rush-generated LFS wrappers introduce the opposite failure: repeated git lfs install --local rejects them during Azure Pipelines checkout on reused workspaces.

  • Ownership-aware installation

    • Replace only exact-match current or legacy Rush delegates; preserve unmanaged hooks, edited delegates, and symlinks.
    • Remove obsolete non-LFS delegates. Retain obsolete LFS delegates with a warning to avoid silently disabling uploads.
  • Collision handling

    • Detect conflicting destination paths before changing any hooks, including case-insensitive matches and dangling symlinks.
    • Fail with actionable guidance; --bypass-policy skips installation rather than overwriting conflicts.
  • LFS compatibility and recovery

    • Preserve canonical LFS hooks when their names are absent from common/git-hooks; placeholders are unnecessary.
    • Warn that custom Rush LFS wrappers remain incompatible with repeated LFS initialization.
    • Document recovery before the next checkout, without forcing replacement of legitimate custom hooks.

Copilot AI and others added 2 commits October 7, 2026 21:01
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Managed Git LFS hooks conflict with Azure Pipelines workspaces [rush] Preserve unmanaged Git hooks and diagnose Git LFS conflicts Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

[rush] Managed Git LFS hooks conflict with reused Azure Pipelines workspaces

2 participants