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.2 required=3.0 tests=AWL,BAYES_00, 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.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 54DF71F424 for ; Thu, 12 Apr 2018 09:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbeDLJa6 (ORCPT ); Thu, 12 Apr 2018 05:30:58 -0400 Received: from mout.gmx.net ([212.227.15.15]:58727 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbeDLJa5 (ORCPT ); Thu, 12 Apr 2018 05:30:57 -0400 Received: from [192.168.0.129] ([37.201.195.115]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LwaQZ-1eP1bc0GVz-018GUa; Thu, 12 Apr 2018 11:30:47 +0200 Date: Thu, 12 Apr 2018 11:30:29 +0200 (DST) From: Johannes Schindelin X-X-Sender: virtualbox@MININT-6BKU6QN.europe.corp.microsoft.com To: Phillip Wood cc: git@vger.kernel.org, Junio C Hamano , Jacob Keller , Stefan Beller , Philip Oakley , Eric Sunshine , Igor Djordjevic , Johannes Sixt , Sergey Organov Subject: Re: [PATCH v6 15/15] rebase -i --rebase-merges: add a section to the man page In-Reply-To: <26c21a44-92b3-80f4-5211-034c64f7568c@talktalk.net> Message-ID: References: <26c21a44-92b3-80f4-5211-034c64f7568c@talktalk.net> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/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Vb/jkmXo5JGWQZqxEDlDE5EPBB+kCdkgGkQMMo+1K +Sp8qBLwnUKlYoGCxHQi4XK8V/wBXKMJ/AzF9Zt0vrP7y2FnEc= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Phillip, On Wed, 11 Apr 2018, Phillip Wood wrote: > On 10/04/18 13:30, Johannes Schindelin wrote: > > Firstly let me say that I think expanding the documentation and having an > example is an excellent idea. Thanks! At first, I meant to leave this for others to contribute, but I think it makes sense for me to describe it, as I do have a little bit of experience with rebasing merges. > > + > > +------------ > > +label onto > > + > > +# Branch: refactor-button > > +reset onto > > +pick 123456 Extract a generic Button class from the DownloadButton one > > +pick 654321 Use the Button class for all buttons > > +label refactor-button > > + > > +# Branch: report-a-bug > > +reset refactor-button # Use the Button class for all buttons > > +pick abcdef Add the feedback button > > +label report-a-bug > > + > > +reset onto > > +merge -C a1b2c3 refactor-button # Merge 'refactor-button' > > +merge -C 6f5e4d report-a-bug # Merge 'report-a-bug' > > +------------ > > + > > +In contrast to a regular interactive rebase, there are `label`, `reset` and > > +`merge` commands in addition to `pick` ones. > > + > > +The `label` command puts a label to whatever will be the current > > s/puts a label to/associates a label with/ would be clearer I think. Maybe > s/whatever will be the current revision/the current HEAD/ an well? Thanks, I incorporated both changes here. > > +revision when that command is executed. Internally, these labels are > > +worktree-local refs that will be deleted when the rebase finishes or > > +when it is aborted. > > I agree they should be deleted when the rebase is aborted but I cannot see any > changes to git-rebase.sh to make that happen. I think they should also be > deleted by 'rebase --quit'. Oh right! For some reason I thought I already hooked up rebase--helper --abort when rebase was called with --abort or quit, but I had not managed yet. I think I will leave this for later, or for GSoC, or something. In the meantime, I'll just drop the "or when it is aborted.". > > That way, rebase operations in multiple worktrees > > +linked to the same repository do not interfere with one another. > > + > > +The `reset` command is essentially a `git reset --hard` to the specified > > +revision (typically a previously-labeled one). > > s/labeled/labelled/ As Eric pointed out, I am using 'murricane spelling here (or is it speling? Ya never know these days). > I think it would be worthwhile to point out that unlike the other commands > this will not preserve untracked files. Maybe something like > "Note that unlike the `pick` or `merge` commands or initial checkout when the > rebase starts the `reset` command will overwrite any untracked files." You know what? You just pointed out a bug in my thinking. Previously, I thought that this is impossible, that you cannot overwrite untracked files because we labeled this revision previously, so the only new files to write by `reset` were tracked files previous. But that forgets `exec` and `reset` with unlabeled revisions (e.g. for cousins). So I changed the `reset` command to refuse overwriting untracked files... Thank you for improving this patch series! Dscho