Repository navigation
fix: display CLI file lists relative to workdir - #41
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the stated presentation-only behavior and includes comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
This PR makes CLI file lists relative to the effective working directory without changing library metadata paths.
Changes:
- Relativizes normal and dry-run file output.
- Adds coverage for workdir variants and outside files.
- Updates existing CLI expectations.
| File | Description |
|---|---|
version_cli.go |
Relativizes displayed paths. |
version_workdir_test.go |
Adds workdir regression coverage. |
version_skip_docs_test.go |
Updates expected CLI paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WorkDir, defaulting to cwd and preserving../paths for explicitly selected files outside that directory.VersionMeta.UpdatedFilescontract, with the original path retained if a relative path cannot be computed.-workdir, nested module paths, and relative and absolute explicit files outside the working directory; update existing CLI assertions to expect relative paths and verify dry runs preserve file contents andHEAD.gofmton changed Go files,go test . -run 'TestVersionCommand|TestVersionSkipDocs' -count=1,go test ./...,go test -race ./...,go vet ./...,go build ./..., andgit diff --check.