git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] fast-import: allow 'from' to reference new commits and tags by oid

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 14, 2026, 19:36 UTC
Message-ID
<xmqqmrsgqdl7.fsf@gitster.g>
In-Reply-To
<pull.2252.v3.git.1791995252623.gitgitgadget@gmail.com>
"Marc Becker via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 15 quoted lines
> diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
> index d9de2ef0d8..9001e2572a 100755
> --- a/t/t9300-fast-import.sh
> +++ b/t/t9300-fast-import.sh
> @@ -3938,4 +3938,47 @@ test_expect_success 'Y: rewrite submodules' '
>  	)
>  '
>  
> +test_expect_success 'Y: reference pending tag or commit' '
> +	test_oid_cache <<-EOF &&
> +		pending_commit sha1:85b46dd918355ff17b4109ec738723d42f235a04
> +		pending_commit sha256:17e650f097a4db6fe069c96935360d3ccc9b35c4018728c5f311a4217c2ced3d
> +		pending_tag sha1:ec6c4db71feb5f66615214dad2324ce030e777a7
> +		pending_tag sha256:85edc5eac315bc680677b2fc71622bd77476f057eb8dc8ed6a497803a24f1f46
> +		EOF
Looking at the output from
    $ git grep -A4 'test_oid_cache <<' t

tells us that here-doc used in the above is indented by one level too deep. I will leave checking how the "git fast-import <<-EOF" should be written as an exercise to the reader ;-)

Thanks.
Show 11 quoted lines
> +	git init reference-pending &&
> +	(
> +		cd reference-pending &&
> +		git fast-import <<-EOF
> +			commit refs/heads/main
> +			committer A U Thor <author@example.com> 1712563200 +0000
> + ...
> +			done
> +			EOF
> +	)
> +'
Previous: Marc Becker via GitGitGadgetNext: Marc Becker via GitGitGadget
Message 7 of 9 in “fast-import: fix lookup for new commits”
  1. fast-import: fix lookup for new commitsMarc Becker via GitGitGadget, Oct 10, 2026
  2. Aniket GuptaOct 11, 2026
  3. fast-import: fix lookup for new commits and tagsMarc Becker via GitGitGadget, Oct 12, 2026
  4. Junio C HamanoOct 13, 2026
  5. Junio C HamanoOct 13, 2026
  6. fast-import: allow 'from' to reference new commits and tags by oidMarc Becker via GitGitGadget, Oct 14, 2026
  7. Junio C HamanoOct 14, 2026
  8. fast-import: allow 'from' to reference new commits and tags by oidMarc Becker via GitGitGadget, Oct 14, 2026
  9. Junio C HamanoOct 14, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.