summaryrefslogtreecommitdiff
path: root/tests/opencode/test-plugin-loading.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-10-22 23:25:30 +0000
committerJesse Vincent <jesse@fsck.com>2026-10-23 00:21:52 +0000
commitde67241e0a8f241b5607f99c3891d5e517e2cf47 (patch)
treec77941185b9c21d1c3dc8ef219429c7523d6555c /tests/opencode/test-plugin-loading.sh
parent614d80c29a4ad0c0fffb8c49ce5fc5b8afa0bf42 (diff)
fix(sdd): one no-repo message that puts "run from your working tree" first
sdd-repo's no-repository message told every caller to run 'git init'. That is the right fix for a new project, but the other way to reach it is standing in the wrong directory, such as the plugin's own skill directory after reading "from this skill's directory" literally. There, 'git init' would turn the plugin cache into a repository and hide the real mistake. task-start and task-done were worse. They still read HEAD and BASE in the bare cwd while the brief and ledger went through sdd-repo. From a non-repo cwd with the plan in a repo that has commits, task-start wrote the brief into the plan's repo, then printed git's fatal plus "HEAD has no commit yet ... make an initial commit first" and exited 2. task-done printed git's fatal. review-package in a repo with no commit said "bad BASE: HEAD~1". Every helper that can hit this (sdd-workspace, task-brief, review-package, task-start, task-done) now stops with the same message from sdd-repo, naming the current directory and offering init-and-commit only as the new-project case: SDD scripts must run from inside the git working tree you're executing in, with at least one commit (current directory: <PWD>). If this is a new project, run 'git init' and make a first commit, then rerun. sdd-repo gains --with-commit, which also refuses a repository whose HEAD has no commit. review-package, task-start and task-done pass it because they need HEAD as a BASE or a review range; sdd-workspace and task-brief do not, so a brief can still be written right after git init. task-start and task-done now read HEAD and BASE with git -C in the repository sdd-repo names. Resolution is otherwise unchanged: the cwd's repo, else the plan's, else exit 2. sdd-repo is now executable like its siblings. Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions