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

Re: [PATCH 1/2] partial-clone: demonstrate bugs in partial fetch

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 19, 2020, 21:17 UTC
Message-ID
<xmqqblpue0oq.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAPig+cT+MO_JmZf_qfxu8ZkPLWDOpZSe8rZxt-7LK4d6+RJ6JA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 17 quoted lines
> On Wed, Feb 19, 2020 at 3:52 PM Junio C Hamano <gitster@pobox.com> wrote:
>> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
>> > +test_expect_failure 'verify fetch succeeds when asking for new tags' '
>> > +     git clone --filter=blob:none "file://$(pwd)/srv.bare" tag-test &&
>> > +     for i in I J K
>> > +     do
>> > +             test_commit -C src $i &&
>> > +             git -C src branch $i
>> > +     done &&
>> > +     git -C srv.bare fetch --tags origin +refs/heads/*:refs/heads/* &&
>> > +     git -C tag-test fetch --tags origin
>> > +'
>>
>> Is this about an ultra-recent regresssion?  When applied directly on
>> top of v2.25.0, this one seems to pass already without any change.
>
> True, although both fail when applied atop "master".

I flipped the first one (i.e. test #24) to expect success and run bisect between 3f7553ac ("Merge branch 'jt/t5616-robustify'", 2020-02-12) and the tip of 'master'.

Interesting that bisecting it points at 684ceae3 ("fetch: default to protocol version 2", 2019-12-23).

diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index 9a9178fd28..099406c2f1 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -384,6 +384,32 @@ test_expect_success 'fetch lazy-fetches only to resolve deltas, protocol v2' '
 	grep "want $(cat hash)" trace
 '
 
+test_expect_success 'verify fetch succeeds when asking for new tags' '
+	git clone --filter=blob:none "file://$(pwd)/srv.bare" tag-test &&
+	for i in I J K
+	do
+		test_commit -C src $i &&
+		git -C src branch $i
+	done &&
+	git -C srv.bare fetch --tags origin +refs/heads/*:refs/heads/* &&
+	git -C tag-test fetch --tags origin
+'
+
+test_expect_failure 'verify fetch downloads only one pack when updating refs' '
+	git clone --filter=blob:none "file://$(pwd)/srv.bare" pack-test &&
+	ls pack-test/.git/objects/pack/*pack >pack-list &&
+	test_line_count = 2 pack-list &&
+	for i in A B C
+	do
+		test_commit -C src $i &&
+		git -C src branch $i
+	done &&
+	git -C srv.bare fetch origin +refs/heads/*:refs/heads/* &&
+	git -C pack-test fetch origin &&
+	ls pack-test/.git/objects/pack/*pack >pack-list &&
+	test_line_count = 3 pack-list
+'
+
 . "$TEST_DIRECTORY"/lib-httpd.sh
 start_httpd
 
-- 
2.25.1-440-g39558b81cc
Previous: Eric SunshineNext: Derrick Stolee
Message 7 of 15 in “Document two partial clone bugs, fix one”
  1. 0/2 Document two partial clone bugs, fix oneDerrick Stolee via GitGitGadget, Feb 19, 2020
  2. 1/2 partial-clone: demonstrate bugs in partial fetchDerrick Stolee via GitGitGadget, Feb 19, 2020
  3. Eric SunshineFeb 19, 2020
  4. Derrick StoleeFeb 19, 2020
  5. Junio C HamanoFeb 19, 2020
  6. Eric SunshineFeb 19, 2020
  7. Junio C HamanoFeb 19, 2020
  8. Derrick StoleeFeb 19, 2020
  9. 2/2 partial-clone: avoid fetching when looking for objectsDerrick Stolee via GitGitGadget, Feb 19, 2020
  10. Jonathan TanFeb 19, 2020
  11. Derrick StoleeFeb 19, 2020
  12. 0/2 Document two partial clone bugs, fix oneDerrick Stolee via GitGitGadget, Feb 21, 2020
  13. 1/2 partial-clone: demonstrate bugs in partial fetchDerrick Stolee via GitGitGadget, Feb 21, 2020
  14. 2/2 partial-clone: avoid fetching when looking for objectsDerrick Stolee via GitGitGadget, Feb 21, 2020
  15. Junio C HamanoFeb 22, 2020

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.