Add 'Diff With Commit' action#44467
Conversation
This change introduces a new action, 'Diff with Commit', which allows users to view the differences between the current file and a selected commit. It implements the `show_file` method in the `GitRepository` trait and its implementations, enabling retrieval of file content at a specific commit. A new `CommitDiffPicker` is added to facilitate commit selection and display the diff in a dedicated view.
|
We require contributors to sign our Contributor License Agreement, and we don't have @davidbonan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hi, thanks for opening a PR! I think this will be easier to review and hopefully get merged if you can break it up into smaller pieces. In particular, the commit picker seems like a useful feature in its own right (to start out with, selecting an entry could just show the diff from that commit for the entire project, using the existing |
|
Closing due to lack of response, but I like the idea of the commit picker, please feel free to reopen with that as the focus! |
Summary
Add a new command "git: Diff With Commit" that allows users to compare the current version of a file with any previous commit that modified it.
Features
Implementation
gitdiff.mov
Release Notes: