git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	Vadim Eisenberg <VADIME@il.ibm.com>
Subject: Re: [PATCH] shallow clone to not imply shallow submodules
Date: Mon, 20 Jun 2016 10:14:47 -0700	[thread overview]
Message-ID: <CAGZ79kbKoch0odOOz2QWhoGoSOBOgYyQ_QgbxPXy2iJJVqP6Vw@mail.gmail.com> (raw)
In-Reply-To: <20160620171312.GA1880@sigill.intra.peff.net>

On Mon, Jun 20, 2016 at 10:13 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Jun 20, 2016 at 09:59:58AM -0700, Stefan Beller wrote:
>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>>
>> Hi Junio, Peff,
>>
>> I thought about this patch squashed into
>> "clone: do not let --depth imply --shallow-submodules" will actually test
>> for the regression.
>
> Yep, it looks good to me.
>
>> +test_expect_success 'shallow clone does not imply shallow submodule' '
>> +     test_when_finished "rm -rf super_clone" &&
>> +     git clone --recurse-submodules --depth 2 "file://$pwd/." super_clone &&
>> +     (
>> +             cd super_clone &&
>> +             git log --oneline >lines &&
>> +             test_line_count = 2 lines
>> +     ) &&
>> +     (
>> +             cd super_clone/sub &&
>> +             git log --oneline >lines &&
>> +             test_line_count = 3 lines
>> +     )
>> +'
>
> This follows the style of the other tests, so it's the right thing here.
> But as a style suggestion, I think:
>
>   git -C super_clone/sub log --oneline >lines &&
>   test_line_count = 3 lines
>
> is nicer than the subshell. It's more succinct, and it saves a process.

which we would want to refactor to in a follow up, but not merge it
through to 2.9.1.

Thanks,
Stefan

>
> -Peff

  reply	other threads:[~2016-06-20 17:15 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
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 [this message]
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=CAGZ79kbKoch0odOOz2QWhoGoSOBOgYyQ_QgbxPXy2iJJVqP6Vw@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=VADIME@il.ibm.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).