From: Junio C Hamano Date: Tue, 26 Apr 2016 17:46:37 GMT Subject: Re: [PATCHv2] clone: add `--shallow-submodules` flag Message-ID: In-Reply-To: <1461633147-23131-1-git-send-email-sbeller@google.com> Stefan Beller writes: > I did not rebase this on 85705cfb (Merge branch 'ss/clone-depth-single-doc', > 2016-01-20) or later, but worked on it with the base unchanged. Thanks, will replace. > diff --git a/t/t5614-clone-submodules.sh b/t/t5614-clone-submodules.sh > new file mode 100755 > index 0000000..62044c5 > --- /dev/null > +++ b/t/t5614-clone-submodules.sh > @@ -0,0 +1,85 @@ > +#!/bin/sh > + > +test_description='Test shallow cloning of repos with submodules' > + > +. ./test-lib.sh > + > +pwd=$(pwd) > + > +test_expect_success 'setup' ' > + git checkout -b master && > + test_commit commit1 && > + test_commit commit2 && > + mkdir sub && > + ( > + cd sub && > + git init && > + test_commit subcommit1 && > + test_commit subcommit2 && > + test_commit subcommit3 > + ) && > + git submodule add "file://$pwd/sub" sub && > + git commit -m "add submodule" > +' > + > +test_expect_success 'nonshallow clone implies nonshallow submodule' ' > + test_when_finished "rm -rf super_clone" && > + git clone --recurse-submodules "file://$pwd/." super_clone && All of these "$path/." made me wonder one thing. I know these URLs that ends with slash-dot ought to work, but shouldn't they work without them, too? The "consistency" in this test that ends anything that would have ended with "$pwd" with "$pwd/." somewhat bothered me.