]> source.dussan.org Git - gitea.git/commit
Ensure that all unmerged files are merged when conflict checking (#20528)
authorzeripath <art27@cantab.net>
Thu, 28 Jul 2022 23:19:55 +0000 (00:19 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Jul 2022 23:19:55 +0000 (01:19 +0200)
commit7a428fae4bbbb60a76832bbf5185b26605f7270b
tree70d27a2cf345d6d7186309fb0b97453f2f2eb959
parent99f2f826ce27bb3b9f64c8c989e3ae1f453b1634
Ensure that all unmerged files are merged when conflict checking (#20528)

There is a subtle bug in the code relating to collating the results of
`git ls-files -u -z` in `unmergedFiles()`. The code here makes the
mistake of assuming that every unmerged file will always have a stage 1
conflict, and this results in conflicts that occur in stage 3 only being
dropped.

This PR simply adjusts this code to ensure that any empty unmergedFile
will always be passed down the channel.

The PR also adds a lot of Trace commands to attempt to help find future
bugs in this code.

Fix #19527

Signed-off-by: Andrew Thornton <art27@cantab.net>
services/pull/patch.go
services/pull/patch_unmerged.go