{"record":{"id":"321580bb34aa0140","repo":"zed-industries/zed","slug":"invalid-git-commit-url-missing-sha","errorCode":null,"errorMessage":"invalid git commit url: missing sha","messagePattern":"invalid git commit url: missing sha","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zed/src/zed/open_listener.rs","lineNumber":268,"sourceCode":"\n        let repo_url = url::form_urlencoded::parse(query.as_bytes())\n            .find_map(|(key, value)| (key == \"repo\").then_some(value))\n            .filter(|s| !s.is_empty())\n            .context(\"invalid git clone url: missing repo query parameter\")?\n            .to_string()\n            .into();\n\n        self.kind = Some(OpenRequestKind::GitClone { repo_url });\n\n        Ok(())\n    }\n\n    fn parse_git_commit_url(&mut self, commit_path: &str) -> Result<()> {\n        // Format: <sha>?repo=<path>\n        let (sha, query) = commit_path\n            .split_once('?')\n            .context(\"invalid git commit url: missing query string\")?;\n        anyhow::ensure!(!sha.is_empty(), \"invalid git commit url: missing sha\");\n\n        let repo = url::form_urlencoded::parse(query.as_bytes())\n            .find_map(|(key, value)| (key == \"repo\").then_some(value))\n            .filter(|s| !s.is_empty())\n            .context(\"invalid git commit url: missing repo query parameter\")?\n            .to_string();\n\n        self.open_paths.push(repo);\n\n        self.kind = Some(OpenRequestKind::GitCommit {\n            sha: sha.to_string(),\n        });\n\n        Ok(())\n    }\n\n    fn parse_ssh_file_path(&mut self, file: &str, cx: &App) -> Result<()> {\n        let url = parse_ssh_url(file)?;","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/zed/src/zed/open_listener.rs#L250-L286","documentation":"Raised in parse_git_commit_url while parsing a zed://.../git-commit URL: the path before the `?` did not split into a commit sha (missing or empty part before the query). The URL's commit_path argument is malformed, so the open request cannot be built.","triggerScenarios":"Thrown at crates/zed/src/zed/open_listener.rs:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a well-formed commit URL: zed://commit/<sha>?repo=<path>"],"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-14T00:17:10.932Z"}