git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martinvonz@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Christian Couder <chriscool@tuxfamily.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Martin von Zweigbergk <martinvonz@gmail.com>
Subject: [PATCH v2 2/3] demonstrate broken 'git cherry-pick three one two'
Date: Tue, 28 Aug 2012 23:15:55 -0700	[thread overview]
Message-ID: <1346220956-25034-3-git-send-email-martinvonz@gmail.com> (raw)
In-Reply-To: <1346220956-25034-1-git-send-email-martinvonz@gmail.com>

Cherry-picking commits out of order (w.r.t. commit time stamp) doesn't
currently work. Add a test case to demonstrate it.

Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
---
 t/t3508-cherry-pick-many-commits.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 75f7ff4..fff20c3 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -44,6 +44,21 @@ test_expect_success 'cherry-pick first..fourth works' '
 	check_head_differs_from fourth
 '
 
+test_expect_failure 'cherry-pick three one two works' '
+	git checkout -f first &&
+	test_commit one &&
+	test_commit two &&
+	test_commit three &&
+	git checkout -f master &&
+	git reset --hard first &&
+	git cherry-pick three one two &&
+	git diff --quiet three &&
+	git diff --quiet HEAD three &&
+	test "$(git log --reverse --format=%s first..)" == "three
+one
+two"
+'
+
 test_expect_success 'output to keep user entertained during multi-pick' '
 	cat <<-\EOF >expected &&
 	[master OBJID] second
-- 
1.7.11.1.104.ge7b44f1

  parent reply	other threads:[~2012-08-29  6:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 20:41 cherry-pick and 'log --no-walk' and ordering Martin von Zweigbergk
2012-08-10 21:38 ` Junio C Hamano
2012-08-11  5:34   ` Martin von Zweigbergk
2012-08-11  6:28     ` Junio C Hamano
2012-08-13  6:27       ` [PATCH 0/4] " y
2012-08-13  7:17         ` Junio C Hamano
2012-08-13  7:26           ` Junio C Hamano
2012-08-13 16:09           ` Martin von Zweigbergk
2012-08-13 17:05             ` Junio C Hamano
2012-08-13 18:28               ` Martin von Zweigbergk
2012-08-13 21:31                 ` Junio C Hamano
2012-08-13 22:01                   ` Martin von Zweigbergk
2012-08-29  6:15         ` [PATCH v2 0/3] revision (no-)walking in order Martin von Zweigbergk
2012-08-29  6:15           ` [PATCH v2 1/3] teach log --no-walk=unsorted, which avoids sorting Martin von Zweigbergk
2012-08-29 17:34             ` Dan Johnson
2012-08-29 17:42               ` Junio C Hamano
2012-08-29  6:15           ` Martin von Zweigbergk [this message]
2012-08-30 21:02             ` [PATCH v2 2/3] demonstrate broken 'git cherry-pick three one two' Junio C Hamano
2012-08-29  6:15           ` [PATCH v2 3/3] cherry-pick/revert: respect order of revisions to pick Martin von Zweigbergk
2012-08-29  6:46           ` [PATCH v2 0/3] revision (no-)walking in order Junio C Hamano
2012-08-29 16:20             ` [PATCH] Martin von Zweigbergk has a new e-mail address Martin von Zweigbergk
     [not found]       ` <1344839240-17402-1-git-send-email-y>
2012-08-13  6:27         ` [PATCH 1/4] teach log --no-walk=unsorted, which avoids sorting y
2012-08-13  6:27         ` [PATCH 2/4] revisions passed to cherry-pick should be in "default" order y
2012-08-13 20:05           ` Junio C Hamano
2012-08-13 20:50             ` Martin von Zweigbergk
2012-08-13 21:05               ` Junio C Hamano
2012-08-15  6:05                 ` Martin von Zweigbergk
2012-08-15 17:16                   ` Junio C Hamano
2012-08-15 18:22                     ` Martin von Zweigbergk
2012-08-15 18:39                       ` Junio C Hamano
2012-08-15 20:50                         ` Martin von Zweigbergk
2012-08-13 20:10           ` Martin von Zweigbergk
2012-08-13 20:52             ` Junio C Hamano
2012-08-13  6:27         ` [PATCH 3/4] cherry-pick/revert: respect order of revisions to pick y
2012-08-13  6:27         ` [PATCH 4/4] cherry-pick/revert: default to topological sorting y
2012-08-13 20:23           ` Junio C Hamano
2012-08-13 21: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=1346220956-25034-3-git-send-email-martinvonz@gmail.com \
    --to=martinvonz@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).