git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git shallow clone branch doesn't work with recursive submodules cloning
@ 2016-08-15 11:20 Arkady Shapkin
  2016-08-15 12:04 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Arkady Shapkin @ 2016-08-15 11:20 UTC (permalink / raw)
  To: git

Hi,

I am trying clone repository by tag with recursive submodules init,
but for one submodule it doesn't work.
What I'm doing wrong?

>git clone https://github.com/grpc/grpc.git --recursive --depth 1 dsad5

Cloning into 'dsad5'...
remote: Counting objects: 7475, done.
remote: Compressing objects: 100% (4695/4695), done.
remote: Total 7475 (delta 2593), reused 5610 (delta 1265), pack-reused 0
Receiving objects: 100% (7475/7475), 4.85 MiB | 2.55 MiB/s, done.
Resolving deltas: 100% (2593/2593), done.
Checking connectivity... done.
Checking out files: 100% (6820/6820), done.
Submodule 'third_party/boringssl'
(https://github.com/google/boringssl.git) registered for path
'third_party/boringssl'
Submodule 'third_party/gflags' (https://github.com/gflags/gflags.git)
registered for path 'third_party/gflags'
Submodule 'third_party/googletest'
(https://github.com/google/googletest.git) registered for path
'third_party/googletest'
Submodule 'third_party/nanopb' (https://github.com/nanopb/nanopb.git)
registered for path 'third_party/nanopb'
Submodule 'third_party/protobuf'
(https://github.com/google/protobuf.git) registered for path
'third_party/protobuf'
Submodule 'third_party/zlib' (https://github.com/madler/zlib)
registered for path 'third_party/zlib'
Cloning into 'D:/Work/conan-packages/dsad5/third_party/boringssl'...
Cloning into 'D:/Work/conan-packages/dsad5/third_party/gflags'...
Cloning into 'D:/Work/conan-packages/dsad5/third_party/googletest'...
Cloning into 'D:/Work/conan-packages/dsad5/third_party/nanopb'...
Cloning into 'D:/Work/conan-packages/dsad5/third_party/protobuf'...
Cloning into 'D:/Work/conan-packages/dsad5/third_party/zlib'...
error: no such remote ref c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9
Fetched in submodule path 'third_party/boringssl', but it did not
contain c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9. Direct fetching of
that commit failed.

>git --version
git version 2.9.0.windows.1

-- 
WBR,
Arkady Shapkin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Git shallow clone branch doesn't work with recursive submodules cloning
  2016-08-15 11:20 Git shallow clone branch doesn't work with recursive submodules cloning Arkady Shapkin
@ 2016-08-15 12:04 ` Jeff King
  2016-08-15 12:29   ` Arkady Shapkin
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2016-08-15 12:04 UTC (permalink / raw)
  To: Arkady Shapkin; +Cc: git

On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin wrote:

> I am trying clone repository by tag with recursive submodules init,
> but for one submodule it doesn't work.
> What I'm doing wrong?

Nothing. See 18a74a0 (clone: do not let --depth imply
--shallow-submodules, 2016-06-19).

> >git --version
> git version 2.9.0.windows.1

The fix is in v2.9.1.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Git shallow clone branch doesn't work with recursive submodules cloning
  2016-08-15 12:04 ` Jeff King
@ 2016-08-15 12:29   ` Arkady Shapkin
  2016-08-15 12:47     ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Arkady Shapkin @ 2016-08-15 12:29 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Thank you, after updating to "2.9.3.windows.1" options "--recursive
--depth 1" now works.

But "--recursive --shallow-submodules" and "--recursive
--shallow-submodules --depth 1" still doesn't work.

2016-08-15 15:04 GMT+03:00 Jeff King <peff@peff.net>:
> On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin wrote:
>
>> I am trying clone repository by tag with recursive submodules init,
>> but for one submodule it doesn't work.
>> What I'm doing wrong?
>
> Nothing. See 18a74a0 (clone: do not let --depth imply
> --shallow-submodules, 2016-06-19).
>
>> >git --version
>> git version 2.9.0.windows.1
>
> The fix is in v2.9.1.
>
> -Peff



-- 
WBR,
Arkady Shapkin aka Dragon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Git shallow clone branch doesn't work with recursive submodules cloning
  2016-08-15 12:29   ` Arkady Shapkin
@ 2016-08-15 12:47     ` Jeff King
  2016-08-15 12:53       ` Arkady Shapkin
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2016-08-15 12:47 UTC (permalink / raw)
  To: Arkady Shapkin; +Cc: git

On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote:

> Thank you, after updating to "2.9.3.windows.1" options "--recursive
> --depth 1" now works.
> 
> But "--recursive --shallow-submodules" and "--recursive
> --shallow-submodules --depth 1" still doesn't work.

It does "work", but the server hosting your submodule may not be
configured to allow you to access the reachable-but-non-tip sha1
directly. So it's not a bug, but rather a configuration issue (and the
"fix" in v2.9.1 is to be less aggressive about enabling
shallow-submodules, since the default server configuration does not
allow it to work well).

More discussion is in:

  http://public-inbox.org/git/OFE09D48F2.D1D14F49-ONC2257FD7.00280736-C2257FD7.0028245A@notes.na.collabserv.com/t/#u

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Git shallow clone branch doesn't work with recursive submodules cloning
  2016-08-15 12:47     ` Jeff King
@ 2016-08-15 12:53       ` Arkady Shapkin
  2016-08-15 13:03         ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Arkady Shapkin @ 2016-08-15 12:53 UTC (permalink / raw)
  To: Jeff King; +Cc: git

So it will work only if github update their server configuration
(boringssl submodule on github)?

2016-08-15 15:47 GMT+03:00 Jeff King <peff@peff.net>:
> On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote:
>
>> Thank you, after updating to "2.9.3.windows.1" options "--recursive
>> --depth 1" now works.
>>
>> But "--recursive --shallow-submodules" and "--recursive
>> --shallow-submodules --depth 1" still doesn't work.
>
> It does "work", but the server hosting your submodule may not be
> configured to allow you to access the reachable-but-non-tip sha1
> directly. So it's not a bug, but rather a configuration issue (and the
> "fix" in v2.9.1 is to be less aggressive about enabling
> shallow-submodules, since the default server configuration does not
> allow it to work well).
>
> More discussion is in:
>
>   http://public-inbox.org/git/OFE09D48F2.D1D14F49-ONC2257FD7.00280736-C2257FD7.0028245A@notes.na.collabserv.com/t/#u
>
> -Peff



-- 
WBR,
Arkady Shapkin aka Dragon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Git shallow clone branch doesn't work with recursive submodules cloning
  2016-08-15 12:53       ` Arkady Shapkin
@ 2016-08-15 13:03         ` Jeff King
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2016-08-15 13:03 UTC (permalink / raw)
  To: Arkady Shapkin; +Cc: git

On Mon, Aug 15, 2016 at 03:53:48PM +0300, Arkady Shapkin wrote:

> So it will work only if github update their server configuration
> (boringssl submodule on github)?

Correct.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-15 13:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 11:20 Git shallow clone branch doesn't work with recursive submodules cloning Arkady Shapkin
2016-08-15 12:04 ` Jeff King
2016-08-15 12:29   ` Arkady Shapkin
2016-08-15 12:47     ` Jeff King
2016-08-15 12:53       ` Arkady Shapkin
2016-08-15 13:03         ` Jeff King

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).