Day 7 (published 7 December 2020)

What is a branch?

The long technical answer to this question is in the LoopDocs Development Page, and includes videos and all the technical explanation.   It is a good read with a fresh box of wine in front of the fireplace when the snow outside is all the way to the top of the windows.

The abridged answer is RIGHT HERE in this document!

Think of Branches like Recipes

Your great great great aunt Martha brought her Goulash recipe over from Hungary and it has been published exactly the same in every church fundraiser recipe book for the last four generations and it is presented at every family gathering, unchanged, in fact, a copy of the Recipe has even been uploaded to the GitHub recipe repository for everyone in the universe to use.   Martha put the recipe in the public domain for everyone to use any way they want.   This is the “Master” recipe.

But nephew Donald wants more garlic.    So, Donald make a copy of the recipe into his own GitHub recipe repository and modifies the one line that has the amount of Garlic to say two heads of garlic instead of two cloves of garlic.    He posts photos, and a long drawn out description of the great new recipe and how it makes him hunger for the old homeland on his social media accounts and suddenly, some people use his recipe instead of the original “Master” recipe.   This recipe is a “Fork” from the main recipe, like a fork in the road.   It is a complete copy of the recipe, that has been modified and stored elsewhere.  Donald has taken this recipe a different direction and may or may not continue to make changes to it.   Changes to the “Master” recipe will not automatically show up in this copy, Donald would have to chose to incorporate them.   It is important to note that Donald could have simply posted instructions, or a patch file, for people to modify the master recipe when they download it to incorporate the amount change to the garlic like before they compile the recipe, but Donald made his own “fork” instead.

Martha’s great great great great grandson, Andor, is now responsible for maintaining Martha’s recipe on Github, and suddenly a new type of beef comes out, let’s call it beyond beef.   Andor makes a “branch” of the recipe that uses Beyond Beef as an option instead of stew meat from spotted cows.  He still maintains it, it is still in the same repository, there is just an option you can pick when you download the recipe to pick “Master” or “Dev – Beyond”.   Any other changes that are made to the main recipe would be reflected in this recipe, unlike the “Fork” that Donald made and now maintains that is severed from updates.

Emeril finds this recipe in the public domain, and he wants to make a bunch of changes, so he Forks the recipe into his own repository and adds some features.  Emeril’s recipe has Carrots, Celery, half the garlic of the Master recipe, and a sprig of thyme plus a module with “Emeril’s seasoning” attached to it.   This Fork of the recipe uses Egg noodles instead of elbow macaroni.

So, back to software, and “What does this mean to me”?    The group that maintains the Master Loop repository does a good job of trying to keep the software “Safe” and only incorporating changes that they deem safe, after they have been widely tested on different branches or forks.    Other than bug fixes, or modifications to deal with new Apple versions, the master version is “Stable”.   The Master repository also does not tend to incorporate features that new users can have safety issues with, like Automatic-Bolus, MicroBolus, RemoteBolus.   Some of the changes that other developers put in their forks eventually get included in the Master branch, some do not.   When OmniPod pump support was first added, it was in a different branch, it is now included in the Master branch.

If you are first starting out and do not fully understand the differences between the branches, the Master branch has the least settings to tweak, and has certain safety “guardrails” implemented to try to make it a little harder for you to get in trouble.

Other branches or forks that you might consider, as you become a seasoned Looper:

FreeAPS is a very popular fork in the Loop code.   The Developers of FreeAPS sync changes from the Master branch to the FreeAPS fork from time to time and it is usually fairly up to date.

Automatic-Bolus is another popular branch in Loop Master (maintained by the same developers).  It delivers Autobolus instead of increasing the basal when extra insulin is needed.    The percentages and parameters are hard coded in the software and you can not tweak them without editing the code, unlike FreeAPS, which exposes those settings to the user.

For a comparison of FreeAPS, Automatic-Bolus and Master, click here.

There are also several forks that allow for remote bolus via NightScout.   Those forks are not kept in sync with Master, have not been updated for a long time, and are not recommended.

To recap, a branch is still attached to the original recipe, changes in the master are usually incorporated in the branch, and it is usually all maintained by the same group of developers.     A fork is a point in time copy that a different developer made of the recipe and they now maintain that copy and may or may not incorporate changes from the master recipe into their fork.

Most of the Loop and Learn admin team use the FreeAPS fork of Loop, even if some of us have all the extra options turned off.   It has a purple Pegasus as the icon, which the kids seem to like more than the green circle.

Now is a good time to go up to the menu at the top of the page and look under the Help menu for the “FreeAPS Discussion“.    I didn’t include it as a link because I want you to learn how to navigate around this teaching site and start to see what else is here.


Skip to content