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.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_DKIMWL_WL_MED 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 460141F404 for ; Sat, 21 Apr 2018 15:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbeDUP43 (ORCPT ); Sat, 21 Apr 2018 11:56:29 -0400 Received: from smtp-out-4.talktalk.net ([62.24.135.68]:63361 "EHLO smtp-out-4.talktalk.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbeDUP42 (ORCPT ); Sat, 21 Apr 2018 11:56:28 -0400 Received: from [192.168.2.240] ([92.28.131.105]) by smtp.talktalk.net with SMTP id 9usCfw0k7C0Wb9usCfAtcs; Sat, 21 Apr 2018 16:56:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=talktalk.net; s=cmr1711; t=1524326186; bh=AtDTvL0pJMlgn7AthP+kGLYWEdehBsQ+s0ZHdz68Srk=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To; b=f/kogD4mBID2FOtxb3QdIqiZOuth6kaeE6YcamGSZs2I3y80E1XBj6QPx2OmLP71K VfMfggsMQTnzjqzn4JnN1zBZ6/t1yAendl9koC5s0/rODuEbqFWo+FgGLRYGV5fQ7c cN+pWt4z/hiJIeEBY4QEYWA11C0iLMDCk5bkQ5sQ= X-Originating-IP: [92.28.131.105] X-Spam: 0 X-OAuthority: v=2.3 cv=Q+T8Hb+a c=1 sm=1 tr=0 a=D1tPBkQZhJ8hQpCscnDOhQ==:117 a=D1tPBkQZhJ8hQpCscnDOhQ==:17 a=IkcTkHD0fZMA:10 a=5D_q5xKx6-mmE5nwjOkA:9 a=eYe15jlsyzK-yUNm:21 a=BDFqcNWXu9Xvpyjk:21 a=QEXdDO2ut3YA:10 Reply-To: phillip.wood@dunelm.org.uk Subject: Re: [PATCH v8 06/16] sequencer: introduce the `merge` command To: Johannes Schindelin , git@vger.kernel.org Cc: Junio C Hamano , Jacob Keller , Stefan Beller , Philip Oakley , Eric Sunshine , Phillip Wood , Igor Djordjevic , Johannes Sixt , Sergey Organov , =?UTF-8?Q?Martin_=c3=85gren?= References: <7360a072f6fdd276d30839613434329b645e2cce.1524306546.git.johannes.schindelin@gmx.de> From: Phillip Wood Message-ID: Date: Sat, 21 Apr 2018 16:56:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <7360a072f6fdd276d30839613434329b645e2cce.1524306546.git.johannes.schindelin@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB-large Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfHf6w0O3o5/I5d+ECPf+j31IfKwgQhsMcfiQR7oQK7eQPA61CA6jYFVvzviFl+JwIHtDu814v1dkgCl9Hbavhri7Lcet4hLIhQINrewCaM0Z8crXeNLZ Xx9uBqyyKg/XPeeVFgzW8uxwRYMNKC78QXgtBbiKGJOI0AXOYY0UrvFheuJDh23kwP9UVgpZJP5Qrc0r3ZxaSPvC3f6BoDAnxYJACYjR5CGIvcpR6jOOSK7f lF2WgMFFcs3deZ5PVxxNCIaL2y8YBuwgH87/ApqLFU5IJHjzAiE+9qBF+82YTdQ0B2pPD38+O3gYiSME9uBHrSTu+wvsAAleXQsxc4I2ucwZu4Y9CYXg1ukF p9hSvgMs6+RvePoQEhy9iVe+Ss9/Rb85l6iTGQS0VeL0tmkgwdqFXmq3XTTN04RKPs+hCJeAluWOVn73MO+HuvOXMxte2zTMB+FGQXqc2dmmG/39sWI7V7KG i1htJHuE33DWxfe0cJ6wYg0wZ09yLw6h1fAmJ9G2PYsqvNWRWwRAy0HU9samuwhCn88ZgV+ns1LF9vL5 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 21/04/18 11:33, Johannes Schindelin wrote: > This patch is part of the effort to reimplement `--preserve-merges` with > a substantially improved design, a design that has been developed in the > Git for Windows project to maintain the dozens of Windows-specific patch > series on top of upstream Git. > > The previous patch implemented the `label` and `reset` commands to label > commits and to reset to labeled commits. This patch adds the `merge` > command, with the following syntax: The two patches seem to have been fused together in this series. If the reset command fails because it would overwrite untracked files it says error: Untracked working tree file 'b' would be overwritten by merge. Followed by the hint to edit the todo file. Saying 'merge' rather 'reset' is possibly confusing to users. Perhaps it could call setup_unpack_trees_porcelain(), though that would need to be extended to handle 'reset'. Also it currently refuses to overwrite ignored files which is either annoying or safe depending on one's point of view. Best Wishes Phillip > > merge [-C ] # > > The parameter in this instance is the *original* merge commit, > whose author and message will be used for the merge commit that is about > to be created. > > The parameter refers to the (possibly rewritten) revision to > merge. Let's see an example of a todo list: > > label onto > > # Branch abc > reset onto > pick deadbeef Hello, world! > label abc > > reset onto > pick cafecafe And now for something completely different > merge -C baaabaaa abc # Merge the branch 'abc' into master > > To edit the merge commit's message (a "reword" for merges, if you will), > use `-c` (lower-case) instead of `-C`; this convention was borrowed from > `git commit` that also supports `-c` and `-C` with similar meanings. > > To create *new* merges, i.e. without copying the commit message from an > existing commit, simply omit the `-C ` parameter (which will > open an editor for the merge message): > > merge abc > > This comes in handy when splitting a branch into two or more branches. > > Note: this patch only adds support for recursive merges, to keep things > simple. Support for octopus merges will be added later in a separate > patch series, support for merges using strategies other than the > recursive merge is left for the future. > > Signed-off-by: Johannes Schindelin > --- > git-rebase--interactive.sh | 6 + > sequencer.c | 407 ++++++++++++++++++++++++++++++++++++- > 2 files changed, 406 insertions(+), 7 deletions(-) > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh > index e1b865f43f2..ccd5254d1c9 100644 > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.sh > @@ -162,6 +162,12 @@ 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