git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Stefan Beller <sbeller@google.com>
Cc: gitster@pobox.com, git@vger.kernel.org, VADIME@il.ibm.com
Subject: Re: [PATCH] shallow clone to not imply shallow submodules
Date: Mon, 20 Jun 2016 13:13:12 -0400	[thread overview]
Message-ID: <20160620171312.GA1880@sigill.intra.peff.net> (raw)
In-Reply-To: <1466441998-18896-1-git-send-email-sbeller@google.com>

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.

-Peff

  reply	other threads:[~2016-06-20 17:40 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 [this message]
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=20160620171312.GA1880@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=VADIME@il.ibm.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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 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).