All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vadim Eisenberg" <VADIME@il.ibm.com>
To: Jeff King <peff@peff.net>
Cc: Stefan Beller <sbeller@google.com>, git@vger.kernel.org
Subject: Re: [BUG REPORT] git 2.9.0 clone --recursive fails on cloning a submodule
Date: Sun, 19 Jun 2016 16:07:41 +0300	[thread overview]
Message-ID: <OFC46A8782.5F47CDBA-ONC2257FD7.00475209-C2257FD7.00483117@notes.na.collabserv.com> (raw)
In-Reply-To: <20160619100051.GA14584@sigill.intra.peff.net>

The problem is with other tools that use git, like Swift Package Manager - 
https://swift.org/package-manager/.
Versions of git before 2.9.0 have no option --no-shallow-submodules. So 
the tools that use git would have to check if the version of git is 
greater than or equal 2.9.0 to know to specify that option.

Best Regards,
Vadim

Jeff King <peff@peff.net> wrote on 06/19/2016 01:00:51 PM:

> From: Jeff King <peff@peff.net>
> To: Vadim Eisenberg/Haifa/IBM@IBMIL
> Cc: Stefan Beller <sbeller@google.com>, git@vger.kernel.org
> Date: 06/19/2016 01:01 PM
> Subject: Re: [BUG REPORT] git 2.9.0 clone --recursive fails on 
> cloning a submodule
> 
> On Sun, Jun 19, 2016 at 10:17:36AM +0300, Vadim Eisenberg wrote:
> 
> > /usr/local/bin/git clone --recursive --depth 10 
> > https://github.com/IBM-Swift/Kitura-net.git
> > Cloning into 'Kitura-net'...
> > remote: Counting objects: 253, done.
> > remote: Compressing objects: 100% (142/142), done.
> > remote: Total 253 (delta 134), reused 188 (delta 86), pack-reused 0
> > Receiving objects: 100% (253/253), 63.28 KiB | 0 bytes/s, done.
> > Resolving deltas: 100% (134/134), done.
> > Checking connectivity... done.
> > Submodule 'Kitura-Build' (
https://github.com/IBM-Swift/Kitura-Build.git) 
> > registered for path 'Kitura-Build'
> > Cloning into '/home/vadime/Kitura-net/Kitura-Build'...
> > error: no such remote ref d0d9d6c739a79627641e6438fe4f39bd0eba83bb
> > Fetched in submodule path 'Kitura-Build', but it did not contain 
> > d0d9d6c739a79627641e6438fe4f39bd0eba83bb. Direct fetching of that 
commit 
> > failed.
> 
> The problem seems to be the shallow clone. The super-project points to a
> commit in the submodule that is not near the tip of any branch, so
> shallow-cloning the submodule means we don't get that commit. Prior to
> d22eb04 (clone: add `--shallow-submodules` flag, 2016-04-25), submodules
> were _always_ cloned fully.
> 
> The immediate workaround is to add "--no-shallow-submodules" to your
> clone invocation.
> 
> Stefan, I think it might be worth revisiting the default set by d22eb04
> to propagate shallowness from the super-project clone. In an ideal
> world, we would be asking each submodule for the actual commit we are
> interested in, and shallowness would not matter. But until
> uploadpack.allowReachableSHA1InWant works everywhere, I suspect this is
> going to be a problem.
> 
> -Peff
> 



  reply	other threads:[~2016-06-19 13:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OFC76C15DC.FC882C57-ONC2257FD7.00261552-C2257FD7.002660FC@LocalDomain>
2016-06-19  7:17 ` [BUG REPORT] git 2.9.0 clone --recursive fails on cloning a submodule Vadim Eisenberg
2016-06-19 10:00   ` Jeff King
2016-06-19 13:07     ` Vadim Eisenberg [this message]
2016-06-19 14:46       ` Jeff King
2016-06-19 20:51     ` Junio C Hamano
2016-06-20  0:13       ` Jeff King
2016-06-20  1:09         ` Stefan Beller
2016-06-20  3:01           ` Vadim Eisenberg
2016-06-20  5:31           ` Dennis Kaarsemaker
2016-06-20 10:02           ` Jeff King
2016-06-20 16:59       ` [PATCH] shallow clone to not imply shallow submodules Stefan Beller
2016-06-20 17:13         ` Jeff King
2016-06-20 17:14           ` Stefan Beller
2016-06-20 17:18             ` Jeff King
2017-04-19 11:30       ` [BUG REPORT] git 2.9.0 clone --recursive fails on cloning a submodule Ævar Arnfjörð Bjarmason
2017-04-19 18:54         ` Stefan Beller
2016-06-21 16:48     ` Duy Nguyen

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=OFC46A8782.5F47CDBA-ONC2257FD7.00475209-C2257FD7.00483117@notes.na.collabserv.com \
    --to=vadime@il.ibm.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sbeller@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 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.