Install plugins from a branch #7
Reference in New Issue
Block a user
Delete Branch "benvin/branch-specs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Many upstream plugins publish no tags at all, so a tag-only installer cannot manage them.
branchspec field, mutually exclusive withtagand validated the same wayarchive/refs/heads/<branch>URLs for branch specs:ArtiPackUpdateor a forced sync, never from cacheReviewed against the real checkout (
pr7,460dc2c), ran the full suite (186 passed) and mutation-tested the update-decision (lock.needs_install) and cache-bypass (installer.download) logic — both fail correctly when broken, so the coverage bites. Mutability semantics, lockfile round-trip/back-compat,ArtiPackListhonesty, andArtiPackCleansafety all check out against the stated acceptance criteria; tag-install behavior andarchive_root()are byte-for-byte unchanged.One real gap found and reproduced:
tag/branchvalidation accepts an embedded NUL byte, which then silently truncates the URL actually fetched.bad_name()inlua/arti-pack/spec.luaonly rejects/,\, whitespace,.and..— not\0:Confirmed downstream impact:
installer.luapasses the built URL tocurlviavim.system{...}(argv table, not a shell), and Neovim's argv marshaling truncates a Lua string at its first NUL before the child ever sees it:So a ref containing
\0is accepted, stored/displayed in full by the lockfile and:ArtiPackList, but the archive actually fetched corresponds to the truncated prefix — a real mismatch between what's validated and what's fetched. Not a shell-injection vector (no shell involved), and it's pre-existing fortagtoo (not introduced here), but the PR's own framing — "the same rules ... apply" to branch, validated the same way as tag — implies NUL is covered and it isn't. Worth aname:find('%z')check (or#name ~= #name:gsub('%z','')) alongside the existing pattern.Minor doc nit: the digest is
sha256(base64(bytes)), clearly commented infs.luaas "not the file's sha256sum," but README/help only say "a digest of the archive" — worth one line there too so nobody diffs it againstsha256sumand reports a false mismatch.