feat: add parsec diff to view worktree changes#44
Merged
Conversation
Add `parsec diff` command that shows the diff between a worktree branch and its base branch using merge-base for accurate comparison. Supports --stat, --name-only, and --json output modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
parsec diffcommand to view changes in a worktree compared to its base branch using merge-base--statfor file-level summary and--name-onlyfor changed file names--jsonsupport for machine-readable output of changed filesChanges
src/cli/mod.rsDiffvariant toCommandenum + routing inrun()src/cli/commands.rsdiff()command handler with merge-base comparisonsrc/output/mod.rsprint_diff_names,print_diff_stat,print_diff_full_jsondispatcherssrc/output/human.rssrc/output/json.rsREADME.mdparsec diffdocumentation sectiondocs/index.htmlTest plan
parsec diffinside a worktree shows full colored diff vs base branchparsec diff TICKETshows diff for a specific ticket's worktreeparsec diff --statshows file-level summaryparsec diff --name-onlylists changed file namesparsec diff --jsonoutputs JSON with changed files and statusesparsec diffoutside a worktree without ticket shows helpful errorcargo fmt && cargo build && cargo clippypasses cleanCloses #41