Next: , Previous: , Up: Top   [Contents]


6 Patching drones

By using Borg you can not only make changes to assimilated packages, you can also keep track of those patches and share them with others.

If you created some commits in a drone repository and are the maintainer of the respective package, then you can just push your changes to the "origin" remote. You don’t have to do this every time you created some commits, but at important checkpoints, such as after creating a release, you should record the changes in the ~/.emacs.d repository. To do so proceed as described in Updating drones.

But for most packages you are not the maintainer and if you create commits for such drones, then you have to create a fork and push there instead. You should configure that remote as the push-remote using git config remote.pushDefault FORK, or pressing b C M-p in Magit. After you have done that you can continue to pull from the upstream using P u in Magit and you can also push to your fork using P p.

Of course you should also occasionally record the changes in the ~/.emacs.d repository. Additionally, and ideally when you first fork a drone, you should also record information about your personal remote in the super-repository by setting submodule.DRONE.remote in ~/.emacs.d/.gitmodules.

Variable: submodule.DRONE.remote "NAME URL"

This variable specifies an additional remote named NAME that is fetched from URL. This variable can be specified multiple times. Note that "NAME URL" is a single value and that the two parts of that value are separated by a single space.

make bootstrap automatically adds all remotes that are specified like this to the DRONE repository by setting remote.NAME.url to URL and using the standard value for remote.NAME.fetch.

Variable: borg.pushDefault = FORK

This variable specifies a name used for push-remotes. Because this variable can only have one value it is recommended that you use the same name, FORK, for your personal remote in all drone repositories in which you have created patches that haven’t been merged into the upstream repository (yet). A good value may be your username.

For all DRONES for which one value of submodule.DRONE.remote specifies a remote whose NAME matches FORK, make bootstrap automatically configures FORK to be used as the push-remote by setting remote.pushDefault to FORK.


Next: , Previous: , Up: Top   [Contents]