{"record":{"id":"d9723abb62fa2412","repo":"phacility/phabricator","slug":"unexpected-git-upload-pack-protocol-frame-expec","errorCode":null,"errorMessage":"Unexpected \"git upload-pack\" protocol frame: expected \"<hash> <name>\\n\", or \"shallow <hash>\\n\", got \"%s\".","messagePattern":"Unexpected \"git upload-pack\" protocol frame: expected \"<hash> <name>\\\\n\", or \"shallow <hash>\\\\n\", got \"(.+?)\"\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php","lineNumber":234,"sourceCode":"            '|'.\n            'shallow (?P<shallow>[0-9a-f]{40})'.\n          ')'.\n          '\\n'.\n          '\\z'.\n        ')',\n        $bytes,\n        $matches);\n\n      if (!$ok) {\n        if ($is_first) {\n          throw new Exception(\n            pht(\n              'Unexpected \"git upload-pack\" initial protocol frame: expected '.\n              '\"<hash> <name>\\0<capabilities>\\n\", or '.\n              '\"shallow <hash>\\n\", got \"%s\".',\n              $bytes));\n        } else {\n          throw new Exception(\n            pht(\n              'Unexpected \"git upload-pack\" protocol frame: expected '.\n              '\"<hash> <name>\\n\", or \"shallow <hash>\\n\", got \"%s\".',\n              $bytes));\n        }\n      }\n\n      if (isset($matches['shallow'])) {\n        $name = null;\n        $hash = $matches['shallow'];\n        $is_shallow = true;\n      } else {\n        $name = $matches['name'];\n        $hash = $matches['hash'];\n        $is_shallow = false;\n      }\n\n      if (isset($matches['capabilities'])) {","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php#L216-L252","documentation":"Error \"Unexpected \"git upload-pack\" protocol frame: expected \"<hash> <name>\\n\", or \"shallow <hash>\\n\", got \"%s\".\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/diffusion/protocol/DiffusionGitUploadPackWireProtocol.php:234 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":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}