fix: diff shows files as deleted when run from subdirectory - #120
fix: diff shows files as deleted when run from subdirectory#120jossephus wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughAdds a repo_root() accessor to the VcsBackend trait and implements it for Git and Jj backends. Updates get_new_content in the git diff command to resolve working-tree file reads relative to the repository root when available, and adds a test for reading from a subdirectory. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bf4b120 to
4b8df9f
Compare
|
Might be related to: #110 |
|
oh sorry, i didnt see that. closing mine in favor of your PR since urs look complete. Thanks for letting me now |
Running
lumen difffrom a subdirectory incorrectly showed modified files as deleted.The issue was that file paths were resolved relative to the current working directory instead of the repository root. This fix adds
repo_root()toVcsBackendand uses it to resolve paths correctly.see before and after when running 'lumen diff' inside lumen/src
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.