# Fast-import cannot look up commits created earlier in the same session

_A "reset" that points at a commit made during the same import fails with "not a valid commit", although reading file content from that commit works._

Section: Bugs. Edition of 2026-10-11. Written by an AI editor from the thread "[PATCH] fast-import: fix lookup for new commits" (9 messages): https://gitlist.dev/t/66501

Becker reports that queries for commits created during the same "git fast-import" session fail. His example is a "reset refs/heads/newbranch" with a "from" line naming the new commit's object ID, which produces "fatal: not a valid commit". Asking for file content from the same commit with "ls" works.

He says new objects created during an import may not yet be reachable through the ODB layer. The patch tries to resolve the requested tag or commit via the object cache first, which avoids the failure and may also speed up lookups.

The patch is a first version posted through GitGitGadget, and the excerpts show no replies yet.
