Multiple hotfixes

232 views
Skip to first unread message

Menno Jansz

unread,
Nov 9, 2015, 3:43:39 PM11/9/15
to Maven JGit Flow Plugin

Why does jgit-flow not support multiple hotfixes? What approach do people use to work around this?

Take the example where we have an issue in production and start a hotfix for it. But this hotfix turns out to be more complicated than anticipated, so it takes longer than usual. In the meantime another serious issue is found in production. This is quick to fix, but the existing hotfix, which is delayed, will stops the second hotfix from being able to occur.

Cheers,
Menno

David Chwalisz

unread,
Nov 10, 2015, 5:08:35 PM11/10/15
to Maven JGit Flow Plugin
If you delete the existing local branch and remote branch ref before creating the release, it works. This is hard to do in an automated environment. I believe there are feature requests for handling multiple release/hotfix branches.

Classic Gitflow does not allow multiples. Real life is different sometimes.

Jeffrey Bell

unread,
Nov 10, 2015, 9:08:02 PM11/10/15
to Maven JGit Flow Plugin
While jgit-flow doesn't natively support creating multiple hotfix branches, there's nothing keeping you from creating a single hotfix branch, then doing all of the development in a feature/bugfix branch. This would allow the hotfix branch to remain open for whichever bug fix was completed first.

But to answer your question, JGitflow makes certain assumptions about how and where a branch will be merged based on its type. Feature branches tend to go straight into develop. Release branches get merged into master and then develop. Hotfix branches get merged into master and then develop. When you create 2 hotfix branches at the same time, JGitflow's assumptions about merge ordering may start falling apart. Which hotfix branch gets merged in first? Also, JGitflow is modifying the pom files with different version numbers as you work through the process. This would usually cause merge conflicts but based on the assumptions its making, it can take some steps to avoid the merge conflicts. To make sure its assumptions hold true it enforces only a single hotfix branch at a time, and only a single release branch at a time.
Reply all
Reply to author
Forward
0 new messages