Skip to content

Require clean working tree for apply and add --dry-run flag#99

Merged
that-github-user merged 1 commit into
mainfrom
issue-63-clean-worktree
Mar 28, 2026
Merged

Require clean working tree for apply and add --dry-run flag#99
that-github-user merged 1 commit into
mainfrom
issue-63-clean-worktree

Conversation

@that-github-user

Copy link
Copy Markdown
Owner

Summary

  • Checks for uncommitted changes before applying (actionable error message)
  • --dry-run flag shows what would be applied without modifying the working tree
  • 4 new tests for dirty tree detection and dry-run mode

Generated by thinktank Opus — 5 agents, all pass, Agent #4 recommended (132.78 score).

Change type

  • New feature

Related issue

Closes #63

How to test

npm test  # 91 tests pass
# With dirty tree:
echo "dirty" >> README.md && thinktank apply  # Should error
git checkout README.md  # Clean up
thinktank apply --dry-run  # Shows diff without applying

Breaking changes

  • This PR introduces breaking changes

🤖 Generated with thinktank (Opus)

- Check git status --porcelain before applying; exit with actionable
  message if uncommitted changes exist
- --dry-run flag shows what would be applied without modifying files
- 4 new tests for dirty tree detection and dry-run behavior

Generated by thinktank Opus (5 agents, all pass, Agent #4 recommended).

Closes #63

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user

Copy link
Copy Markdown
Owner Author

Self-review: Dirty tree check uses git status --porcelain (empty = clean). --dry-run reuses preview display logic. Error message tells user to commit or stash. 91 tests pass, CI green.

@that-github-user that-github-user merged commit a6a0da6 into main Mar 28, 2026
4 checks passed
@that-github-user that-github-user deleted the issue-63-clean-worktree branch March 28, 2026 20:36
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.

Require clean working tree and add --dry-run to apply command

1 participant