From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 9AF721F404 for ; Tue, 30 Jan 2018 20:17:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751475AbeA3URE (ORCPT ); Tue, 30 Jan 2018 15:17:04 -0500 Received: from mail-yw0-f194.google.com ([209.85.161.194]:41327 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeA3URC (ORCPT ); Tue, 30 Jan 2018 15:17:02 -0500 Received: by mail-yw0-f194.google.com with SMTP id b129so5732337ywa.8 for ; Tue, 30 Jan 2018 12:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5cwVztszzTMnHcecWIzEpfVYBsd97sMbhs3waDoGxo0=; b=eNvSBAAkWFXbjvHla3QCiVQUwe61QsM9MtMHxcSVy5dWAeVLzCA+I/VCcyvl+RZJ4C scQ11jln2cgsHNKP4fW5d8p0RWJx3hKCZBb/GEhQ2JMqq0gS295Ygv8ZUkd0QCwaOIeJ nhug1RTUY1HC7rVZt3a+c3HD3/OoICTMxRAcSLDEnPqK18eazs+dFW/XNMc7NKbubnf9 4bcoVGjS19Yzue08Zun5x+MDeq5LiozBBFh2e8m9QKBYkiWQfBJuyzLiXS9UIStTxGEl Pd9S01b8vo53nDgVRk1eOGDT6U7j7CL8ohdL62qS9Va32mRRLBVUYeAgJ4FzUk+u2z+6 NXBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5cwVztszzTMnHcecWIzEpfVYBsd97sMbhs3waDoGxo0=; b=fwMIHPrMqPzsc+0AL5MKXSFXrBOWhHEQDLcNbO1pppJG7+TisK1oriC2tM+WaiWGKS taPv43CyIDU93yfNdpEcoAV+P4i/FoPXiK7uZW2dYZpdp1VgNZDUu0vnTmQJRIVInkI/ FX0/GWoA7Pf4o6wkmATy/8mRkdZj/VcSa3cIYS57rC/MIxTb+Ewl1CV0vRp6F8R5ZdFR TOWJZ/IPTjiaOj9ukCnamhE/gYvZL6BgOuQfz9Gs9aSzBC6TUYRZwrHxQpSnRv0wgXce VR+n4FwKFsQexniCEAW6BlI+kzSafirVOQFRvV+f3SJj32NGOWiGIA7gX8xUkvvWNVXG LIXw== X-Gm-Message-State: AKwxytcK19k6ueWdBdxBK/RcQKOgNukZU8mw2ymaN4QeUOA7BG03l8YP hWR0JaF+PRUFR/nZRxAtUpcb+nAzqyDQCKqoA/FVgdHda3k= X-Google-Smtp-Source: AH8x227/xl5AfXjpJJMGgpn6a5sZVpzCkGu+yKNnH6fAFVx17IGn3f4Y3paG1IrlgMBRmZdqREX+fMu0AIgFPNt4Tno= X-Received: by 10.129.122.73 with SMTP id v70mr20297677ywc.156.1517343421836; Tue, 30 Jan 2018 12:17:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.207.9 with HTTP; Tue, 30 Jan 2018 12:17:01 -0800 (PST) In-Reply-To: <36281a14bc9f9a53e6c1bead561e3c93744047a8.1517266437.git.johannes.schindelin@gmx.de> References: <36281a14bc9f9a53e6c1bead561e3c93744047a8.1517266437.git.johannes.schindelin@gmx.de> From: Stefan Beller Date: Tue, 30 Jan 2018 12:17:01 -0800 Message-ID: Subject: Re: [PATCH v2 02/10] sequencer: introduce new commands to reset the revision To: Johannes Schindelin Cc: git , Junio C Hamano , Jacob Keller , Philip Oakley , Eric Sunshine , Phillip Wood Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Jan 29, 2018 at 2:54 PM, Johannes Schindelin wrote: > In the upcoming commits, we will teach the sequencer to recreate merges. > This will be done in a very different way from the unfortunate design of > `git rebase --preserve-merges` (which does not allow for reordering > commits, or changing the branch topology). > > The main idea is to introduce new todo list commands, to support > labeling the current revision with a given name, resetting the current > revision to a previous state, merging labeled revisions. > > This idea was developed in Git for Windows' Git garden shears (that are > used to maintain the "thicket of branches" on top of upstream Git), and > this patch is part of the effort to make it available to a wider > audience, as well as to make the entire process more robust (by > implementing it in a safe and portable language rather than a Unix shell > script). > > This commit implements the commands to label, and to reset to, given > revisions. The syntax is: > > label > reset > > Internally, the `label ` command creates the ref > `refs/rewritten/`. This makes it possible to work with the labeled > revisions interactively, or in a scripted fashion (e.g. via the todo > list command `exec`). > > Later in this patch series, we will mark the `refs/rewritten/` refs as > worktree-local, to allow for interactive rebases to be run in parallel in > worktrees linked to the same repository. > > Signed-off-by: Johannes Schindelin > --- > git-rebase--interactive.sh | 2 + > sequencer.c | 180 ++++++++++++++++++++++++++++++++++++++++++++- > 2 files changed, 179 insertions(+), 3 deletions(-) > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index fcedece1860..7e5281e74aa 100644 > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.sh > @@ -162,6 +162,8 @@ s, squash = use commit, but meld into previous commit > f, fixup = like \"squash\", but discard this commit's log message > x, exec = run command (the rest of the line) using shell > d, drop = remove commit > +l, label