git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH v4 0/6] Support triangular workflows
Date: Sun, 31 Mar 2013 17:43:18 -0400	[thread overview]
Message-ID: <20130331214318.GA24646@sigill.intra.peff.net> (raw)
In-Reply-To: <CALkWK0=a0wmUe-rjK8Gg8izc0FdXYzChSrgp+W-JNsECsDf+yA@mail.gmail.com>

On Mon, Apr 01, 2013 at 02:21:22AM +0530, Ramkumar Ramachandra wrote:

> Jeff King wrote:
> > [...]
> 
> So, you're saying: don't test compound statements for failure, since
> anything in the chain could fail and propagate failure.  I should only
> test simple git-foo commands for failure?

Right.

> > Sometimes it's annoyingly verbose to break down a compound function. But
> > I think in this case, you can make your tests more robust by just
> > checking the affirmative that the ref is still where we expect it to be,
> > like:
> >
> >   check_push_result up_repo $the_first_commit heads/master
> 
> Doesn't that change the meaning of the test though?  I really like how
> the original tests read.

Does it? I thought the original was:

  test_must_fail check_push_result up_repo $the_commit heads/master

which is checking that we did _not_ push $the_commit to up_repo.
Checking that without a negative means confirming that what _used_ to be
there is still there, which is $the_first_commit.

But I didn't actually run it, so I might be wrong about what is supposed
to be there after the (lack of) push.

-Peff

  reply	other threads:[~2013-03-31 21:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 13:26 [PATCH v4 0/6] Support triangular workflows Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 1/6] remote.c: simplify a bit of code using git_config_string() Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 2/6] t5516 (fetch-push): update test description Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 3/6] t5516 (fetch-push): drop implicit arguments from helper functions Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 4/6] remote.c: introduce a way to have different remotes for fetch/push Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 5/6] remote.c: introduce remote.pushdefault Ramkumar Ramachandra
2013-03-28 13:26 ` [PATCH 6/6] remote.c: introduce branch.<name>.pushremote Ramkumar Ramachandra
2013-03-28 15:02 ` [PATCH v4 0/6] Support triangular workflows Junio C Hamano
2013-03-28 15:35 ` Jeff King
2013-03-28 16:54   ` Junio C Hamano
2013-03-31 20:54     ` Ramkumar Ramachandra
2013-04-01  1:56       ` Junio C Hamano
2013-04-01  3:36         ` Junio C Hamano
2013-04-01  5:07         ` Junio C Hamano
2013-04-01  5:35           ` Junio C Hamano
2013-03-31 20:51   ` Ramkumar Ramachandra
2013-03-31 21:43     ` Jeff King [this message]
2013-04-01  1:50       ` Junio C Hamano

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=20130331214318.GA24646@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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).