)]}'
{
  "commit": "c1cdd3151e981064397e0fa72c5e8a830e1f0250",
  "tree": "132d6d17c6a5e13d872238abddfcafede89744de",
  "parents": [
    "a018953688f1b10bddf91bff8747068f5f4746a4"
  ],
  "author": {
    "name": "Marc Becker",
    "email": "becm@gmx.de",
    "time": "Wed Oct 14 21:22:36 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Oct 14 15:40:44 2026 -0700"
  },
  "message": "fast-import: allow \u0027from\u0027 to reference new commits and tags by oid\n\nDuring a \u0027git fast-import\u0027 session, newly created objects are written\nto an in-progress packfile and recorded in fast-import\u0027s internal\nobject table.  Until a \u0027checkpoint\u0027 command or the end of the session\nfinalizes and indexes that packfile, these objects are not visible to\nthe repository\u0027s object database via odb_read_object_peeled().\n\nCommands such as \u0027ls\u0027 (via parse_treeish_dataref() and dereference())\nand \u0027cat-blob\u0027 already account for this when given a hex object name:\nthey look up the object in fast-import\u0027s internal object table with\nfind_object() first and read it from the in-progress packfile with\ngfi_unpack_entry() when its \u0027.pack_id\u0027 is not MAX_PACK_ID.\n\nBy contrast, when \u0027from \u003ccommittish\u003e\u0027 (in a \u0027commit\u0027 or \u0027reset\u0027\ncommand) is given a hex object name instead of a mark or branch name,\nparse_objectish() parses the hex string into \u0027b-\u003eoid\u0027 and calls\nparse_from_existing(), which unconditionally looks up the object via\nodb_read_object_peeled().  If the object is a commit or tag created in\nthe current pack cycle, odb_read_object_peeled() returns NULL and\nfast-import dies with \"fatal: not a valid commit: \u003coid\u003e\".\n\nTeach parse_from_existing() to look up \u0027b-\u003eoid\u0027 with find_object()\nfirst, peel any tag objects in the object table using dereference(),\nand unpack the target commit with gfi_unpack_entry() if it resides in\nthe in-progress packfile, before falling back to\nodb_read_object_peeled() for objects in the repository\u0027s object\ndatabase.\n\nSigned-off-by: Marc Becker \u003cbecm@gmx.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fbd919982c956a6508dc5b41382ae904ed845828",
      "old_mode": 33188,
      "old_path": "builtin/fast-import.c",
      "new_id": "574a03c484dc7bd5d53d368e85e43c5b69f37bef",
      "new_mode": 33188,
      "new_path": "builtin/fast-import.c"
    },
    {
      "type": "modify",
      "old_id": "d9de2ef0d88bc82a9e2c0c1e91b6258ae678b5d2",
      "old_mode": 33261,
      "old_path": "t/t9300-fast-import.sh",
      "new_id": "73c6e3d44858264c24366de96360b8ab38c2c130",
      "new_mode": 33261,
      "new_path": "t/t9300-fast-import.sh"
    }
  ]
}
