-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
project: Change Git repo automatically with change in file buffer #36796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
project: Change Git repo automatically with change in file buffer #36796
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: deeraj.chowdary.
|
ae9e953 to
de4640f
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @rufevean 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! |
cole-miller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rufevean, this seems like a good improvement! There are a couple of changes needed to get it ready to merge:
- I don't think
BufferOpenedis the right event to listen for; we should useWorkspaceEvent::ActiveItemChanged, which is emitted (for example) when you switch to a different tab, whereasBufferOpenedis only opened when you open a new buffer for a file. - When
ActiveItemChangedhappens, we should callWorkspace::active_project_pathto get aProjectPath, and thenGitStore::repository_and_path_for_project_pathto resolve the new active repository.
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Thanks! |
…d-industries#36796) ### Summary * Auto-activates the active repository when opening a buffer. * Prepares branching for future support of a user choice (e.g., `auto_activate_repo_on_open` flag). ### Release Notes * **Improved**: Opening a buffer now automatically updates the active repository.
Summary
auto_activate_repo_on_openflag).Release Notes