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 343061F424 for ; Sun, 22 Apr 2018 17:17:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751787AbeDVRR1 (ORCPT ); Sun, 22 Apr 2018 13:17:27 -0400 Received: from smtp-out-3.talktalk.net ([62.24.135.67]:46987 "EHLO smtp-out-3.talktalk.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeDVRR0 (ORCPT ); Sun, 22 Apr 2018 13:17:26 -0400 Received: from [192.168.2.201] ([92.28.131.105]) by smtp.talktalk.net with SMTP id AIc5fcnzuHCowAIc5fC1AL; Sun, 22 Apr 2018 18:17:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=talktalk.net; s=cmr1711; t=1524417444; bh=Y9SHvUwbfJO39quZjt/XaGJ1Bi1EPEzjBl8FQzQsqzU=; h=Reply-To:Subject:From:To:Cc:References:Date:In-Reply-To; b=XVx+5bh7WI/8rP01/M06peUxtshQLb3pHxjJZ9cmmcpYzekelJe8aJhmMxWTTK2nF F7vDiWA5zeAcGhqyk47Qt7jktCK5wFI6gKWMaZFx2IByK2PAHDCyEHnGAniJCgL+tw dlzjDtKg8myqHEjXuXI7S842H4UCj+KFov5+7LyI= X-Originating-IP: [92.28.131.105] X-Spam: 0 X-OAuthority: v=2.3 cv=SfXZiMZu c=1 sm=1 tr=0 a=D1tPBkQZhJ8hQpCscnDOhQ==:117 a=D1tPBkQZhJ8hQpCscnDOhQ==:17 a=IkcTkHD0fZMA:10 a=tjO7c0THXC7d9XdhWvQA:9 a=Z9v9l53701wMIkyR:21 a=o3VIZwRaYWTsRxYK:21 a=QEXdDO2ut3YA:10 Reply-To: phillip.wood@dunelm.org.uk Subject: Re: [PATCH v8 06/16] sequencer: introduce the `merge` command From: Phillip Wood 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> Message-ID: <0b0555fb-9fec-cd9d-f2f2-cecb51412128@talktalk.net> Date: Sun, 22 Apr 2018 18:17:21 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfI40Hg/SEJoHuLyaGTTFeGwtiPspDOSwBtrcGyz+/9I55Z9RtWp1mkxLrx+Va3STDCtOtNb3cyqxWmT54dJF0wxmUCKRtIKv0mXMD9XPkJYixxAMmC/g T9AFuupUaT+v77YE95UB9qScOVr+0L/WaYNj83C/+SvW9dC4mpokj3R0uJ26+QFRyLUbKvcEKaW/pfxvNhiAYjVUYBUU/hreJEj35A+6voPsm6ikhAQsBzlR Rfc2i5VxXUMOnIf+Pi2mJLwhWw3v88baiWvkVtsPyy4zKnNzEQ85oG8KWMT72xiL2mW0ynZPbZr4SwX8cM0Crsz2SX5D4fWTfSnDOoBAB3cK8y+RCtWfmnL6 rBZHw6YLf7JbBygYxa+8Xjmfa9ThWG2PO/6+yk4sVU3BtPFGxmhMw65STSEbWu1MhDtLnN7ZLt2GqyZtinEbvOLJZLSKz3VLMLLFxDYq14EttRpoCqS2XZI0 Se5D6d/siZNehwxlvsCTDdGZWnTyWElzxRd2ZQjHCIAnHDaaqNzLvIeCRBoNQGJpzh4hnMKs8II6cYNA Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 21/04/18 16:56, Phillip Wood wrote: > 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. Looking at the existing code this is consistent with (most) of the rest of the sequencer. The code to fast-forward commits will overwrite ignored files, and I think the initial checkout will as well but the rest (picking commits and the new merge command) will not. > 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