-
Notifications
You must be signed in to change notification settings - Fork 129
Add git-merge-changelog support (custom merge driver in .gitattributes) #560
Comments
Will it work on all kinds of changelogs? I can see that is supports only GNU style changelogs. Have you tried different ones? |
I have tested it on Ruby on Rails's ActiveRecord and ActiveSupport changelogs while constantly rebasing my pull requests and it always worked well. As long as you will add lines strictly to the most top of the file, it will work. |
FYI, this issue is closely related to (if not a duplicate of) #487. |
It's closely related but not duplicate as I've tested
So, it is required to be thoroughly tested both the |
Thanks for the clarification @Envek 👍 |
GitHub uses the libgit2 library for its Git operations. libgit2 added support for custom merge drivers in March 2016, but GitHub still needs to change their code to use that feature. |
People, any update here? |
We have a similar issue with It would be a huge help for our org if Github allows multiple merge drivers, as bypassing this with Github Actions or bots is pretty cumbersome. |
I'm somewhat frequently send pull requests to open source projects. And I've noticed one inconvenience while sending PRs to big and actively developed repos in GitHub like Ruby on Rails' one, maintainers of which merges several pull requests every day (and GitHub is big and actively developed too). Also in RoR contribution guide written that for every change there should be an entry in ChangeLog file.
Because of that every pull requests become unmergeable in hours because of merge conflict in single text file! And to make it merged in you need to rebase and push several times just to allow collaborator to “catch” a moment when he can click “Merge” button. That's hurts and kills all the passion for contribution.
But if think for the moment, there is really no merge conflict at all as CHANGELOG files are prepend-only! I searched a bit more and found ready solution: a git-merge-changelog utility and blog post about configuring it: https://gnu.wildebeest.org/blog/mjw/2012/03/16/automagically-merging-changelog-files-with-mercurial-or-git/
I installed it (it is already available in Debian/Ubuntu repos) and played a bit with one of my old pull requests (approx. 1 year old) in Rails. Results are very good. I was able to merge it without conflicts and my entry to Ruby on Rails' ActiveSupport CHANGELOG was correctly prepended to the beginning of file.
I'm actively using GitHub and will be very happy if it can handle such situations.
Please, consider adding git-merge-changelog support in GitHub in such a way, that everyone can add a
.gitattributes
file to root of any repository with a line like this:and make most of their merge requests mergeable again! And everyone will know, that if PR is not mergeable it means that it is something really serious.
With best regards, Andrey Novikov.
Sent to support@github.com at 2016-01-06
Received reply from Francis Batac (GitHub Staff) support@github.com 2016-01-07
Replied to Francis Batac (GitHub Staff) support@github.com 2016-01-07
Also posted same issue to GitLab issue tracker: https://gitlab.com/gitlab-org/gitlab-ce/issues/5902
The text was updated successfully, but these errors were encountered: