From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts in a file Date: Mon, 19 Feb 2024 15:28:50 +0300 Message-ID: <0f2cffca61b65ef7c0bd65e3029068d05d64b513.camel@yandex.ru> References: <865xykr79f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1151"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.3 Cc: Eli Zaretskii , Stefan Monnier , 69220@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 19 13:29:48 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rc2mK-0000Bl-JP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Feb 2024 13:29:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rc2mG-0006X2-J5; Mon, 19 Feb 2024 07:29:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rc2mD-0006WY-IP for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 07:29:41 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rc2mD-0003r0-AW for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 07:29:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rc2mY-0006pF-BY for bug-gnu-emacs@gnu.org; Mon, 19 Feb 2024 07:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Feb 2024 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69220-submit@debbugs.gnu.org id=B69220.170834578926199 (code B ref 69220); Mon, 19 Feb 2024 12:30:02 +0000 Original-Received: (at 69220) by debbugs.gnu.org; 19 Feb 2024 12:29:49 +0000 Original-Received: from localhost ([127.0.0.1]:40558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc2mL-0006oV-8z for submit@debbugs.gnu.org; Mon, 19 Feb 2024 07:29:49 -0500 Original-Received: from forward500c.mail.yandex.net ([178.154.239.208]:54246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rc2mH-0006oF-Ju for 69220@debbugs.gnu.org; Mon, 19 Feb 2024 07:29:47 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:2502:0:640:9ff9:0]) by forward500c.mail.yandex.net (Yandex) with ESMTPS id 567E760B5D; Mon, 19 Feb 2024 15:28:52 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id oSP85O9h0eA0-UloGlq0M; Mon, 19 Feb 2024 15:28:51 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708345731; bh=xTESqkGUg912TKqAj+TeYDCqpkhuo2QxIoo1elGFcCc=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=Ho4A4BX6A/Hb++yHQZmpMPK1xP6LkFlok/R5Kb7jqITnVJ4F7sxkcRlEMnjZ0OIht 70nmPP1hnpoLLAun+m1ygpz4eYeXdjpPDPzDVDYtozSrFoA3y0w0OqJpNoI78YSCY8 Wb/bEUWZujMrn6LivIER/Xgpkx12vE/ixIunBhb0= Authentication-Results: mail-nwsmtp-smtp-production-main-90.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280252 Archived-At: On Mon, 2024-02-19 at 13:25 +0100, Andreas Schwab wrote: > On Feb 19 2024, Konstantin Kharlamov wrote: >=20 > > 1: Actually, git provides a functional that should work for that > > usecase; but in my experience it is more confusing than it's > > useful. It > > is options `--theirs/ours`, i.e. `git checkout --theirs ./` and > > `git > > checkout --ours ./`. But these options are problematic because > > instead > > of resolving conflict in preference of `theirs` or `ours` they do a > > complete checkout of the code from either of the branches. I can't > > count how many times I was burned by trying to resolve conflicts > > with > > these options and then was getting wrong code because together with > > the > > conflicting part the options change everything else. >=20 > I think what you actually want is the 'ours'/'theirs' options of the > merge strategy (available to both the ort and recursive strategies). Oh, thanks for mentioning, I didn't know! So=E2=80=A6 how do I use them? So, a usual workflow: 1. `git rebase -i HEAD~4` 2. do some edits 3. `git add -u && git rebase --continue` *boom* I get conflicts and I want them to be solved in preference "theirs". What command do I call here?