{"record":{"id":"a2a15ef8eb0bebc9","repo":"cline/cline","slug":"invalid-git-ref-parsed-ref","errorCode":null,"errorMessage":"Invalid git ref \"${parsed.ref}\".","messagePattern":"Invalid git ref \"(.+?)\"\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdk/packages/core/src/services/plugin-install.ts","lineNumber":817,"sourceCode":"\t\t\t\"install\",\n\t\t\t\"--omit=dev\",\n\t\t\t\"--omit=peer\",\n\t\t\t\"--legacy-peer-deps\",\n\t\t\t\"--no-audit\",\n\t\t\t\"--no-fund\",\n\t\t\t\"--package-lock=false\",\n\t\t],\n\t\t{ cwd: packageRoot },\n\t);\n}\n\nasync function installGitPackage(\n\tparsed: Extract<ParsedPluginSource, { type: \"git\" }>,\n\tstagingRoot: string,\n\tnpmCommand: string,\n): Promise<string> {\n\tif (parsed.ref?.startsWith(\"-\")) {\n\t\tthrow new Error(`Invalid git ref \"${parsed.ref}\".`);\n\t}\n\tconst packageRoot = join(stagingRoot, PACKAGE_DIRECTORY_NAME);\n\tconst cloneArgs = [\"clone\", \"--filter=blob:none\"];\n\tif (parsed.ref) {\n\t\tcloneArgs.push(\"--branch\", parsed.ref);\n\t}\n\tcloneArgs.push(\"--\", parsed.repo, packageRoot);\n\ttry {\n\t\tawait runCommand(\"git\", cloneArgs);\n\t} catch (error) {\n\t\tif (!parsed.ref) {\n\t\t\tthrow error;\n\t\t}\n\t\tawait runCommand(\"git\", [\n\t\t\t\"clone\",\n\t\t\t\"--filter=blob:none\",\n\t\t\t\"--\",\n\t\t\tparsed.repo,","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/cline/cline/blob/491b30b806fdb8c93513f821f2b87d63a61542f5/sdk/packages/core/src/services/plugin-install.ts#L799-L835","documentation":"Error \"Invalid git ref \"${parsed.ref}\".\" thrown in cline/cline.","triggerScenarios":"Thrown at sdk/packages/core/src/services/plugin-install.ts:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"491b30b806fdb8c93513f821f2b87d63a61542f5","analyzedAt":"2026-08-25T13:45:22.367Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}