Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge conflicts in release notes #2925

Open
kodebach opened this issue Sep 1, 2019 · 5 comments

Comments

@kodebach
Copy link
Contributor

commented Sep 1, 2019

The way we currently write our release notes is prone to merge conflicts.

Here is a list of solutions I could think of/find online (some from #2923):

  • Add more <<TODO>> placeholders and instruct people to choose a random placeholder instead of the first. This makes merge conflicts less likely, but depends on people actually choosing somewhat randomly. A side effect of this would be that a merge conflict could be solved by a simple commit changing, which placeholder was replaced, instead of a rebase.
  • Get rid of the placeholders and use a custom merge driver. Commonly the union merge driver is suggested for this. However, it is very problematic, if there are modified lines as well as added lines in the merge conflicts. (It may duplicate lines without the user noticing).
  • The one completely safe solution I could think of was to have one release notes file for each PR. A script could then be used to merge them before a release. There would have to be some mechanism for updating release notes from previous PRs.

@kodebach kodebach added the enhancement label Sep 1, 2019

@kodebach kodebach referenced this issue Sep 1, 2019
4 of 14 tasks complete
@markus2330

This comment has been minimized.

Copy link
Contributor

commented Sep 1, 2019

Thank you for making this proposal!

It may duplicate lines without the user noticing

This is no problem at all, as before the release I deduplicate the release notes anyway.

I think we can use the union merge driver for the link checker, icheck and the release notes.

@Chemin1 what do you think about this? I actually was thinking to use a union merge also for comments in config files (maybe with some heuristic to detect typo-fixes. Does git provide such a merge driver?)

@Chemin1

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2019

git can use the built-in union merge driver with an attribute. It is not a merge strategy on its own (I've never used it btw). Is this the driver that you meant here

Commonly the union merge driver is suggested for this.

@kodebach ?

before the release I deduplicate the release notes anyway.

In this case using the union driver looks pretty straightforward to me.

I actually was thinking to use a union merge also for comments in config files

I have thought about this, too, but was not sure how we would like to have this implemented exactly. Thus, I've now opened a new issue (it is quite long) for this topic.

@kodebach

This comment has been minimized.

Copy link
Contributor Author

commented Sep 2, 2019

Is this the driver that you meant here

Yes, git calls this attribute "merge driver".

before the release I deduplicate the release notes anyway.

In this case using the union driver looks pretty straightforward to me.

I agree, if there is a manual review anyway, it shouldn't be a problem.

@markus2330

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

@Chemin1: can you implement this for our 3 files?

@Chemin1

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2019

@Chemin1: can you implement this for our 3 files?

Yes :)

@Chemin1 Chemin1 added this to To do in Improve 3-way merge via automation Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.