From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id CD07A1F97E 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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