]> source.dussan.org Git - gitea.git/commit
Ensure that all unmerged files are merged when conflict checking (#20528) (#20536)
author6543 <6543@obermui.de>
Fri, 29 Jul 2022 13:37:18 +0000 (15:37 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Jul 2022 13:37:18 +0000 (15:37 +0200)
commit210b096da72acacbddc28d65f6ce2502772307f1
treed78f8ea944c98296960491eec4a3d81fa49756ce
parentd6bc1558c6e2d13e35925239efde4c6a687fbd79
Ensure that all unmerged files are merged when conflict checking (#20528) (#20536)

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>
Co-authored-by: zeripath <art27@cantab.net>
services/pull/patch.go
services/pull/patch_unmerged.go