{"record":{"id":"7e28915b18b20c82","repo":"zed-industries/zed","slug":"stash-has-changed-pop-aborted","errorCode":null,"errorMessage":"Stash has changed, pop aborted","messagePattern":"Stash has changed, pop aborted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/git_ui/src/commit_view.rs","lineNumber":807,"sourceCode":"                        return Err(err);\n                    }\n                };\n                Self::close_commit_view(commit_view, workspace, cx).await?;\n                anyhow::Ok(())\n            },\n        );\n    }\n\n    fn pop_stash(workspace: &mut Workspace, window: &mut Window, cx: &mut App) {\n        Self::stash_action(\n            workspace,\n            \"Pop\",\n            window,\n            cx,\n            async move |repository, sha, stash, commit_view, workspace, cx| {\n                let result = repository.update(cx, |repo, cx| {\n                    if !stash_matches_index(&sha, stash, repo) {\n                        return Err(anyhow::anyhow!(\"Stash has changed, pop aborted\"));\n                    }\n                    Ok(repo.stash_pop(Some(stash), cx))\n                });\n\n                match result {\n                    Ok(task) => task.await?,\n                    Err(err) => {\n                        Self::close_commit_view(commit_view, workspace, cx).await?;\n                        return Err(err);\n                    }\n                };\n                Self::close_commit_view(commit_view, workspace, cx).await?;\n                anyhow::Ok(())\n            },\n        );\n    }\n\n    fn remove_stash(workspace: &mut Workspace, window: &mut Window, cx: &mut App) {","sourceCodeStart":789,"sourceCodeEnd":825,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/git_ui/src/commit_view.rs#L789-L825","documentation":"Guard in the commit view's pop_stash action: stash_matches_index fails because the stash list changed since the user opened the dialog (stashes dropped/created elsewhere), so the recorded stash no longer matches. The pop is aborted to avoid popping the wrong stash.","triggerScenarios":"Thrown at crates/git_ui/src/commit_view.rs:807 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Abort the pop and notify the user the stash changed","Refresh the stash list and re-render the view","Let the user re-select and re-run pop on the current entry","Keep the stash entry untouched to avoid silent data loss"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}