From: Omar Polo Subject: Re: merge chokes, creates bogus conflicts To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Wed, 15 Feb 2023 18:55:18 +0100 On 2023/02/15 16:35:44 +0100, Christian Weisgerber wrote: > got merge chokes on the perl-5.36.0 commits to OpenBSD src.git and > creates bogus conflicts. Here's a script to reproduce this: > > git clone --bare https://github.com/openbsd/src.git > got co src.git > cd src > got br -c d122a78 local # before perl-5.36.0 import > echo dummy >README > got add README > got ci -m 'local: dummy commit' > got up > got merge master > got st | grep '^[^MAD]' > > C gnu/usr.bin/perl/t/comp/parser.t this one contains : for my $marker (qw( : <<<<<<< : ======= : >>>>>>> : )) { so got considers it to be in a 'conflict' state. Even simpler repro: % cd /usr/src/gnu/usr.bin/perl/t/comp/ % got status parser.t % echo >> parser.t % got status parser.t C gnu/usr.bin/perl/t/comp/parser.t Maybe we could manually track the conflicts during "merge" (and probably "rebase" too) instead of looking at the file content, but as things are we'll always fail to correctly handle (non-binary) files that contains a sequence like that.