unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: Andreas Schwab <schwab@suse.de>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	69220@debbugs.gnu.org
Subject: bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts in a file
Date: Mon, 19 Feb 2024 15:38:51 +0300	[thread overview]
Message-ID: <bf3b48721501fbe29cac687ba19576869c6c630a.camel@yandex.ru> (raw)
In-Reply-To: <mvmil2ky6pl.fsf@suse.de>

On Mon, 2024-02-19 at 13:33 +0100, Andreas Schwab wrote:
> On Feb 19 2024, Konstantin Kharlamov wrote:
>
> > On Mon, 2024-02-19 at 13:25 +0100, Andreas Schwab wrote:
> > > On Feb 19 2024, Konstantin Kharlamov wrote:
> > >
> > > > 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.
> > >
> > > 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… how do I use them?
>
>        -X <strategy-option>, --strategy-option=<strategy-option>
>            Pass the <strategy-option> through to the merge strategy.
> This
>            implies --merge and, if no strategy has been specified, -s
> ort.
>            Note the reversal of ours and theirs as noted above for
> the -m
>            option.
>

Sorry, I'm not following.

So, I just created an artificial conflict. Then I get these errors:

    λ git merge -X theirs
    error: Merging is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm <file>'
    hint: as appropriate to mark resolution and make a commit.
    fatal: Exiting because of an unresolved conflict.
    λ git add -u
    λ git merge -X theirs
    fatal: No current branch.





  reply	other threads:[~2024-02-19 12:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 10:16 bug#69220: [PATCH] smerge-mode: add a function to resolve all conflicts in a file Konstantin Kharlamov
2024-02-19 12:03 ` Eli Zaretskii
2024-02-19 12:17   ` Konstantin Kharlamov
2024-02-19 12:25     ` Andreas Schwab
2024-02-19 12:28       ` Konstantin Kharlamov
2024-02-19 12:33         ` Andreas Schwab
2024-02-19 12:38           ` Konstantin Kharlamov [this message]
2024-02-19 12:44             ` Andreas Schwab
2024-02-19 12:53               ` Konstantin Kharlamov
2024-02-19 17:07     ` Konstantin Kharlamov
2024-02-20 15:34       ` Konstantin Kharlamov
2024-02-19 15:20   ` Dmitry Gutov
2024-02-19 15:35     ` Andreas Schwab
2024-02-19 15:31   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-19 17:25     ` Konstantin Kharlamov
2024-02-20  2:24       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-20  3:02         ` Konstantin Kharlamov
2024-02-20  3:15           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-20  3:24             ` Konstantin Kharlamov
2024-02-20  3:40               ` Konstantin Kharlamov
2024-02-20 13:53                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-20 13:59                   ` Konstantin Kharlamov
2024-02-20 14:03               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-20 14:10                 ` Konstantin Kharlamov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf3b48721501fbe29cac687ba19576869c6c630a.camel@yandex.ru \
    --to=hi-angel@yandex.ru \
    --cc=69220@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).