Skip to content

fix: display CLI file lists relative to workdir - #41

Merged
bcomnes merged 1 commit into
masterfrom
fix/relative-cli-file-lists
Oct 7, 2026
Merged

bcomnes merged 1 commit into
masterfrom
fix/relative-cli-file-lists

Conversation

@bcomnes

@bcomnes bcomnes commented Oct 7, 2026

Copy link
Copy Markdown
Owner
  • Fixes Display relative paths in version bump file lists #40 by displaying normal and dry-run CLI file lists relative to the effective WorkDir, defaulting to cwd and preserving ../ paths for explicitly selected files outside that directory.
  • Keep this presentation-only: preserve internal path handling and the library's VersionMeta.UpdatedFiles contract, with the original path retained if a relative path cannot be computed.
  • Add CLI regression coverage for default cwd, relative and absolute -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 and HEAD.
  • Validation passed: gofmt on changed Go files, go test . -run 'TestVersionCommand|TestVersionSkipDocs' -count=1, go test ./..., go test -race ./..., go vet ./..., go build ./..., and git diff --check.

@bcomnes
bcomnes marked this pull request as ready for review October 7, 2026 00:36
@bcomnes
bcomnes requested a balanced review from Copilot October 7, 2026 00:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bcomnes
bcomnes merged commit 4b94dbc into master Oct 7, 2026
11 checks passed
@bcomnes
bcomnes deleted the fix/relative-cli-file-lists branch October 7, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display relative paths in version bump file lists

2 participants