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

Re: [PATCH v2] upload-pack: ignore 'shallow' lines with unknown obj-ids

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2013, 16:54 UTC
Message-ID
<7vk3nh1fwx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1367506567-36828-1-git-send-email-mheemskerk@atlassian.com>
Michael Heemskerk <mheemskerk@atlassian.com> writes:
Show 7 quoted lines
> When the client sends a 'shallow' line for an object that the server does
> not have, the server currently dies with the error: "did not find object
> ...
>  Documentation/technical/pack-protocol.txt |  3 +--
>  t/t5500-fetch-pack.sh                     | 13 +++++++++++++
>  upload-pack.c                             |  2 +-
>  3 files changed, 15 insertions(+), 3 deletions(-)
Thanks.

The previous one (without the test) is already in 'next' so I'll pick only the test part and queue it as an update to the series.

Show 24 quoted lines
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index d574085..3f0ca10 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -373,6 +373,19 @@ test_expect_success 'clone shallow with packed refs' '
>  	test_cmp count8.expected count8.actual
>  '
>  
> +test_expect_success 'fetch in shallow repo unreachable shallow objects' '
> +	(
> +		git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog &&
> +		git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 &&
> +		cd no-reflog &&
> +		git tag -d TAGB1 TAGB2 &&
> +		git update-ref refs/heads/B B~~ &&
> +		git gc --prune=now &&
> +		cd ../shallow9 &&
> +		git fetch origin
> +	)
> +'
> +
>  test_expect_success 'setup tests for the --stdin parameter' '
>  	for head in C D E F
>  	do
Previous: Michael HeemskerkNext: Junio C Hamano
Message 2 of 3 in “upload-pack: ignore 'shallow' lines with unknown obj-ids”
  1. upload-pack: ignore 'shallow' lines with unknown obj-idsMichael Heemskerk, May 2, 2013
  2. Junio C HamanoMay 2, 2013
  3. Junio C HamanoMay 2, 2013

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.