{"record":{"id":"0e5a59986338c471","repo":"xai-org/grok-build","slug":"git-copy-thread-panicked","errorCode":null,"errorMessage":".git/ copy thread panicked: {}","messagePattern":"\\.git/ copy thread panicked: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-fast-worktree/src/worktree/execute.rs","lineNumber":59,"sourceCode":"}\n\nimpl Drop for PartialWorktreeGuard<'_> {\n    fn drop(&mut self) {\n        if self.armed {\n            reclaim_partial_worktree(self.dest);\n        }\n    }\n}\n\n/// Join the standalone `.git/` copy thread, flattening a thread panic and the\n/// inner copy error into a single `anyhow::Error`.\nfn join_git_copy(\n    handle: std::thread::JoinHandle<Result<crate::copy::gitdir::GitDirCopyStats>>,\n) -> Result<crate::copy::gitdir::GitDirCopyStats> {\n    handle\n        .join()\n        .map_err(|e| {\n            anyhow::anyhow!(\n                \".git/ copy thread panicked: {}\",\n                e.downcast_ref::<String>()\n                    .map(|s| s.as_str())\n                    .or_else(|| e.downcast_ref::<&str>().copied())\n                    .unwrap_or(\"unknown panic\")\n            )\n        })?\n        .context(\"failed to copy .git/ directory\")\n}\n\n/// Lock files (`*.lock`) and transient git state to remove from snapshots.\n///\n/// BTRFS and overlay snapshots capture the source tree atomically, including\n/// stale lock files and in-progress operation state that would be poisonous\n/// in the new worktree (e.g., a stale `index.lock` blocks every git operation).\n///\n/// This mirrors the skip list in `copy::gitdir::SKIP_TOP_LEVEL` +\n/// `copy::gitdir::should_skip()` so that snapshot-based worktrees get the","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-fast-worktree/src/worktree/execute.rs#L41-L77","documentation":"Error \".git/ copy thread panicked: {}\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-fast-worktree/src/worktree/execute.rs:59 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":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}