Improve when the commit suggestions would show (#26313)

Release Notes:

- Git Beta: Fixed a few bugs where the suggested commit text wouldn't
show in certain cases, or would update slowly.
This commit is contained in:
Mikayla Maki 2025-03-07 15:33:48 -08:00 committed by GitHub
parent e70d0edfac
commit f6345a6995
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 180 additions and 89 deletions

View file

@ -1353,7 +1353,7 @@ impl Repository {
let to_stage = self
.repository_entry
.status()
.filter(|entry| !entry.status.is_staged().unwrap_or(false))
.filter(|entry| !entry.status.staging().is_fully_staged())
.map(|entry| entry.repo_path.clone())
.collect();
self.stage_entries(to_stage, cx)
@ -1363,7 +1363,7 @@ impl Repository {
let to_unstage = self
.repository_entry
.status()
.filter(|entry| entry.status.is_staged().unwrap_or(true))
.filter(|entry| entry.status.staging().has_staged())
.map(|entry| entry.repo_path.clone())
.collect();
self.unstage_entries(to_unstage, cx)