Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Eugen Konkov <kes-kes@yandex.ru>
To: Git Mailing List <git@vger.kernel.org>
Subject: Why merge conflict block is located at the wrong place?
Date: Sat, 22 Mar 2025 19:16:49 -0400	[thread overview]
Message-ID: <1145598425.20250322191649@yandex.ru> (raw)

Hello Git,

I got this merge conflict:
```
sub alter_field {
  my ($from_field, $to_field, $options) = @_;

  die "Can't alter field in another table"
      if ($from_field->table->name ne $to_field->table->name);

<<<<<<< HEAD
  my $generator = _generator($options);
  my @out;
||||||| parent of 1bfbcdad (Introduce and use Postgres in-database schemas)
    die "Can't alter field in another table"
        if($from_field->table->name ne $to_field->table->name);
=======
    die "Can't alter field in another table"
        if($from_field->table->qualified_name ne $to_field->table->qualified_name);
>>>>>>> 1bfbcdad (Introduce and use Postgres in-database schemas)

  # drop geometry column and constraints
  push @out, drop_geometry_column($from_field, $options), drop_geometry_constraints($from_field, $options),
      if is_geometry($from_field);
```

But I expect it to be like this:
```
sub alter_field {
  my ($from_field, $to_field, $options) = @_;

<<<<<<< HEAD
  die "Can't alter field in another table"
      if ($from_field->table->name ne $to_field->table->name);
||||||| parent of 1bfbcdad (Introduce and use Postgres in-database schemas)
    die "Can't alter field in another table"
        if($from_field->table->name ne $to_field->table->name);
=======
    die "Can't alter field in another table"
        if($from_field->table->qualified_name ne $to_field->table->qualified_name);
>>>>>>> 1bfbcdad (Introduce and use Postgres in-database schemas)

  my $generator = _generator($options);
  my @out;

    # drop geometry column and constraints
  push @out, drop_geometry_column($from_field, $options), drop_geometry_constraints($from_field, $options),
      if is_geometry($from_field);
```

Why merge conflict block is located at the wrong place?

git version 2.49.0

-- 
Best regards,
Eugen Konkov


             reply	other threads:[~2025-03-22 23:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-22 23:16 Eugen Konkov [this message]
2025-03-23  9:08 ` Why merge conflict block is located at the wrong place? brian m. carlson
2025-03-24  5:39   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=1145598425.20250322191649@yandex.ru \
    --to=kes-kes@yandex.ru \
    --cc=git@vger.kernel.org \
    /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.
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).