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=-2.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no 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 917F21F404 for ; Tue, 27 Feb 2018 00:07:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbeB0AHK (ORCPT ); Mon, 26 Feb 2018 19:07:10 -0500 Received: from mout.gmx.net ([212.227.17.20]:35009 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbeB0AHJ (ORCPT ); Mon, 26 Feb 2018 19:07:09 -0500 Received: from [192.168.0.129] ([37.201.195.115]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MVsUW-1fEiqN0cae-00X7oK; Tue, 27 Feb 2018 01:07:03 +0100 Date: Tue, 27 Feb 2018 01:07:01 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@MININT-6BKU6QN.europe.corp.microsoft.com To: Igor Djordjevic cc: Sergey Organov , git@vger.kernel.org, Johannes Sixt , Junio C Hamano , Jacob Keller Subject: Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear) In-Reply-To: Message-ID: References: <87y3jtqdyg.fsf@javad.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:kKW/36ZaL6uJB3kb6Z0M3VWx1k1izW8V1X5pAJjLIwhTY1aVqiT h4O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NBzGmXfJmSal9tEO/nrvQFSZaf3uoFOqJlCy2bw Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Buga, On Tue, 20 Feb 2018, Igor Djordjevic wrote: > I`m really interested in this topic, which seems to (try to) address the > only "bad feeling" I had with rebasing merges - being afraid of silently > losing amendments by actually trying to "replay" the merge (where > additional and possibly important context is missing), instead of really > "rebasing" it (somehow). If those amendments are what you are worried about, why not address them specifically? In other words, rather than performing the equivalent of git show ^! | git apply (which would of course completely ignore if the rewritten ^2 dropped a patch, amended a patch, or even added a new patch), what you really want is to figure out what changes the user made when merging, and what merge strategy was used to begin with. To see what I mean, look at the output of `git show 0fd90daba8`: it shows how conflicts were resolved. By necessity, this is more complicated than a simple diff: it is *not* as simple as taking a diff between two revisions and applying that diff to a third revision. There were (at least) three revisions involved in the original merge commit, and recreating that merge commit faithfully means to represent the essence of the merge commit faithfully enough to be able to replay it on a new set of at least three revisions. That can be simplified to two-way diffs only in very, very special circumstances, and in all other cases this simplification will simply fall on its nose. If the proposed solution was to extend `git apply` to process combined diffs, I would agree that we're on to something. That is not the proposed solution, though. In short: while I am sympathetic to the desire to keep things simple, the idea to somehow side-step replaying the original merge seems to be *prone* to be flawed. Any system that cannot accommodate dropped/changed/added commits on either side of a merge is likely to be too limited to be useful. Ciao, Johannes