Ensure stale git commit template are not persisted (#63604)

## Objective

Fixes #63478

Git commit templates were being persisted as pending commit message
drafts. As a result, if the commit template changed, the previously
applied template could be restored after restarting Zed instead of
loading the updated template.

## Solution

Do not persist the active commit message buffer as a draft when its
contents exactly match the currently applied commit template.

This preserves the existing behavior for genuine user drafts while
allowing the current commit template to be loaded when the panel is
restored.

## Testing

Added tests covering:

* Applying a new commit template after the template changes and the
panel is restored.
* Preserving a user-edited commit message when the commit template
changes.

Validated with:

* `cargo test -p git_ui --
test_commit_template_applied_fresh_after_template_file_change
test_user_draft_preserved_when_template_changes --nocapture`
* `cargo fmt -p git_ui`
* `cargo check -p git_ui`
* `cargo test -p git_ui --lib`
* `cargo clippy -p git_ui --tests -- -D warnings`

## Self-Review Checklist

* [x] I've reviewed my own diff for quality, security, and reliability
* [x] Unsafe blocks (if any) have justifying comments
* [x] The content adheres to Zed's UI standards
* [x] Tests cover the new/changed behavior
* [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed stale git commit templates being restored as pending commit
message drafts.

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
dbfeae7735Sk Akram committed on 9/2/2026, 2:15:00 PM· committed by GitHubparent480d81b
1 file changedLine totals unavailable