From: Jonathan Nieder <jrnieder@gmail.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>,
'Junio C Hamano' <gitster@pobox.com>,
'Shourya Shukla' <shouryashukla.oo@gmail.com>,
git@vger.kernel.org, sandals@crustytoothpaste.net,
'Derrick Stolee' <dstolee@microsoft.com>,
'Elijah Newren' <newren@gmail.com>,
'Christian Couder' <christian.couder@gmail.com>
Subject: Re: [PATCH v3 3/4] gitfaq: shallow cloning a repository
Date: Tue, 21 Apr 2020 21:00:58 -0700 [thread overview]
Message-ID: <20200422040058.GB200999@google.com> (raw)
In-Reply-To: <9142ccdb-6359-4936-e621-55eab980b7cd@gmail.com>
Derrick Stolee wrote:
> Of course, with the speedups from reachability bitmaps, it is sometimes
> _faster_ to do a partial clone than a shallow clone. (It definitely takes
> less time in the "counting objects" phase, and the cost of downloading
> all commits and trees might be small enough on top of the necessary blob
> data to keep the total cost under a shallow clone. Your mileage may vary.)
> Because the cost of a partial clone is "comparable" to shallow clone, I
> would almost recommend partial clone over shallow clones 95% of the time,
> even in scenarios like automated builds on cloud-hosted VMs.
By the way, an idea for the interested (#leftoverbits?):
It would be possible to emulate the shallow clone experience making
use of the partial clone protocol. That is, fetch a full history
without blobs but record the "shallows" somewhere and make user-facing
traversals like "git log" stop there (similar to the effect "git
replace" has on user-facing traversals). Then later fetches would be
able to take advantage of the full commit history, but scripts and
muscle memory (e.g., the assumption that most commands will never
contact the remote) that assume a shallow clone would continue to
work.
Would that be useful or interesting to people?
Thanks,
Jonathan
next prev parent reply other threads:[~2020-04-22 4:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 13:12 [PATCH v3 0/4] gitfaq: add issues in the 'Common Issues' section Shourya Shukla
2020-04-21 13:12 ` [PATCH v3 1/4] gitfaq: files in .gitignore are tracked Shourya Shukla
2020-04-21 19:45 ` Junio C Hamano
2020-04-21 13:12 ` [PATCH v3 2/4] gitfaq: changing the remote of a repository Shourya Shukla
2020-04-21 19:54 ` Junio C Hamano
2020-04-27 17:30 ` Shourya Shukla
2020-04-21 13:12 ` [PATCH v3 3/4] gitfaq: shallow cloning " Shourya Shukla
2020-04-21 20:00 ` Junio C Hamano
2020-04-21 20:43 ` Randall S. Becker
2020-04-21 20:57 ` Junio C Hamano
2020-04-21 21:25 ` Randall S. Becker
2020-04-22 1:30 ` Derrick Stolee
2020-04-22 4:00 ` Jonathan Nieder [this message]
2020-04-22 0:13 ` Elijah Newren
2020-04-21 13:12 ` [PATCH v3 4/4] gitfaq: fetching and pulling " Shourya Shukla
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=20200422040058.GB200999@google.com \
--to=jrnieder@gmail.com \
--cc=christian.couder@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=rsbecker@nexbridge.com \
--cc=sandals@crustytoothpaste.net \
--cc=shouryashukla.oo@gmail.com \
--cc=stolee@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;
as well as URLs for NNTP newsgroup(s).