git: Add git stash picker (#35927)
Closes #ISSUE This PR continues work from #32821 by adding a stash entry picker for pop/drop operations. Additionally, the stash pop action in the git panel is now disabled when no stash entries exist, preventing error logs from attempted pops on empty stashes. Preview: <img width="1920" height="1256" alt="Screenshot From 2025-09-11 14-08-31" src="https://github.com/user-attachments/assets/b2f32974-8c69-4e50-8951-24ab2cf93c12" /> <img width="1920" height="1256" alt="Screenshot From 2025-09-11 14-08-12" src="https://github.com/user-attachments/assets/992ce237-43c9-456e-979c-c2e2149d633e" /> Release Notes: - Added a stash picker to pop and drop a specific stash entry - Disabled the stash pop action on the git panel when no stash entries exist - Added git stash apply command - Added git stash drop command
This commit is contained in:
@@ -320,6 +320,10 @@ impl GitRepository for FakeGitRepository {
|
||||
})
|
||||
}
|
||||
|
||||
fn stash_entries(&self) -> BoxFuture<'_, Result<git::stash::GitStash>> {
|
||||
async { Ok(git::stash::GitStash::default()) }.boxed()
|
||||
}
|
||||
|
||||
fn branches(&self) -> BoxFuture<'_, Result<Vec<Branch>>> {
|
||||
self.with_state_async(false, move |state| {
|
||||
let current_branch = &state.current_branch_name;
|
||||
@@ -412,7 +416,27 @@ impl GitRepository for FakeGitRepository {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn stash_pop(&self, _env: Arc<HashMap<String, String>>) -> BoxFuture<'_, Result<()>> {
|
||||
fn stash_pop(
|
||||
&self,
|
||||
_index: Option<usize>,
|
||||
_env: Arc<HashMap<String, String>>,
|
||||
) -> BoxFuture<'_, Result<()>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn stash_apply(
|
||||
&self,
|
||||
_index: Option<usize>,
|
||||
_env: Arc<HashMap<String, String>>,
|
||||
) -> BoxFuture<'_, Result<()>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn stash_drop(
|
||||
&self,
|
||||
_index: Option<usize>,
|
||||
_env: Arc<HashMap<String, String>>,
|
||||
) -> BoxFuture<'_, Result<()>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user