From: Eric Sunshine <sunshine@sunshineco.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Git List <git@vger.kernel.org>,
Matthieu Moy <matthieu.moy@imag.fr>,
Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH try2 7/8] push: add --set-publish option
Date: Sun, 13 Oct 2013 06:03:04 -0400 [thread overview]
Message-ID: <CAPig+cQ=RkFWssANKQ=mca1jD6MGQuPxAV-SyM8rfHMLYoDHfA@mail.gmail.com> (raw)
In-Reply-To: <1381561561-20459-2-git-send-email-felipe.contreras@gmail.com>
On Sat, Oct 12, 2013 at 3:05 AM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> diff --git a/t/t5529-push-publish.sh b/t/t5529-push-publish.sh
> new file mode 100755
> index 0000000..2037026
> --- /dev/null
> +++ b/t/t5529-push-publish.sh
> @@ -0,0 +1,70 @@
> +#!/bin/sh
> +
> +test_description='push with --set-publish'
> +
> +. ./test-lib.sh
> +
> +test_expect_success 'setup bare parent' '
> + git init --bare parent &&
> + git remote add publish parent
> +'
> +
> +test_expect_success 'setup local commit' '
> + echo content >file &&
> + git add file &&
> + git commit -m one
> +'
> +
> +check_config() {
> + (echo $2; echo $3) >expect.$1
> + (git config branch.$1.pushremote
> + git config branch.$1.push) >actual.$1
> + test_cmp expect.$1 actual.$1
> +}
Do you want to maintain &&-chain in this test?
> +
> +test_expect_success 'push -p master:master' '
> + git push -p publish master:master &&
> + check_config master publish refs/heads/master
> +'
> +
> +test_expect_success 'push -u master:other' '
> + git push -p publish master:other &&
> + check_config master publish refs/heads/other
> +'
> +
> +test_expect_success 'push -p --dry-run master:otherX' '
> + git push -p --dry-run publish master:otherX &&
> + check_config master publish refs/heads/other
> +'
> +
> +test_expect_success 'push -p master2:master2' '
> + git branch master2 &&
> + git push -p publish master2:master2 &&
> + check_config master2 publish refs/heads/master2
> +'
> +
> +test_expect_success 'push -p master2:other2' '
> + git push -p publish master2:other2 &&
> + check_config master2 publish refs/heads/other2
> +'
> +
> +test_expect_success 'push -p :master2' '
> + git push -p publish :master2 &&
> + check_config master2 publish refs/heads/other2
> +'
> +
> +test_expect_success 'push -u --all' '
> + git branch all1 &&
> + git branch all2 &&
> + git push -p --all &&
> + check_config all1 publish refs/heads/all1 &&
> + check_config all2 publish refs/heads/all2
> +'
> +
> +test_expect_success 'push -p HEAD' '
> + git checkout -b headbranch &&
> + git push -p publish HEAD &&
> + check_config headbranch publish refs/heads/headbranch
> +'
> +
> +test_done
next prev parent reply other threads:[~2013-10-13 10:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-12 7:05 [PATCH try2 0/8] Introduce publish tracking branch Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 7/8] push: add --set-publish option Felipe Contreras
2013-10-13 10:03 ` Eric Sunshine [this message]
2013-10-13 10:15 ` Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 6/8] t: branch add publish branch tests Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 4/8] Add concept of 'publish' branch Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 1/8] branch: trivial cleanup Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 2/8] branch: reorganize verbose options Felipe Contreras
2013-10-12 7:05 ` [PATCH try2 3/8] push: trivial reorganization Felipe Contreras
2013-10-12 7:06 ` [PATCH try2 8/8] branch: display publish branch Felipe Contreras
2013-10-12 7:06 ` [PATCH try2 5/8] branch: allow configuring the " Felipe Contreras
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='CAPig+cQ=RkFWssANKQ=mca1jD6MGQuPxAV-SyM8rfHMLYoDHfA@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=artagnon@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=matthieu.moy@imag.fr \
/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).