git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Paul Campbell <pcampbell@kemitix.net>
Cc: git@vger.kernel.org, Adam Tkac <atkac@redhat.com>,
	"David A. Greene" <greened@obbligato.org>,
	"Jesper L. Nielsen" <lyager@gmail.com>,
	Michael Schubert <mschub@elegosoft.com>,
	Techlive Zheng <techlivezheng@gmail.com>
Subject: Re: [PATCH 2/3] contrib/subtree/t: Added tests for .gitsubtree support
Date: Fri, 15 Feb 2013 14:56:24 -0800	[thread overview]
Message-ID: <20130215225624.GB21165@google.com> (raw)
In-Reply-To: <CALeLG_=ir-kBTYpsRr_Hf8q2UY2ZtjShbTkO_tH=YiWSskfPOw@mail.gmail.com>

Hi Paul,

Paul Campbell wrote:

> --- a/contrib/subtree/t/t7900-subtree.sh
> +++ b/contrib/subtree/t/t7900-subtree.sh
> @@ -465,4 +465,34 @@ test_expect_success 'verify one file change per commit' '
[...]
> +test_expect_success 'change in subtree is pushed okay' '
> +        cd copy0 && create new_file && git commit -m"Added new_file" &&
> +        cd .. && git subtree push --prefix=copy0 2>&1 | \

If it possible to restrict the chdirs to subshells, that can make the
test more resiliant to early failures without breaking later tests.

That is:

	(
		cd copy0 &&
		create new_file &&
		test_tick &&
		git commit -m "add new_file"
	) &&
	git subtree push --prefix=copy0 >output 2>&1 &&
	grep "..." output

> +                grep "^\s\{3\}[0-9a-f]\{7\}\.\.[0-9a-f]\{7\}\s\s[0-9a-f]\{40\}\s->\ssub1$"

This might not be portable if I understand
Documentation/CodingGuidelines correctly.

[...]
> +        (grep "^copy3 . sub2$" .gitsubtree && die || true) &&

	! grep "^copy3 . sub2\$" .gitsubtree &&

Hope that helps,
Jonathan

  reply	other threads:[~2013-02-15 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 22:50 [PATCH 2/3] contrib/subtree/t: Added tests for .gitsubtree support Paul Campbell
2013-02-15 22:56 ` Jonathan Nieder [this message]
2013-02-15 23:16   ` Paul Campbell
2013-02-17 11:37     ` Jonathan Nieder
2013-02-17 15:26       ` Paul Campbell
2013-02-18  0:35         ` Jonathan Nieder

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=20130215225624.GB21165@google.com \
    --to=jrnieder@gmail.com \
    --cc=atkac@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=greened@obbligato.org \
    --cc=lyager@gmail.com \
    --cc=mschub@elegosoft.com \
    --cc=pcampbell@kemitix.net \
    --cc=techlivezheng@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).