All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.com>,
	"'Shourya Shukla'" <shouryashukla.oo@gmail.com>
Cc: <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 16:43:55 -0400	[thread overview]
Message-ID: <011001d6181d$97301fc0$c5905f40$@nexbridge.com> (raw)
In-Reply-To: <xmqqy2qomwwl.fsf@gitster.c.googlers.com>

On April 21, 2020 4:01 PM, Junio C Hamano
> Subject: Re: [PATCH v3 3/4] gitfaq: shallow cloning a repository
> 
> Shourya Shukla <shouryashukla.oo@gmail.com> writes:
> 
> > Add issue in 'Common issue' section which covers issues with cloning
> > large repositories. Use shallow cloning to clone the repository in a
> > smaller size.
> >
> > Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
> > ---
> >  Documentation/gitfaq.txt | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index
> > 13d37f96af..cea293cf07 100644
> > --- a/Documentation/gitfaq.txt
> > +++ b/Documentation/gitfaq.txt
> > @@ -275,6 +275,20 @@ I want to change the remote of my repository.
> How do I do that?::
> >  One can list the remotes of a repository using `git remote -v` command.
> >  The default name of a remote is 'origin'.
> >
> > +[[shallow-cloning]]
> > +The repository I am trying to clone is too big. Is there an
> > +alternative way of cloning it in lesser space?::
> > +	One can clone a repository having a truncated history, meaning the
> > +	history	will span upto a specified number of commits instead of
> > +	the whole history of the repository. This is called 'Shallow
Cloning'.
> > ...
> 
> The question is worth keeping but the answer is questionable.
> 
> I have a feeling that --depth/shallow is deprecated/frowned upon these
days
> and more people recommend partial/blob-less clones instead (a few random
> people added to Cc: to see if they want to say something here).

I rather hate to chime in as a dissenting opinion, but the --depth/shallow
clone is very useful when git is being used as an artifact repository for
production. The shallow clone allows only the production branch HEAD to be
cloned into production/staging areas and limits the visible history for
staff who do not want to go through a potentially long trail during
time-sensitive operations (a.k.a. production installs). There are also space
and policy constraints in some of these environments where they do not want
to have ongoing visibility to non-production commit paths. When the *stuff*
hits the fan, then it's good to be able to fetch everything (or a limited
set). I would be very disappointed to see --depth frowned upon.

Regards,
Randall

-- Brief whoami:
 NonStop developer since approximately 211288444200000000
 UNIX developer since approximately 421664400
-- In my real life, I talk too much.




  reply	other threads:[~2020-04-21 20:44 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 [this message]
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
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='011001d6181d$97301fc0$c5905f40$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=christian.couder@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=shouryashukla.oo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.