{"thread":{"id":"66504","subject":"Re: [PATCH] fast-import: fix lookup for new commits","startedAt":"2026-10-11T19:22:00Z","lastAt":"2026-10-11T19:22:00Z","messageCount":1,"participants":["Aniket Gupta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"554721","messageId":"CAKzR9tBLEzrj-9_LOBwm=rL=yUqqUEBZ_7W+8mhhwKppRO1jyA@mail.gmail.com","threadId":"66504","inReplyTo":null,"subject":"Re: [PATCH] fast-import: fix lookup for new commits","fromName":"Aniket Gupta","fromEmail":"aniketgupta3001@gmail.com","sentAt":"2026-10-11T19:22:00Z","receivedAt":"2026-10-11T19:22:00Z","isPatch":true,"sender":{"key":"aniketgupta3001@gmail.com","avatar":null},"body":"Hello Marc,\n\nI tried this on top of 6de20f609 with DEVELOPER=1 and did not get warnings.\n\n> Queries for commits created during the same 'git fast-import'  session\n> result in a crash:\n>     < reset refs/heads/newbranch\n>     < from <new-commit-oid>\n>     > fatal: not a valid commit: <new-commit-oid>\n\nI was able to repro this. With the patch fsck is clean and it works\nnicely. Same goes for \"commit\" with \"from <new-oid>\", a tag made in\nthe same session, and a tag of a tag. Existing commits and tags and\n\"from <blob>\" behave like before.\n\nOne small nitpick: there is a double space in \"'git fast-import'  session\".\n\n> to avoid crash and (eventually) improve lookup speed.\n\nDid you measure this? If not, maybe drop it or say it is only a\npossible side effect.\n\n> +static struct object_entry *dereference(struct object_entry *oe, struct object_id *oid);\n\nThis is over 80 columns, can it be wrapped like the definition?\n\n>  builtin/fast-import.c | 18 ++++++++++++++----\n\nI could not find a test for this. Can you add one to t9300? You can\nget the new oid with get-mark and use it in a \"reset ... from <oid>\"\nin the same stream.\n\nThanks,\nAniket\n\n"}]}