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

Re: [PATCH v2 2/2] odb: ignore refs of shallow and grafted alternates

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2026, 01:19 UTC
Message-ID
<xmqq7bjfby9s.fsf@gitster.g>
In-Reply-To
<20261014181134.56220-3-iwiedler@gitlab.com>
Igor Wiedler <iwiedler@gitlab.com> writes:
Show 20 quoted lines
> diff --git a/t/t5618-alternate-refs.sh b/t/t5618-alternate-refs.sh
> index 4cc39af0f0..9c3862709a 100755
> --- a/t/t5618-alternate-refs.sh
> +++ b/t/t5618-alternate-refs.sh
> @@ -70,4 +70,17 @@ test_expect_success 'connectivity check of a deepening fetch excludes alternate
>  		--alternate-refs --quiet <deepen.trace
>  '
>  
> +test_expect_success 'refs of a shallow alternate are ignored' '
> +	git clone --depth=1 "file://$TRASH_DIRECTORY" "$TRASH_DIRECTORY/shallow" &&
> +	test_commit -C "$TRASH_DIRECTORY/shallow" shallow-only &&
> +	git -C "$TRASH_DIRECTORY/shallow" rev-parse HEAD >shallow-tip &&
> +	cp .git/objects/info/alternates alternates.bak &&
> +	test_when_finished "mv alternates.bak .git/objects/info/alternates" &&
> +	echo "$TRASH_DIRECTORY/shallow/.git/objects" >>.git/objects/info/alternates &&
> +	git cat-file -e $(cat shallow-tip) &&
> +	git rev-list --remotes=origin >expect &&
> +	git rev-list --alternate-refs >actual &&
> +	test_cmp expect actual
> +'
This seems to break CI only on Windows
  https://github.com/git/git/actions/runs/39084117165/job/117547610467#step:5:279
  https://github.com/git/git/actions/runs/39084117165/job/117547743280#step:6:272
I'll eject the topic from 'seen' for now.
Thanks.
Previous: Igor Wiedler
Message 21 of 21 in “connected: do not walk alternate refs in deepening fetches”
  1. connected: do not walk alternate refs in deepening fetchesIgor Wiedler, Oct 14, 2026
  2. Patrick SteinhardtOct 14, 2026
  3. Junio C HamanoOct 14, 2026
  4. Jeff KingOct 15, 2026
  5. Justin ToblerOct 14, 2026
  6. 0/2 connected: fix the connectivity check with alternates in deepening fetchesIgor Wiedler, Oct 14, 2026
  7. Junio C HamanoOct 14, 2026
  8. 0/2 connected: fix the connectivity check with alternates in deepening fetchesIgor Wiedler, Oct 19, 2026
  9. Junio C HamanoOct 19, 2026
  10. Igor WiedlerOct 20, 2026
  11. Patrick SteinhardtOct 23, 2026
  12. 1/2 connected: negate alternate refs in deepening fetches tooIgor Wiedler, Oct 19, 2026
  13. 2/2 odb: ignore refs of shallow and grafted alternatesIgor Wiedler, Oct 19, 2026
  14. Patrick SteinhardtOct 23, 2026
  15. 1/2 connected: negate alternate refs in deepening fetches tooIgor Wiedler, Oct 14, 2026
  16. 2/2 odb: ignore refs of shallow and grafted alternatesIgor Wiedler, Oct 14, 2026
  17. Jeff KingOct 15, 2026
  18. Junio C HamanoOct 15, 2026
  19. Jeff KingOct 16, 2026
  20. Igor WiedlerOct 19, 2026
  21. Junio C HamanoOct 18, 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.