We are apparently the only ones with this problem, because I can't find much information about this kind of thing anywhere but this blog post. The solution of using merge=union is good for merging manually, but GitLab's interface doesn't support it/take it into consideration.
I've recently had this problem, where I created a few small MRs, @rymai asked me to add CHANGELOG entries to each of them, set them to merge after build success, and I came back an hour later to find that all of them now had merge conflict warnings.
This makes contributing smaller fixes/changes a pretty big pain (and is also an argument against entries for every minor change). Is there any way we can fix this in GitLab itself?
I'm imagining something like this:
There's a merge conflict that only effects the CHANGELOG file, which is listed by .gitattributes as being mergeable with the union strategy.
A project owner who has the ability to merge MRs into master would be shown "There are merge conflicts in CHANGELOG, would you like to view what the file will look like after merging?"
The diff of the file after the conflict is resolved would be shown to the user.
The user is given the option to either Continue or Cancel. If they choose Continue, the MR would be merged, otherwise nothing happens.
I've been working on this for a while with the maintainers of Rugged/libgit2. See #2315 (closed) for the full context.
The changes to make this work were merged to libgit2 on March 17 via https://github.com/libgit2/libgit2/pull/3564/commits. Presumably it will be available in a release in libgit2 v0.25.0. Still waiting for that release.
I'll close #2315 (closed) because the issue got conflated with using .gitattributes with binary diffs.
@stanhu You're right. I don't understand quite why - as they've updated the submodule pointer several times. Too bad it's been 7 months since the merge
i'm also waiting for rugged 0.25 release to solve this bug: #14972 (closed)
perhaps it's ok to pin against one of their beta releases?
for #14972 (closed) the bug was fixed in 0.25.0b3
and i've been testing all releases up to 0.25.0b7 which were also fine (haven't tested 0.25.0b8, but i'm sure it's also ok)
@dblessing the only thing missing is rugged dependency update? perhaps for interested parties just make MR that updates to beta version? doesn't need to be merged until it gets out of beta.
There is a bug in libgit2 connected to Rugged::SORT_DATE (see https://github.com/libgit2/libgit2/issues/4099), but it should no longer affect us since we switched to Rugged::SORT_NONE (see point 2.)
There was a bug in libgit2 connected to Rugged::SORT_TOPO. This bug is not fixed in rugged 0.25.1.1, but it is fixed in rugged 0.26.0b1. According to our test suite and my static analysis of the code, this bug should not affect us.
gollum-rugged_adapter accepted the PR to update rugged to ~> 0.25.0, but did not release a new version yet.
What we can do:
Wait for the maintainers of gollum-rugged_adapter to release a new version
Try to convince the maintainers of gollum-rugged_adapter to change the constraint to ~> 0.25, because asking them to release a new version every time rugged bumps minor version is not very convenient for us. Then wait for them to release a new version.
Fork gollum-rugged_adapter to gitlab-gollum-rugged_adapter and release our own version.
@adamniedzielski I think 3 should be a last resort. Let's see where we are with 1 after the weekend; could you also create an issue for 2? I think that would help us, as it would let us decide - and our test suite is probably more comprehensive.
@adamniedzielski speaking purely in a personal capacity, I'm not too worried about being blocked. But I think that it is silly that quite a large improvement is waiting for a gem bump.
I'd say that if there isn't a release ready for our 9.1 freeze, we just fork. If upstream then updates in future, we can abandon our fork, which we'd want to do ASAP anyway. @stanhu wdyt?