From: Aniket Gupta <aniketgupta3001@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] fast-import: fix lookup for new commits
Date: Sun, 11 Oct 2026 19:38:55 +0000 [thread overview]
Message-ID: <20261011193855.43162-1-aniketgupta3001@gmail.com> (raw)
In-Reply-To: <pull.2252.git.1791653078449.gitgitgadget@gmail.com>
Hello Marc,
Sorry for the noise, my first mail lost its In-Reply-To header on the
way, so it is not in this thread. Resending the same review here.
I tried this on top of 6de20f609 with DEVELOPER=1 and did not get warnings.
> Queries for commits created during the same 'git fast-import' session
> result in a crash:
> < reset refs/heads/newbranch
> < from <new-commit-oid>
> > fatal: not a valid commit: <new-commit-oid>
I was able to repro this. With the patch fsck is clean and it works
nicely. Same goes for "commit" with "from <new-oid>", a tag made in
the same session, and a tag of a tag. Existing commits and tags and
"from <blob>" behave like before.
One small nitpick: there is a double space in "'git fast-import' session".
> to avoid crash and (eventually) improve lookup speed.
Did you measure this? If not, maybe drop it or say it is only a
possible side effect.
> +static struct object_entry *dereference(struct object_entry *oe, struct object_id *oid);
This is over 80 columns, can it be wrapped like the definition?
> builtin/fast-import.c | 18 ++++++++++++++----
I could not find a test for this. Can you add one to t9300? You can
get the new oid with get-mark and use it in a "reset ... from <oid>"
in the same stream.
Thanks,
Aniket
next prev parent reply other threads:[~2026-10-11 19:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 17:24 [PATCH] fast-import: fix lookup for new commits Marc Becker via GitGitGadget
2026-10-11 19:38 ` Aniket Gupta [this message]
2026-10-12 22:50 ` [PATCH v2] fast-import: fix lookup for new commits and tags Marc Becker via GitGitGadget
2026-10-13 0:08 ` Junio C Hamano
2026-10-13 1:39 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2026-10-11 19:22 [PATCH] fast-import: fix lookup for new commits Aniket Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261011193855.43162-1-aniketgupta3001@gmail.com \
--to=aniketgupta3001@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox