gh-symlinks: extension for safely tracking symbolic links in git #13550
tibberous
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all — built a
ghextension for the 20-year-rejected "make git follow symlinks" request. The novel part isn't the following — it's a consent UX that gates the security objection that's blocked this in git core forever (full whitepaper in the repo).When the user runs
addon a symlink, they see a prompt showing the resolved absolute target, the file count, and the byte total, and pick one of three options (.gitignoreit, allow once, or allow always for this repo). The approval state is persisted per-repo at.git/info/git-symlinks/config.iniso the prompt only fires for genuinely new links.Architecture-wise, it's a separate binary that talks to git only through frozen, documented APIs (
hash-object,update-index --cacheinfo,post-checkouthook) — same approachgit-lfsandgit-annexhave ridden across 12+ years of git releases without an emergency port. No patch to git itself, no fork to maintain. Cross-platform: Linux, macOS, Windows (Win32 reparse-point APIs handle the bits MinGW's<filesystem>doesn't).The same binary works as
git symlinks ...if yougit clone tibberous/git-symlinksand drop it on PATH — theghextension is just a thin wrapper so it's discoverable viagh extension search symlinks.Repo: https://github.com/tibberous/git-symlinks
Extension: https://github.com/tibberous/gh-symlinks
Whitepaper: https://github.com/tibberous/git-symlinks/blob/main/WHITEPAPER.md
Releases: v0.1.1, Windows + Linux binaries attached, MIT licensed
Open to feedback on the consent flow + whether anyone wants a different default than "ask the user" (for unattended/CI runs). And if anyone from the
ghteam thinks the extension should ship binaries directly (so users don't need a separategit-symlinksinstall), happy to add agh-extension-precompileworkflow — let me know.Cheers,
Trent
Beta Was this translation helpful? Give feedback.
All reactions