git: Enable git stash in git panel (#32821)
Related discussion #31484 Release Notes: - Added a menu entry on the git panel to git stash and git pop stash. Preview:  --------- Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
parent
4d00d07df1
commit
07252c3309
10 changed files with 290 additions and 2 deletions
|
@ -114,6 +114,22 @@ pub fn init(cx: &mut App) {
|
|||
});
|
||||
});
|
||||
}
|
||||
workspace.register_action(|workspace, action: &git::StashAll, window, cx| {
|
||||
let Some(panel) = workspace.panel::<git_panel::GitPanel>(cx) else {
|
||||
return;
|
||||
};
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.stash_all(action, window, cx);
|
||||
});
|
||||
});
|
||||
workspace.register_action(|workspace, action: &git::StashPop, window, cx| {
|
||||
let Some(panel) = workspace.panel::<git_panel::GitPanel>(cx) else {
|
||||
return;
|
||||
};
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.stash_pop(action, window, cx);
|
||||
});
|
||||
});
|
||||
workspace.register_action(|workspace, action: &git::StageAll, window, cx| {
|
||||
let Some(panel) = workspace.panel::<git_panel::GitPanel>(cx) else {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue