{
  "id": "git/error-failed-to-read-object-from-odb",
  "signature": "error: failed to read object <hash> from the object database: No such file or directory",
  "signature_zh": "错误：无法从对象数据库读取对象 <hash>：没有那个文件或目录",
  "regex": "error: failed to read object [0-9a-f]+ from the object database: No such file or directory",
  "domain": "git",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A required Git object (commit, tree, or blob) is missing from the .git/objects directory, often due to repository corruption, incomplete clone, or a failed garbage collection.",
  "root_cause_type": "generic",
  "root_cause_zh": "所需的 Git 对象（提交、树或 blob）在 .git/objects 目录中缺失，通常是由于仓库损坏、克隆不完整或垃圾回收失败。",
  "versions": [
    {
      "version": "git 2.28.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.35.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.45.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running git gc --aggressive without first recovering missing objects can permanently delete unreachable objects, making recovery impossible.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using git fsck --lost-found may find dangling objects but does not restore missing referenced objects; it just lists them.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "git fetch origin refs/heads/*:refs/remotes/origin/*  # Fetch all branches from remote to potentially restore missing objects if they exist on the remote",
      "success_rate": 0.7,
      "how": "git fetch origin refs/heads/*:refs/remotes/origin/*  # Fetch all branches from remote to potentially restore missing objects if they exist on the remote",
      "condition": "",
      "sources": []
    },
    {
      "action": "git cat-file -p <hash> 2>/dev/null || (cd /path/to/backup && git cat-file -p <hash>)  # Check if object exists in a backup repo; if so, copy the object file to .git/objects/ab/ directory using the hash prefix",
      "success_rate": 0.5,
      "how": "git cat-file -p <hash> 2>/dev/null || (cd /path/to/backup && git cat-file -p <hash>)  # Check if object exists in a backup repo; if so, copy the object file to .git/objects/ab/ directory using the hash prefix",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "git fetch origin refs/heads/*:refs/remotes/origin/*  # Fetch all branches from remote to potentially restore missing objects if they exist on the remote",
    "git cat-file -p <hash> 2>/dev/null || (cd /path/to/backup && git cat-file -p <hash>)  # Check if object exists in a backup repo; if so, copy the object file to .git/objects/ab/ directory using the hash prefix"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-fsck",
  "official_doc_section": null,
  "error_code": "ENOENT",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.7,
  "resolvable": "partial",
  "first_seen": "2023-11-08",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}