From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B67A71F5AE for ; Fri, 11 Jun 2021 17:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbhFKRnL (ORCPT ); Fri, 11 Jun 2021 13:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbhFKRnL (ORCPT ); Fri, 11 Jun 2021 13:43:11 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F37FC061574 for ; Fri, 11 Jun 2021 10:40:58 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id x24so4064866lfr.10 for ; Fri, 11 Jun 2021 10:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XifaL5eNAfsFOP31fRRuniRb5KiID4tJvoJmJspvrk0=; b=JskYOMY3gUgxJCdJrvpbtQWFh8A1bu8IF9AhWB7NqMaGBdNI1sBqcEEOm7ElbCNjFU Y63dK6uugQSP0r0P41zKXWvmgm584sc1a0QNgz4Qyhpy2Z80meKbg8hSHRCCWpcFKFIw QN8Vy7QoxGnSCUlVl+ShVRi1TFqU3+jx2/5oBAuVNcLv7Si8ZYpifz5AGSprrx7qB650 jWg6uqDugNLjvdoE/pRt24T34VzqIOAa1OP6e1oDpOH+5jlEsZtHhQMwkTKnr4aO9ELq XUWsMzRAZ9Pxhy4S11YkKPk9jRdSACI+e25DZ4PKNKslekTmPZo3F71Z1KMXObzr2KBE jMLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=XifaL5eNAfsFOP31fRRuniRb5KiID4tJvoJmJspvrk0=; b=gVipTuMPXTNbrQx1atZFYVEFjGxaYmiafxNgKXMWw+9QrBVQmcgp2l76tpRugdFxB+ 0sqoXeXkCzYIgywO87UHfS5QBYGBCSQABNCaPy5UBR0FY6mTJxvXOs0NWzjuvyjPpLew NYdmDNoJ38QWFHSH6utv23JNQ6iJjP23xTeUguAqG6Snxp9xdVFNqR82faKZYpB1FHc/ X3hGlEt1bRZOanLPBzcXTeds7w7WARsas93ThZkaDgS2WNPn36jMj8Q90b9V5vsHuL4D V03NSMYu3caARrv9/rFFCwKchVY26GFMLy+eJcSBGlBxBCpsqYLi3LErU08b8zbNaTiH RYaA== X-Gm-Message-State: AOAM533pxPpqBWjz/Wvj/+iTvyDfc/Yz+hKFt0rjmWg6I3IEZKVEJoM9 z542x9pjztt30s+MlrrWmXXQn2l2wAc= X-Google-Smtp-Source: ABdhPJyU4mgiBiAQYA2CchDXRViKz/51zWXVpl4rMgfF+YnqBlG2XEZCjv6tbBT5xYIKdNaiAvQ9zQ== X-Received: by 2002:ac2:4f82:: with SMTP id z2mr3203816lfs.39.1623433256406; Fri, 11 Jun 2021 10:40:56 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id s9sm802182ljj.52.2021.06.11.10.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 10:40:55 -0700 (PDT) From: Sergey Organov To: Felipe Contreras Cc: Johannes Sixt , Junio C Hamano , Jeff King , David Aguilar , Bagas Sanjaya , Elijah Newren , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Denton Liu , git@vger.kernel.org Subject: Re: [PATCH 7/7] xdiff: make diff3 the default conflictStyle References: <20210609192842.696646-1-felipe.contreras@gmail.com> <20210609192842.696646-8-felipe.contreras@gmail.com> <60883e1b-787f-5ec2-a9af-f2f6757d3c43@kdbg.org> <638a0500-459a-a25b-afca-904ec0e09866@kdbg.org> <07ef3a3b-4812-4fa1-c60c-b9085a268bc3@kdbg.org> <875yykipq2.fsf@osv.gnss.ru> <60c39bb3b5cc4_8d0f20817@natae.notmuch> Date: Fri, 11 Jun 2021 20:40:55 +0300 In-Reply-To: <60c39bb3b5cc4_8d0f20817@natae.notmuch> (Felipe Contreras's message of "Fri, 11 Jun 2021 12:21:55 -0500") Message-ID: <87bl8ce1ug.fsf@osv.gnss.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Felipe Contreras writes: > Johannes Sixt wrote: >> then diff3 must display the conflict as >> >> 1256 >> >> to be technically correct. RCS style can coalesce A and C outside of the >> conflict and display it as >> >> 12AC34 >> >> and *that* is the helpful part of this simpler style. > > I have trouble translating the above to what I'm familiar with in my > mind, so... > > diff2: > > 1 > 2 > A > <<<<<<< l > B > ======= > X > >>>>>>> r > C > 5 > 6 > > diff3: > > 1 > 2 > <<<<<<< l > A > B > C > ||||||| b > 3 > 4 > ======= > A > X > C > >>>>>>> r > 5 > 6 > > I personally don't mind at all having a few extra lines in order to > visualize what actually happened. Plus a good tool should have an option to quickly show a diff between any 2 of 3 parts, making analysis even simpler. > > But of course there's zdiff3: > > 1 > 2 > A > <<<<<<< l > B > ||||||| b > 3 > 4 > ======= > X > >>>>>>> r > C > 5 > 6 > > Which is the best of both worlds, even if not technically accurate. Yeah, now I see, thank you both for explanations! That said, to me it seems that for any of 3 formats one can find a case where it's better than the other 2. I'm sure I got a few occasions where leaving common part(s) out of conflicts resulted in a confusion and mis-merge. Thanks, -- Sergey Organov