git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
	"Christian Couder" <christian.couder@gmail.com>,
	"Christian Couder" <chriscool@tuxfamily.org>,
	git@vger.kernel.org, "Jeff King" <peff@peff.net>
Subject: Re: [PATCH v2] cherry-pick: add failing test for out-of-order pick
Date: Thu, 12 Jan 2012 13:33:12 -0600	[thread overview]
Message-ID: <20120112193312.GC6038@burratino> (raw)
In-Reply-To: <1326395132-18947-1-git-send-email-artagnon@gmail.com>

Ramkumar Ramachandra wrote:

>  Had some weird compulsion to conform to the style of the other tests
>  in the previous iteration.

The tests you're talking about were introduced in commit 7b53b92f to
check for a buglet that made --strategy suppress the progress
reporting ("Finished one cherry-pick.") output cherry-pick normally
would emit.  

So no inconsistency here --- those tests are _intending_ to check the
output format and that cherry-pick, unlike cherry-pick --ff, produces
new commits (though it would probably be clearer to put checks for
these behaviors in separate test assertions), while the new failing
test you are introducing is not about those things.

Striving for a consistent style is certainly not weird.

> --- a/t/t3508-cherry-pick-many-commits.sh
> +++ b/t/t3508-cherry-pick-many-commits.sh
> @@ -59,6 +59,23 @@ test_expect_success 'cherry-pick first..fourth works' '
[...]
> +	git cherry-pick fourth second third &&
> +	{
> +		git rev-list --reverse HEAD |
> +		git diff-tree --stdin -s --format=%s
> +	} >actual &&
> +	cat >expect <<-\EOF &&
> +	fourth
> +	second
> +	third
> +	EOF
> +	test_cmp expect actual

This still feels more convoluted than expected (e.g., why --reverse?).
Something like

	printf "%s\n" third second fourth >expect &&
	...
	git log --format=%s >actual &&
	test_cmp expect actual

should be plenty.

  reply	other threads:[~2012-01-12 19:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 17:31 [BUG] multi-commit cherry-pick messes up the order of commits SZEDER Gábor
2012-01-12 13:31 ` Christian Couder
2012-01-12 14:44   ` SZEDER Gábor
2012-01-12 16:35     ` Ramkumar Ramachandra
2012-01-12 16:53     ` Jeff King
2012-01-12 17:09       ` Ramkumar Ramachandra
2012-01-12 17:14         ` Ramkumar Ramachandra
2012-01-12 17:15         ` Jeff King
2012-01-12 17:26           ` Ramkumar Ramachandra
2012-01-12 17:50             ` [PATCH] cherry-pick: add failing test for out-of-order pick Ramkumar Ramachandra
2012-01-12 18:32               ` Jonathan Nieder
2012-01-12 19:05                 ` [PATCH v2] " Ramkumar Ramachandra
2012-01-12 19:33                   ` Jonathan Nieder [this message]
2012-01-12 18:25         ` [BUG] multi-commit cherry-pick messes up the order of commits Junio C Hamano
2012-01-12 19:25           ` Ramkumar Ramachandra
2012-01-12 19:47             ` Jeff King
2012-01-12 20:11               ` Jonathan Nieder
2012-01-12 20:17                 ` Jeff King
2012-01-12 20:11             ` Junio C Hamano
2012-01-12 19:21         ` Johannes Sixt
2012-01-12 19:29           ` Ramkumar Ramachandra
2012-01-12 19:34             ` Jonathan Nieder
2012-01-12 17:47       ` Jonathan Nieder
2012-01-12 18:41         ` 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=20120112193312.GC6038@burratino \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=szeder@ira.uka.de \
    /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).