Skip to content
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

Rework shared commit editors #24274

Merged
merged 13 commits into from
Feb 5, 2025
Merged

Conversation

SomeoneToIgnore
Copy link
Contributor

Rework of #24130
Uses https://github.com/d1y/git_firefly/tree/1033c0b57ec88a002cb68efc64c8d9bf5c212e30 COMMIT_EDITMSG language-related definitions (thanks @d1y )

Instead of using real .git/COMMIT_EDITMSG file, create a buffer without FS representation, stored in the Repository and shared the regular way via the BufferStore.
Adds a knowledge of what Git Commit language is, and uses it in the buffers which are rendered in the git panel.

Release Notes:

  • N/A

SomeoneToIgnore and others added 10 commits February 5, 2025 16:13
* Do load COMMIT_EDITMSG contents to ensure regular git commit flow with `editor = zed --wait` is not broken.
* Only update the commit editor on git repo changes
* Always clean commit editor's in-memory contents when updating the editor

# Conflicts:
#	crates/git_ui/src/git_panel.rs
Uses https://github.com/d1y/git_firefly/tree/1033c0b57ec88a002cb68efc64c8d9bf5c212e30 language-related definitions

co-authored-by: Conrad Irwin <conrad@zed.dev>
co-authored-by: d1y <chenhonzhou@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 5, 2025
@SomeoneToIgnore SomeoneToIgnore changed the title Kb/better empty commit messages Rework shared commit editors Feb 5, 2025
@SomeoneToIgnore SomeoneToIgnore force-pushed the kb/better-empty-commit-messages branch from 71236bd to d4d38fb Compare February 5, 2025 15:15
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) February 5, 2025 15:22
@SomeoneToIgnore SomeoneToIgnore merged commit 868e3f7 into main Feb 5, 2025
12 checks passed
@SomeoneToIgnore SomeoneToIgnore deleted the kb/better-empty-commit-messages branch February 5, 2025 15:36
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this pull request Feb 5, 2025
Rework of zed-industries#24130
Uses
https://github.com/d1y/git_firefly/tree/1033c0b57ec88a002cb68efc64c8d9bf5c212e30
`COMMIT_EDITMSG` language-related definitions (thanks @d1y )

Instead of using real `.git/COMMIT_EDITMSG` file, create a buffer
without FS representation, stored in the `Repository` and shared the
regular way via the `BufferStore`.
Adds a knowledge of what `Git Commit` language is, and uses it in the
buffers which are rendered in the git panel.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: d1y <chenhonzhou@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant