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: Philippe Blain 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