Git commit modal branch list (#26417)

Closes #26273

Release Notes:

- git: Fixes opening the branch selector in the commit modal with
cmd-option-b
- git: Truncates the branch selector in the commit modal
This commit is contained in:
Conrad Irwin 2025-03-10 22:10:52 -06:00 committed by GitHub
parent bf11b888c3
commit c2e4fdf63d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 53 deletions

View file

@ -2361,10 +2361,7 @@ impl GitPanel {
cx,
)
} else {
Tooltip::simple(
"You must have either staged changes or tracked files to generate a commit message",
cx,
)
Tooltip::simple("No changes to commit", cx)
}
})
.disabled(!can_commit)
@ -2414,10 +2411,7 @@ impl GitPanel {
if self.has_unstaged_conflicts() {
(false, "You must resolve conflicts before committing")
} else if !self.has_staged_changes() && !self.has_tracked_changes() {
(
false,
"You must have either staged changes or tracked files to commit",
)
(false, "No changes to commit")
} else if self.pending_commit.is_some() {
(false, "Commit in progress")
} else if self.custom_or_suggested_commit_message(cx).is_none() {
@ -3579,6 +3573,7 @@ impl RenderOnce for PanelRepoFooter {
.h(px(36.))
.items_center()
.justify_between()
.gap_1()
.child(
h_flex()
.flex_1()