git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] checkout: send commit provenance during prefetch
Date: Wed, 16 Dec 2020 10:50:06 -0800	[thread overview]
Message-ID: <xmqqa6ud4mch.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201215200207.1083655-1-jonathantanmy@google.com> (Jonathan Tan's message of "Tue, 15 Dec 2020 12:02:07 -0800")

Jonathan Tan <jonathantanmy@google.com> writes:

> Therefore, teach the partial clone fetching mechanism to support a
> "provenance" argument, and plumb the commit provenance from checkout to
> the partial clone fetching mechanism.
>
> In the future, other commands can be similarly upgraded. Other possible
> future improvements include better diagnostic messages when a prefetch
> fails.

I am not sure "provenance" is a good word to describe the concept,
but it feels a bit too limiting that you can give only a single
commit, especially when ...

>  builtin/checkout.c       |  4 ++++
>  builtin/index-pack.c     |  2 +-
>  builtin/pack-objects.c   |  2 +-
>  diff.c                   |  2 +-
>  diffcore-rename.c        |  2 +-
>  promisor-remote.c        | 12 +++++++++---
>  promisor-remote.h        |  3 ++-
>  sha1-file.c              |  2 +-
>  t/t5616-partial-clone.sh |  7 +++++--
>  unpack-trees.c           |  3 ++-
>  unpack-trees.h           |  7 +++++++
>  11 files changed, 34 insertions(+), 12 deletions(-)

... I see that "diff" already needs lazy blob fetching and we know
diff often is between two commits (think: "git log -p").

> This essentially splits reachability-of-blob, which almost certainly
> requires loading a bitmap, into 2 parts: reachability-of-commit (which,
> from my limited experience, can be more quickly done using a regular
> object walk) and reachability-of-blob-from-commit (which, at worst,
> requires fewer bitmaps to be loaded). I don't have timings for how it
> works in practice, though.

What does the bitmap you have on the serving side typically tell
you?  For some selected commits (not all commits) you'd have a
bitmap that says "from this commit, these objects can be reached",
or is it "from this commit, these commits can be reached"?

Thanks.

      parent reply	other threads:[~2020-12-16 18:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 20:02 [PATCH] checkout: send commit provenance during prefetch Jonathan Tan
2020-12-16 14:50 ` Derrick Stolee
2020-12-16 18:50 ` Junio C Hamano [this message]

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=xmqqa6ud4mch.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.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.
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).