From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, peartben@gmail.com,
Christian Couder <christian.couder@gmail.com>,
git@jeffhostetler.com
Subject: Re: RFC: Design and code of partial clones (now, missing commits and trees OK)
Date: Tue, 19 Sep 2017 14:51:52 +0900 [thread overview]
Message-ID: <xmqq8thbqlqf.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170915134343.3814dc38@twelve2.svl.corp.google.com> (Jonathan Tan's message of "Fri, 15 Sep 2017 13:43:43 -0700")
Jonathan Tan <jonathantanmy@google.com> writes:
> For those interested in partial clones and/or missing objects in repos,
> I've updated my original partialclone patches to not require an explicit
> list of promises. Fetch/clone still only permits exclusion of blobs, but
> the infrastructure is there for a local repo to support missing trees
> and commits as well.
> ...
> Demo
> ====
>
> Obtain a repository.
>
> $ make prefix=$HOME/local install
> $ cd $HOME/tmp
> $ git clone https://github.com/git/git
>
> Make it advertise the new feature and allow requests for arbitrary blobs.
>
> $ git -C git config uploadpack.advertiseblobmaxbytes 1
> $ git -C git config uploadpack.allowanysha1inwant 1
>
> Perform the partial clone and check that it is indeed smaller. Specify
> "file://" in order to test the partial clone mechanism. (If not, Git will
> perform a local clone, which unselectively copies every object.)
>
> $ git clone --blob-max-bytes=100000 "file://$(pwd)/git" git2
> $ git clone "file://$(pwd)/git" git3
> $ du -sh git2 git3
> 116M git2
> 129M git3
>
> Observe that the new repo is automatically configured to fetch missing objects
> from the original repo. Subsequent fetches will also be partial.
>
> $ cat git2/.git/config
> [core]
> repositoryformatversion = 1
> filemode = true
> bare = false
> logallrefupdates = true
> [remote "origin"]
> url = [snip]
> fetch = +refs/heads/*:refs/remotes/origin/*
> blobmaxbytes = 100000
> [extensions]
> partialclone = origin
> [branch "master"]
> remote = origin
> merge = refs/heads/master
The above sequence of events make quite a lot of sense. And the
following description of how it is designed (snipped) is clear
enough (at least to me) to allow me to say that I quite like it.
next prev parent reply other threads:[~2017-09-19 5:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 20:43 RFC: Design and code of partial clones (now, missing commits and trees OK) Jonathan Tan
2017-09-19 5:51 ` Junio C Hamano [this message]
2017-09-21 17:57 ` Jeff Hostetler
2017-09-21 22:42 ` Jonathan Tan
2017-09-22 21:02 ` Jeff Hostetler
2017-09-22 22:49 ` Jonathan Tan
2017-09-26 15:26 ` Michael Haggerty
2017-09-29 20:21 ` Jonathan Tan
2017-09-21 17:59 ` RFC: Design and code of partial clones (now, missing commits and trees OK) (part 2/3) Jeff Hostetler
2017-09-21 22:51 ` Jonathan Tan
2017-09-22 21:19 ` Jeff Hostetler
2017-09-22 22:52 ` Jonathan Tan
2017-09-26 14:03 ` Jeff Hostetler
2017-09-21 18:00 ` RFC: Design and code of partial clones (now, missing commits and trees OK) (part 3) Jeff Hostetler
2017-09-21 23:04 ` Jonathan Tan
2017-09-22 21:32 ` Jeff Hostetler
2017-09-22 22:58 ` Jonathan Tan
2017-09-26 14:25 ` Jeff Hostetler
2017-09-26 17:32 ` Jonathan Tan
2017-09-29 0:53 ` RFC: Design and code of partial clones (now, missing commits and trees OK) Jonathan Tan
2017-09-29 2:03 ` Junio C Hamano
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=xmqq8thbqlqf.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=christian.couder@gmail.com \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=peartben@gmail.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).