From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
Lars Schneider <larsxschneider@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCHv2] clone: add `--shallow-submodules` flag
Date: Tue, 26 Apr 2016 10:51:18 -0700 [thread overview]
Message-ID: <CAGZ79kan6bBH236nBvTUdV2KiaB9hW6KOCz_rWqk513CGN30mg@mail.gmail.com> (raw)
In-Reply-To: <xmqqtwiogt4y.fsf@gitster.mtv.corp.google.com>
On Tue, Apr 26, 2016 at 10:46 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> 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.
>
Another case of me not thinking it through. There used to be just '.'
in the former
series with the --no-local option. And to make it a file url I just
prefixed that dot
without thinking if the dot is still needed.
In case another reroll is needed, I'll fix that up, too.
Thanks,
Stefan
prev parent reply other threads:[~2016-04-26 17:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 1:12 [PATCHv2] clone: add `--shallow-submodules` flag Stefan Beller
2016-04-26 17:46 ` Junio C Hamano
2016-04-26 17:51 ` Stefan Beller [this message]
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=CAGZ79kan6bBH236nBvTUdV2KiaB9hW6KOCz_rWqk513CGN30mg@mail.gmail.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.keller@gmail.com \
--cc=larsxschneider@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).