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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 B47F11F953 for ; Wed, 29 Dec 2021 12:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234537AbhL2MNs (ORCPT ); Wed, 29 Dec 2021 07:13:48 -0500 Received: from mail-il1-f181.google.com ([209.85.166.181]:43761 "EHLO mail-il1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbhL2MNr (ORCPT ); Wed, 29 Dec 2021 07:13:47 -0500 Received: by mail-il1-f181.google.com with SMTP id d3so9008902ilr.10 for ; Wed, 29 Dec 2021 04:13:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UvbqJNcKoL/YY02VnO3L1s9RB6gu+0yLzxmcXsWGDt4=; b=lBTx28k5Ep+S65EFCxLrjcBFDONgzr6vBx+/WUWHdV0Kkwr7qyTDnM29VYvF400eYk aMFJ9MmtA0gykR1YWqHMOhS0DA48feoHSGMf7wVSFVz5HtUFnxqKpZGSWf+r2C1uYfvo qrVIfTFclrIBvXqXyiKk2HLI6MNtcuRrAF/KcRcqBcH7597xi7h5TgZER+GFeQ0mZezA tARDsTOD/y0WMEnytaaQleyudFtNnE51qrBiQgtLZi8EUNPR/5VxXdZwR4B0eM/aWN7/ YuV8RrzkTvpK8LBaljxMPPpIBIFXC1ct4u+dHpEvJHAnp6V98+6PNFSH/nIxlQl1jaoP nSaQ== X-Gm-Message-State: AOAM530XiWMVPwN4O9Gv8p0lUptqXSKovlNWX0TUvWr5ns0ZvqqE1sNG 8h4Ui3du5HCVSJe9eWbGvydXzMEuABSVMeBiUDVTJGEyYh4= X-Google-Smtp-Source: ABdhPJwQKbA+tmhkqJ8QFOfEEIEa24JXBf1MWpyAjALbJzHhrHI8RePAZPyF5M3rZrkonH80Sg9H6CgR8UCDprPWNZk= X-Received: by 2002:a05:6e02:148a:: with SMTP id n10mr7940317ilk.142.1640780027185; Wed, 29 Dec 2021 04:13:47 -0800 (PST) MIME-Version: 1.0 References: <3e1548ab-5e20-9555-bd10-d6cbf2ffbce4@gmail.com> In-Reply-To: From: Erik Cervin Edin Date: Wed, 29 Dec 2021 13:13:10 +0100 Message-ID: Subject: Re: request: allow passing -X to git checkout to auto-solve merge conflicts To: Andrey Butirsky Cc: git@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On a tangent, you can set up your own merge tools. So in git config you can add something like: [mergetool "both"] cmd = "sed -i -e '/^<<<<<<<$/d' -e '/^=======$/d' -e '/^>>>>>>>$/d' -- $MERGED" and call it with git mergetool --tool=both On Tue, Dec 28, 2021 at 10:50 PM Erik Cervin Edin wrote: > > > On Tue, Dec 28, 2021 at 9:44 PM Andrey Butirsky wrote: > > Thanks Erik, please post your further replies to the mailing list so > > others could see it also. > > Mea culpa > > > On a topic, > > I'm not familiar with Git code-base so don't know if it even possible in > > it's current architecture.. > > It looks like > builtin/checkout.c checkout_merged > is responsible and calls > ll-merge.c ll_merge > > I think other commands that allow merging strategies may use other > "merge drivers". > > From commit a944af1d86e6171d68ed2a3aa67b1d68f00e1fe8 > > merge: teach -Xours/-Xtheirs to binary ll-merge driver > > > > The (discouraged) -Xours/-Xtheirs modes of merge are supposed to > > give a quick and dirty way to come up with a random mixture of > > cleanly merged parts and punted conflict resolution to take contents > > from one side in conflicting parts. These options however were only > > passed down to the low level merge driver for text. > > It looks possible. > But perhaps the sentiment is that it's not adviceable?