Add fetch_interval config to prevent repeated fetches#29
Conversation
Adds a configurable minimum interval between fetches (default: 5m). When a fetch was performed recently, subsequent commands skip fetching and print "Skipping fetch (last fetch Xs ago)" instead. - fetch_interval config option with Go duration format (e.g., "5m", "1h") - Last fetch time stored per-remote in .git/wt-last-fetch-<remote> - Setting interval to "0" disables caching (always fetch) - Works in list, cleanup, and delete commands Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR implements fetch throttling for remote repositories by introducing a configurable Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (1)**/*.go📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (3)internal/commands/delete.go (1)
internal/commands/compare.go (1)
internal/commands/config.go (1)
🔇 Additional comments (13)
✏️ Tip: You can disable this entire section by setting Comment |
Summary
fetch_intervalconfig option to set minimum time between fetches (default: 5m).git/wt-last-fetch-<remote>Test plan
wt config --global fetch_interval 1msets the intervalwt listfetches and prints "Fetched from origin"wt listagain within 1m prints "Skipping fetch (last fetch Xs ago)"wt config fetch_interval 0disables caching for current repowt config --show-origindisplays fetch_interval with source🤖 Generated with Claude Code
Summary by CodeRabbit
fetch_intervalconfiguration to control how often remote repositories are fetched (default: 5 minutes).✏️ Tip: You can customize this high-level summary in your review settings.