From: Jacob Keller <jacob.keller@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: Git mailing list <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] clone: add t5614 to test cloning submodules with shallowness involved
Date: Tue, 12 Apr 2016 23:52:32 -0700 [thread overview]
Message-ID: <CA+P7+xppaK9d77h74j-4K=oWftdkeJE7048+PMzLS6gBS3E_uQ@mail.gmail.com> (raw)
In-Reply-To: <1460504929-19208-4-git-send-email-sbeller@google.com>
On Tue, Apr 12, 2016 at 4:48 PM, Stefan Beller <sbeller@google.com> wrote:
> There are some inherent issues with shallow clones and submodules, such
> as having not having a commit available the superproject may point to
> in the submodule due to being shallow. Use the new file t5614 to document
> and test expectations in this area.
>
The description seems to imply that there will be
"test_expect_failure" tests to indicate what needs to be improved...
Maybe I am just mis-reading it?
Thanks,
Jake
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> t/t5614-clone-submodules.sh | 82 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 82 insertions(+)
> create mode 100755 t/t5614-clone-submodules.sh
>
> diff --git a/t/t5614-clone-submodules.sh b/t/t5614-clone-submodules.sh
> new file mode 100755
> index 0000000..a66c2db
> --- /dev/null
> +++ b/t/t5614-clone-submodules.sh
> @@ -0,0 +1,82 @@
> +#!/bin/sh
> +
> +test_description='Test shallow cloning of repos with submodules'
> +
> +. ./test-lib.sh
> +
> +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
> + ) &&
> + git submodule add ./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 . super_clone &&
> + (
> + cd super_clone &&
> + git log --oneline >lines &&
> + test_line_count = 3 lines
> + ) &&
> + (
> + cd super_clone/sub &&
> + git log --oneline >lines &&
> + test_line_count = 2 lines
> + )
> +'
> +
> +test_expect_success 'shallow clone implies shallow submodule' '
> + test_when_finished "rm -rf super_clone" &&
> + git clone --recurse-submodules --no-local --depth 1 . super_clone &&
> + (
> + cd super_clone &&
> + git log --oneline >lines &&
> + test_line_count = 1 lines
> + ) &&
> + (
> + cd super_clone/sub &&
> + git log --oneline >lines &&
> + test_line_count = 1 lines
> + )
> +'
> +
> +test_expect_success 'shallow clone with non shallow submodule' '
> + test_when_finished "rm -rf super_clone" &&
> + git clone --recurse-submodules --no-local --depth 1 --no-shallow-submodules . super_clone &&
> + (
> + cd super_clone &&
> + git log --oneline >lines &&
> + test_line_count = 1 lines
> + ) &&
> + (
> + cd super_clone/sub &&
> + git log --oneline >lines &&
> + test_line_count = 2 lines
> + )
> +'
> +
> +test_expect_success 'non shallow clone with shallow submodule' '
> + test_when_finished "rm -rf super_clone" &&
> + git clone --recurse-submodules --no-local --shallow-submodules . super_clone &&
> + (
> + cd super_clone &&
> + git log --oneline >lines &&
> + test_line_count = 3 lines
> + ) &&
> + (
> + cd super_clone/sub &&
> + git log --oneline >lines &&
> + test_line_count = 1 lines
> + )
> +'
> +
> +test_done
> --
> 2.5.0.264.gc776916.dirty
>
next prev parent reply other threads:[~2016-04-13 6:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 23:48 [PATCH 0/3] clone --shallow-submodules flag Stefan Beller
2016-04-12 23:48 ` [PATCH 1/3] submodule clone: pass along `local` option Stefan Beller
2016-04-25 12:18 ` Lars Schneider
2016-04-25 17:15 ` Stefan Beller
2016-04-12 23:48 ` [PATCH 2/3] clone: add `--shallow-submodules` flag Stefan Beller
2016-04-12 23:48 ` [PATCH 3/3] clone: add t5614 to test cloning submodules with shallowness involved Stefan Beller
2016-04-13 6:52 ` Jacob Keller [this message]
2016-04-25 17:41 ` Stefan Beller
2016-04-25 12:25 ` Lars Schneider
-- strict thread matches above, loose matches on Subject: below --
2016-03-16 1:12 [PATCH 0/3] Towards sane shallow clones with submodules Stefan Beller
2016-03-16 1:12 ` [PATCH 3/3] clone: Add t5614 to test cloning submodules with shallowness involved Stefan Beller
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+P7+xppaK9d77h74j-4K=oWftdkeJE7048+PMzLS6gBS3E_uQ@mail.gmail.com' \
--to=jacob.keller@gmail.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.
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).