From patchwork Fri Oct 12 13:14:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10638661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F722157A for ; Fri, 12 Oct 2018 13:14:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F24332B34C for ; Fri, 12 Oct 2018 13:14:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E626A2B399; Fri, 12 Oct 2018 13:14:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95FE12B34C for ; Fri, 12 Oct 2018 13:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728643AbeJLUqv (ORCPT ); Fri, 12 Oct 2018 16:46:51 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36523 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728354AbeJLUqu (ORCPT ); Fri, 12 Oct 2018 16:46:50 -0400 Received: by mail-pf1-f193.google.com with SMTP id l81-v6so6199634pfg.3 for ; Fri, 12 Oct 2018 06:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=4/UGQ/7mythW0rZr0mU9g6mUu2AWRRZi03i+4TrW1kU=; b=KxwJ6LA761tMsy9zeiISDNJt/TGG9f6qSLpLjPxPTtw3mit3fj9il4e7fG5e6iMz4k Lu3+38IoS+qUd5Jl50oEhQm0je7V8e0uJqUq2DxHnYPnHxMuU2m53X84CPrPMZPVuDoj MoNTiUC4WFrLc793LxDexlI2+eA2FJXxaGR+5s+vdPgVyAtjGBnexHQiDEXsZABhy+bs Pjm5g/eAGcYEseJfYKvBTMydOw+NhA0UxFJ9739qixWGy+tfc4rRbV/Ik8i4Fi6tPcWn xoiDg7rRBh1HwS14jZr7+eOgH+qg256AAT4aErPv9VTqNcoEgjBr7SHNDquzyqAQpBLn 3YZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=4/UGQ/7mythW0rZr0mU9g6mUu2AWRRZi03i+4TrW1kU=; b=MNy3nSFCncibEpCCYnPwBej2L0/rvC3dKqMtWRrIyrHLiZKdevvulIAklJT7/xs2kk IrGimHO6K7c1V8GrupqDbqHGXqieMVluPCUSaZdXU7dAoRlKgll2LtRSW491QK8utyyM hldEzyGHOEVTiCkyneIK8X0gjnfyJkWYyLzlN3XRE374eSsQ+qMvVvFgKeOKjCf6ZLL4 kh6QEEKNMxM9ZXaLlyxG03LzfBetifSjcMG9NbF/FmaE7dpA4t2g/zBspx3wynQMzP7I wYOI7kQNf/mVg9kw48+G3KinVlc/k0I1qI+xLWcoW1mEMWTUBX6sQtHbp7lB/GAm4KM6 mX+A== X-Gm-Message-State: ABuFfoh+BYuHUnxZfxm8Zv7o9AqG4ovORiah8TT8Epl1oeWE4qWdqbHQ L9iuVSlETAsH2UdJITAMarLPHG5m X-Google-Smtp-Source: ACcGV63jwHmHR3aW8ZxjfFJm1SCEoMlj2ruYHitt1HOUVWU62HbhWv+Cy7laycVubHQMBzD0ue2InA== X-Received: by 2002:a63:6c84:: with SMTP id h126-v6mr5537524pgc.237.1539350065833; Fri, 12 Oct 2018 06:14:25 -0700 (PDT) Received: from [127.0.0.1] ([40.112.137.127]) by smtp.gmail.com with ESMTPSA id c79-v6sm2521201pfc.92.2018.10.12.06.14.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 06:14:24 -0700 (PDT) Date: Fri, 12 Oct 2018 06:14:24 -0700 (PDT) X-Google-Original-Date: Fri, 12 Oct 2018 13:14:20 GMT Message-Id: <92512a82d27b57dedf9dc9423dfac2efcb229031.1539350061.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v3 1/2] rebase -i: clarify what happens on a failed `exec` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin We had not documented previously what happens when an `exec` command in an interactive rebase fails. Now we do. Signed-off-by: Johannes Schindelin --- Documentation/git-rebase.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 091eb53faa..d9771bd25b 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -420,7 +420,8 @@ idea unless you know what you are doing (see BUGS below). --exec :: Append "exec " after each line creating a commit in the final history. will be interpreted as one or more shell - commands. + commands. Any command that fails will interrupt the rebase, + with exit code 1. + You may execute several commands by either using one instance of `--exec` with several commands: From patchwork Fri Oct 12 13:14:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin via GitGitGadget X-Patchwork-Id: 10638665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 888AB14E2 for ; Fri, 12 Oct 2018 13:14:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76AE12B34C for ; Fri, 12 Oct 2018 13:14:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A9922B399; Fri, 12 Oct 2018 13:14:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3AF52B34C for ; Fri, 12 Oct 2018 13:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728670AbeJLUqw (ORCPT ); Fri, 12 Oct 2018 16:46:52 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40725 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728667AbeJLUqw (ORCPT ); Fri, 12 Oct 2018 16:46:52 -0400 Received: by mail-pg1-f193.google.com with SMTP id n31-v6so5841836pgm.7 for ; Fri, 12 Oct 2018 06:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=yRcZO08AMwfu94oKwcRzM9e3tm7gKNl1kq2VUmqpeYU=; b=eVHV1UNacV6bhaudVPDG6X+4OvU61Bdq5lErfjIuMG2ANi6gaQtcjghoIvE0UbB+Q/ IqXvrQBz0AiIIzk4WZp+fRDqD3xrBCZKDB1VCBP9kPE7tjr1IRYXYRK5a2yMlJ2oPrrl +1INDJTbIScCw4PSSh5Y0saguLrOkCG9OBtuZizs/p7eyWrsGl0SycNC74qjrktUdKlf ePjPywonzXqruNAfYsz7aKQDLY5qHOMNHz5BxNTv/Tw4fRHj4OLy1LORDJq2jheHFySO 0qENxILqonDbUEAl2ED6VikkMHgsPWmiO2KW2Sl93B8o9CHIS67Dw0xoGEV0JD13dNiK Q3JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=yRcZO08AMwfu94oKwcRzM9e3tm7gKNl1kq2VUmqpeYU=; b=gkVFz8KM6lvsFi2WzgHN0cafA1kmznJCnz+RB6jMxiZKJEFk1+R1EGUE+Bx1Jt97gH fattcMylbwxw8kFR/PUCk1vZAHbV6uEhXQcDbLB4PYB3ChrmuawTuL97QokZ2NmsQdk/ JyaGZfhOVC4jBqFWfhi4DJMomK4L4ayJhxd3dIMOrMIyA6gVq4mhfSkW6GFXR6SW/b/Y GVdZJmwYr5ct2KDrdzl325c978hzpiU503IxgCKwAopTj/uj4xbhWVl73nuTJSP64RMN 7OsnvMkZ8zgcyRPjAf2n/dqzr5G+bUqm3gXr1HU/FIsaoBp90vI3LqHvmUkBZVh8gIhN 1xGQ== X-Gm-Message-State: ABuFfoikwQ28M6rPeqJlihpKSSU+I5dOS7B8WUIukqAaJHJJwQCZhOaD ZdPMVaRxijRc/LjlUim4FHHaEUtv X-Google-Smtp-Source: ACcGV61PE5p8olf0EuZTLcZi2o53GYYWg49QlAxx8FOB2qXPIKglILMz83bVNMgSHTV7gX45yGcGQA== X-Received: by 2002:a65:65c6:: with SMTP id y6-v6mr5374366pgv.233.1539350067251; Fri, 12 Oct 2018 06:14:27 -0700 (PDT) Received: from [127.0.0.1] ([40.112.137.127]) by smtp.gmail.com with ESMTPSA id a190-v6sm2003994pge.47.2018.10.12.06.14.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 06:14:26 -0700 (PDT) Date: Fri, 12 Oct 2018 06:14:26 -0700 (PDT) X-Google-Original-Date: Fri, 12 Oct 2018 13:14:21 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v3 2/2] rebase -i: introduce the 'break' command Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Phillip Wood , Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Johannes Schindelin The 'edit' command can be used to cherry-pick a commit and then immediately drop out of the interactive rebase, with exit code 0, to let the user amend the commit, or test it, or look around. Sometimes this functionality would come in handy *without* cherry-picking a commit, e.g. to interrupt the interactive rebase even before cherry-picking a commit, or immediately after an 'exec' or a 'merge'. This commit introduces that functionality, as the spanking new 'break' command. Suggested-by: Stefan Beller Signed-off-by: Johannes Schindelin --- Documentation/git-rebase.txt | 3 +++ rebase-interactive.c | 1 + sequencer.c | 24 +++++++++++++++++++++++- t/lib-rebase.sh | 2 +- t/t3418-rebase-continue.sh | 9 +++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index d9771bd25b..6b71694b0d 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -561,6 +561,9 @@ By replacing the command "pick" with the command "edit", you can tell the files and/or the commit message, amend the commit, and continue rebasing. +To interrupt the rebase (just like an "edit" command would do, but without +cherry-picking any commit first), use the "break" command. + If you just want to edit the commit message for a commit, replace the command "pick" with the command "reword". diff --git a/rebase-interactive.c b/rebase-interactive.c index 0f4119cbae..78f3263fc1 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -14,6 +14,7 @@ void append_todo_help(unsigned edit_todo, unsigned keep_empty, "s, squash = use commit, but meld into previous commit\n" "f, fixup = like \"squash\", but discard this commit's log message\n" "x, exec = run command (the rest of the line) using shell\n" +"b, break = stop here (continue rebase later with 'git rebase --continue')\n" "d, drop = remove commit\n" "l, label