From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: [PATCH v2 1/2] t3404: demonstrate =?UTF-8?Q?CHERRY=5FPICK=5FHEAD?= =?UTF-8?Q?=20bug?= Date: Thu, 18 Jun 2015 13:44:38 +0200 Organization: gmx Message-ID: <930906ab4bb4d629d8963850460c1d15f958af5a.1434627492.git.johannes.schindelin@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org, szeder@ira.uka.de To: gitster@pobox.com X-From: git-owner@vger.kernel.org Thu Jun 18 13:45:01 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z5YFe-0004Fa-6e for gcvg-git-2@plane.gmane.org; Thu, 18 Jun 2015 13:44:58 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbbFRLow convert rfc822-to-quoted-printable (ORCPT ); Thu, 18 Jun 2015 07:44:52 -0400 Received: from mout.gmx.net ([212.227.17.21]:57604 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbbFRLov (ORCPT ); Thu, 18 Jun 2015 07:44:51 -0400 Received: from www.dscho.org ([87.106.4.80]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Mg0IT-1ZT0Py1eqb-00NUuX; Thu, 18 Jun 2015 13:44:39 +0200 In-Reply-To: X-Sender: johannes.schindelin@gmx.de User-Agent: Roundcube Webmail/1.1.0 X-Provags-ID: V03:K0:8Kluxu64qTU2OU97KYnOLXBaEdVmMoum7YaFaOO2SgzDfB4UsLK pODCkicw31t220Dhu36mFS4nML500l6m8G736PWecHfhSw23wrlCxkH1vvHOkAvqR/5a2e5 W7DNdcHmzbTWsZlQgrMpgZ88T6bu5eDQ14dyD1T9q0uXiBqJrTvJ1S6SsARiWpdcBa/RN/+ 7TJc1IDmEMZxU3DTr01EA== X-UI-Out-Filterresults: notjunk:1;V01:K0:D7bT3Wjkwz8=:AbILY4z/3pacMXKiFWa3yV bwezdNwM0SO/VNENfqSvdmJipojQNaecHiqfV54L1fnIvlwb1i22z8+G1z5tT4nrbChKwCptf YG2Ufxg2mrD/C0rXJJnbDvr3wupilQfNQkaORmvnUlcJBUPJ9lrA3s5yPurS+XvbCCqKJULWq azKDYg2NijmAQkSPQch8mBdZ80xOTIgahY/zdxuyXAUsc1y52YBUXnoPB4wmQT+cJQK0OOuM/ AH9YGsPXFONHv2ou4VRecSNrOVA2iR+FwXcEhIRgsTQn1ap2yxI34W5ZtWLZK9fBqAG0Weyhm jBi6nWzS3Wg+aUImZFfY0S62QnZE/rDNoR83rh3YvA0hWTDp2GrBW18X0BfwgH8/yd3pYZEOe uT4+6i1yZWUw3o/0lsbh6y6eWnHpC0PjB+VfFwimXyUWNCH4RxQ7ICuXgphJ6UJDCPvHdLMdn lalagQGe6l4FY2Rvhhh2DBDIMUP6tT12qeJB1vOCzGDpjThFTgPbBnVqEH4sAwXGi0UJy23Yp hdwqzdXqb7+YiMnh7jmCSIa5VWjM5pUDfu7zpcI0eHYeofOewf98wizeOJN2A7kkj3VYXiMal ZIAEq45Wl0dNnfl7aB4TnQ82BI+mASQiVDhBw6kLG4Zh5BP3Zm5i3DlTI0RoEkPbM9vrQH+g7 giHpYGWzUayt/cvTOi5usvNRIBxkDW3yRPBuy36Di583rFf4QuVVywo28Kg5jtPQRxiA= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: When rev-list's --cherry option does not detect that a patch has alread= y been applied upstream, an interactive rebase would offer to reapply it = and consequently stop at that patch with a failure, mentioning that the dif= f is empty. Traditionally, a `git rebase --continue` simply skips the commit in suc= h a situation. However, as pointed out by G=C3=A1bor Szeder, this leaves a CHERRY_PICK= _HEAD behind, making the Git prompt believe that a cherry pick is still going on. This commit adds a test case demonstrating this bug. Signed-off-by: Johannes Schindelin --- t/t3404-rebase-interactive.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive= =2Esh index ac429a0..e5e7744 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1102,4 +1102,25 @@ test_expect_success 'rebase -i commits that over= write untracked files (no ff)' ' test $(git cat-file commit HEAD | sed -ne \$p) =3D I ' =20 +test_expect_failure 'rebase --continue removes CHERRY_PICK_HEAD' ' + git checkout -b commit-to-skip && + for double in X 3 1 + do + seq 5 | sed "s/$double/&&/" >seq && + git add seq && + test_tick && + git commit -m seq-$double + done && + git tag seq-onto && + git reset --hard HEAD~2 && + git cherry-pick seq-onto && + set_fake_editor && + FAKE_LINES=3D test_must_fail git rebase -i seq-onto && + test -d .git/rebase-merge && + git rebase --continue && + git diff seq-onto && + test ! -d .git/rebase-merge && + test ! -f .git/CHERRY_PICK_HEAD +' + test_done --=20 2.3.1.windows.1.9.g8c01ab4