Commit Graph
9 Commits
Author SHA1 Message Date
Willie f2f663689b fix(install): warn about submodules on tracked updates
The CLI and dashboard update a tracked repo through update.TrackedRepo,
which never looked for submodules. A pull that turned a skill directory
into a submodule reported success and the skill vanished on the next
sync. TrackedRepoResult now carries the skipped-submodule warnings and
both callers show them.

Refs #433
2026-10-07 09:35:59 +08:00
Willie 79bb10658a fix(install): strip submodule URL userinfo before query and fragment
A ? or # inside the userinfo used to cut away the @ before it was found, leaving the credential in place.
2026-10-07 02:40:48 +08:00
Willie b1b5bcc375 fix(install): fail closed when submodules cannot be listed and warn on tracked updates
A failed or timed-out git ls-tree used to look like a repo without submodules, letting an empty submodule path through; the refusal check now reports the failure while warnings stay best effort. Tracked updates also warn about submodules in the pulled tree.
2026-10-07 02:36:44 +08:00
Willie 6607b82e2b fix(install): escape submodule diagnostics and match ancestors by filesystem identity
Gitlink paths and .gitmodules URLs come from an untrusted repo, so quote them with %q to keep newlines and terminal escapes out of CLI output. Compare each ancestor of the subdir with the gitlink directory by os.SameFile instead of a byte-length prefix, so case and Unicode-normalization variants that open the same directory are caught.
2026-10-07 02:29:48 +08:00
Willie 39a6241b33 fix(install): refuse tracked submodule paths and fold case only where the filesystem does
A --track install with an explicit kind skips discovery, so check the subdir after the tracked clone and remove it on refusal. Match a case variant of a gitlink path only when it opens the same directory, so Linux keeps a real Vendor/Up next to a vendor/up gitlink. Strip everything before the last @ in a submodule URL so malformed and scheme-relative values fail closed.
2026-10-07 02:22:10 +08:00
Willie f1900251d3 fix(install): match submodule paths case-insensitively and warn on search installs
On Windows and macOS a case variant such as Vendor/Up opens the empty submodule checkout, so compare gitlink paths with EqualFold. Search results that install straight from discovery now show its warnings too.
2026-10-07 02:15:21 +08:00
Willie cdac248e96 fix(install): strip secrets from any submodule URL and show warnings in the dashboard
Redact query, fragment and userinfo from relative, scp-style and malformed .gitmodules URLs too, clean the subdir before matching gitlinks so vendor//up is caught, and return discovery warnings from /api/discover so the install dialog shows skipped submodules.
2026-10-07 02:10:03 +08:00
Willie e4b72cb554 fix(install): hide credentials in submodule URLs shown to the user
.gitmodules may hold an authenticated URL; drop userinfo, query and fragment before it reaches warnings, errors or API responses.
2026-10-07 02:03:26 +08:00
Willie b7265d6496 fix(install): refuse git submodule paths instead of installing empty dirs
skillshare never fetches submodules, so a gitlink is an empty directory
after any clone. Installing that path reported success with nothing in
it, a path inside it failed with a misleading "does not exist", and
whole-repo discovery dropped its skills without a word.

Refuse a subdir that is or lies inside a submodule, naming the
submodule, its pinned commit and upstream URL, and warn for each
submodule skipped by whole-repo discovery and --track.

Refs #433

Release-As: 0.25.1
2026-10-07 01:58:59 +08:00