git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <derrickstolee@github.com>
Cc: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] partial-clone: add a partial-clone test case
Date: Tue, 15 Mar 2022 09:13:19 -0700	[thread overview]
Message-ID: <xmqqv8wffb34.fsf@gitster.g> (raw)
In-Reply-To: <4d78dece-1212-5232-a441-683e941016c5@github.com> (Derrick Stolee's message of "Tue, 15 Mar 2022 08:57:25 -0400")

Derrick Stolee <derrickstolee@github.com> writes:

>> I tried to use `git rev-list --objects --missing=print` with `HEAD` and
>> first commit hash. But in both cases, I didn't found a missing `[?]` sign
>> before ` <blob-hash-ID> file.txt`. That means, both blob objects ( or I
>> think the same blob object) exists in the local repo.
> ...

Yup.  I was about to suggest --missing=allow-promisor to catch other
unexpected missing objects, but in this toy history for testing,
what is missing is all the objects expected from the promisor, so it
should be sufficient to use --missing=print.

> I think the key issue is that your clone says this:
>
> +	git clone --filter=blob:none "file://$(pwd)/repo" partial.git &&
>
> which will do a checkout and download the blobs at tip.
>
> If you add a "--bare" to this clone command, then no blobs should be
> downloaded, and your rev-list command should show the missing objects.

That sounds like pointing at a different issue.  If the test
repository downloads the blobs at the tip, then the fact that the
trace output did not have "fetch" in it does not mean much, does it?
It could be that we refrained from lazily download the blob because
we did not need its contents for the purpose of following through an
exact rename, but it could also be that we did not need to lazily
download it because we already had it.

> Hopefully my suggestion to use --bare will help.

Yup, thanks.

So regardless of "--missing=print" vs "grep in trace", there was a
bug in the test set-up, and we caught it in this discussion, which
is excellent.


  parent reply	other threads:[~2022-03-15 16:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13 17:39 [PATCH] partial-clone: add a partial-clone test case Abhradeep Chakraborty via GitGitGadget
2022-03-13 19:41 ` Junio C Hamano
2022-03-14 15:46   ` Abhradeep Chakraborty
2022-03-14 16:25     ` Derrick Stolee
2022-03-14 21:42       ` Junio C Hamano
2022-03-15  8:20       ` Abhradeep Chakraborty
2022-03-14 21:35     ` Junio C Hamano
2022-03-14 16:24   ` Derrick Stolee
2022-03-14 22:21     ` Junio C Hamano
2022-03-15 11:30       ` Abhradeep Chakraborty
2022-03-15 12:57         ` Derrick Stolee
2022-03-15 15:15           ` Abhradeep Chakraborty
2022-03-15 16:13           ` Junio C Hamano [this message]
2022-03-16  8:06             ` Abhradeep Chakraborty
2022-03-16  9:46 ` [PATCH v2] " Abhradeep Chakraborty via GitGitGadget
2022-03-21 15:26   ` Derrick Stolee

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqv8wffb34.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=chakrabortyabhradeep79@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).