From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Kevin Wern <kevin.m.wern@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Resumable clone
Date: Tue, 08 Mar 2016 09:25:27 -0800 [thread overview]
Message-ID: <xmqqy49slw54.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACsJy8A_jkvdJPgBQ_huP-t8a0ra2RfP7jZ7C-ONNm87ktYaiA@mail.gmail.com> (Duy Nguyen's message of "Tue, 8 Mar 2016 18:11:19 +0700")
Duy Nguyen <pclouds@gmail.com> writes:
> Yeah the determination is tricky, it depends on server setup. Let's
> start with select the pack for download first because there could be
> many of them. A heuristic (*) of choosing the biggest one in
> $GIT_DIR/objects/pack is probably ok for now (we don't need full
> history, "the biggest part of history" is good enough).
You need to choose a pack that is fully connected, though. I was
envisioning that an updated "git repack" would have an extra option
that help server operators to manage it easily. You would need to
consider for example:
- You may not want to rebuild such a base pack too frequently
(e.g. you may want to repack a busy repository twice a day, but
you would want to redo the base pack only once a week). It is
possible to mark it with .keep for subsequent repacks to leave it
alone, but there needs a mechanism to manage that .keep marker.
- You may not want to have all refs in such a base pack (e.g. you
may want to exclude refs/changes/ from it). There need to be a
configuration to specify which refs are included in the base
pack.
while designing such an update. Then the repack with such an option
would roughly be:
- If it is time to redo a base repack, then
- unplug the .keep bit the previous base pack has;
- create a pack that contains full history reachable from the
specified refs;
- mark the new base pack as such;
- Pack all objects that are not in the base pack that are
reachable from any refs (and other anchoring points, such as
reflogs and the index) into a separate pack.
And the prime_clone() advertisement would be just the matter of
knowing how the "base" pack is marked in the above process.
next prev parent reply other threads:[~2016-03-08 17:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 9:23 Resumable clone Kevin Wern
2016-03-05 9:40 ` Duy Nguyen
2016-03-05 18:31 ` Junio C Hamano
2016-03-05 18:40 ` Junio C Hamano
2016-03-06 7:59 ` Johannes Schindelin
2016-03-06 8:49 ` Duy Nguyen
2016-03-06 8:52 ` Duy Nguyen
2016-03-06 19:48 ` Junio C Hamano
2016-03-07 3:55 ` Junio C Hamano
2016-03-08 3:33 ` Kevin Wern
2016-03-08 11:11 ` Duy Nguyen
2016-03-08 17:25 ` Junio C Hamano [this message]
2016-03-08 17:07 ` Junio C Hamano
2016-03-09 2:04 ` Kevin Wern
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=xmqqy49slw54.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kevin.m.wern@gmail.com \
--cc=pclouds@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox