From: John Cai <johncai86@gmail.com>
To: Robert Coup <robert.coup@koordinates.com>
Cc: John Cai via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v2 4/4] tests for repack --filter mode
Date: Thu, 17 Feb 2022 15:36:57 -0500 [thread overview]
Message-ID: <6BD2011A-9CD7-488C-8F17-F78FE59E93C7@gmail.com> (raw)
In-Reply-To: <CAFLLRp+9TmMKu5UpaN4sUr+o_9AGAVvtis0e87VMJsCva67q3w@mail.gmail.com>
Hi Rob,
On 17 Feb 2022, at 11:14, Robert Coup wrote:
> Hi John,
>
> Minor, but should we use oid rather than sha1 in the list.sh/upload.sh
> scripts? wrt sha256 slowly coming along the pipe.
good point, I'll make those adjustments.
>
>> diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
>> index e489869dd94..78cc1858cb6 100755
>> --- a/t/t7700-repack.sh
>> +++ b/t/t7700-repack.sh
>> @@ -237,6 +237,26 @@ test_expect_success 'auto-bitmaps do not complain if unavailable' '
>> test_must_be_empty actual
>> '
>>
>> +test_expect_success 'repack with filter does not fetch from remote' '
>> + rm -rf server client &&
>> + test_create_repo server &&
>> + git -C server config uploadpack.allowFilter true &&
>> + git -C server config uploadpack.allowAnySHA1InWant true &&
>> + echo content1 >server/file1 &&
>> + git -C server add file1 &&
>> + git -C server commit -m initial_commit &&
>> + expected="?$(git -C server rev-parse :file1)" &&
>> + git clone --bare --no-local server client &&
>> + git -C client config remote.origin.promisor true &&
>> + git -C client -c repack.writebitmaps=false repack -a -d --filter=blob:none &&
>
> Does writing bitmaps have any effect/interaction here?
Currently writing bitmaps don't play well with promisor objects. If I'm reading
the code correctly, it seems that when we build a bitmap with
bitmap_writer_build(), find_object_pos() gets called and will complain if an
object is missing from the pack.
We probably need to do the work to allow bitmaps to play well with promisor
objects.
>
>> + git -C client rev-list --objects --all --missing=print >objects &&
>> + grep "$expected" objects &&
>
> This is testing the object that was cloned initially is gone after the
> repack, ok.
>
>> + git -C client repack -a -d &&
>> + expected="$(git -C server rev-parse :file1)" &&
>> + git -C client rev-list --objects --all --missing=print >objects &&
>> + grep "$expected" objects
>
> But I'm not sure what you're testing here? A repack wouldn't fetch
> missing objects for a promisor pack anyway... and because there's no
> '^' in the pattern the grep will succeed regardless of whether the
> object is missing/present.
Good point. I overlooked the fact that by this point in the test, repack has
already written a promisor file. I think I'll just remove these last couple of
lines.
>
> Rob :)
next prev parent reply other threads:[~2022-02-17 20:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 1:49 [PATCH 0/2] repack: add --filter= John Cai via GitGitGadget
2022-01-27 1:49 ` [PATCH 1/2] pack-objects: allow --filter without --stdout John Cai via GitGitGadget
2022-01-27 1:49 ` [PATCH 2/2] repack: add --filter=<filter-spec> option John Cai via GitGitGadget
2022-01-27 15:03 ` Derrick Stolee
2022-01-29 19:14 ` John Cai
2022-01-30 8:16 ` Christian Couder
2022-01-30 13:02 ` John Cai
2022-02-09 2:10 ` [PATCH v2 0/4] [RFC] repack: add --filter= John Cai via GitGitGadget
2022-02-09 2:10 ` [PATCH v2 1/4] pack-objects: allow --filter without --stdout John Cai via GitGitGadget
2022-02-09 2:10 ` [PATCH v2 2/4] repack: add --filter=<filter-spec> option John Cai via GitGitGadget
2022-02-09 2:10 ` [PATCH v2 3/4] upload-pack: allow missing promisor objects John Cai via GitGitGadget
2022-02-09 2:10 ` [PATCH v2 4/4] tests for repack --filter mode John Cai via GitGitGadget
2022-02-17 16:14 ` Robert Coup
2022-02-17 20:36 ` John Cai [this message]
2022-02-09 2:27 ` [PATCH v2 0/4] [RFC] repack: add --filter= John Cai
2022-02-16 15:39 ` Robert Coup
2022-02-16 21:07 ` John Cai
2022-02-21 3:11 ` Taylor Blau
2022-02-21 15:38 ` Robert Coup
2022-02-21 17:57 ` Taylor Blau
2022-02-21 21:10 ` Christian Couder
2022-02-21 21:42 ` Taylor Blau
2022-02-22 17:11 ` Christian Couder
2022-02-22 17:33 ` Taylor Blau
2022-02-23 15:40 ` Robert Coup
2022-02-23 19:31 ` Junio C Hamano
2022-02-26 16:01 ` John Cai
2022-02-26 17:29 ` Taylor Blau
2022-02-26 20:19 ` John Cai
2022-02-26 20:30 ` Taylor Blau
2022-02-26 21:05 ` John Cai
2022-02-26 21:44 ` Taylor Blau
2022-02-22 18:52 ` John Cai
2022-02-22 19:35 ` Taylor Blau
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6BD2011A-9CD7-488C-8F17-F78FE59E93C7@gmail.com \
--to=johncai86@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=robert.coup@koordinates.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).