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

Tell git to merge CHANGELOG.md by combining changes #1425

Closed
wants to merge 2 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Oct 23, 2022

https://stackoverflow.com/questions/22109586/what-is-the-difference-between-union-and-text/22109606#22109606

Discussion


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

@pirj pirj self-assigned this Oct 23, 2022
@pirj pirj requested review from bquorning, Darhazer and koic October 23, 2022 12:21
Copy link
Collaborator

@bquorning bquorning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need some time to experiment more with this.

On my machine, git knows full well how to merge two branches each adding "the same" line to the changelog. The question is: Why doesn’t GitHub know how to do this?

@pirj
Copy link
Member Author

pirj commented Oct 23, 2022

Why doesn’t GitHub know how to do this?

Local git config, @bquorning ?

It's quite unfortunate, but there's no way of committing git config for a repo so that GitHub and other developers can benefit from that. But it's possible to commit .gitattributes for the effect of sharing this behaviour to unite certain files during merges.

When deciding what attributes are assigned to a path, Git consults $GIT_DIR/info/attributes file (which has the highest precedence), .gitattributes file in the same directory as the path in question, and its parent directories up to the toplevel of the work tree

Maybe you have .gitattributes in your ~?

There's even a global machine setting that can affect that basing on the OS and distribution:

Attributes for all users on a system should be placed in the $(prefix)/etc/gitattributes file.

@bquorning
Copy link
Collaborator

bquorning commented Oct 23, 2022

I posted more details in #1417 (comment)

@pirj pirj closed this Oct 24, 2022
@pirj pirj deleted the deal-with-changelog-merges branch October 24, 2022 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants