Being friendly to quick contributions

The git format-patch way is pretty ok with me, although the discussion options with pull requests are sometimes useful. If patches get abandoned for now (immature, incomplete, IMO wrong direction), a pull request allows others to continue with them as they please. So, both mail and PRs have their merit.

Contributing using PRs isn’t too hard though, especially as most people will contribute only to the core and/or one or two modules. It works as follows:

git clone https://github.com/SWI-Prolog/swipl-devel
git submodule update --init

Now build the system and hack around. At any time (either before or after the hacking, if you want to create (for the first time) a pull request for module X:

<clone it on github to say the user `myself`>
cd packages/X                                # or wherever the module is
git remote add myfork git@github.com:myself/X.git # or https://, at your preference

Now assuming you did the usual stuff to create a topic branch relative to master, use

git push myfork mytopic:mytopic

Just for completeness, for creating a topic branch:

cd packages/X
git checkout master
git pull
git checkout -b mytopic
<hack around and commit>

Note that besides the things you need to do anyway, there are just a few extra steps:

  • git submodule update --init
    To get the submodules and update them after pulling the main repo.
  • git checkout master
    git pull
    To get the submodule on a branch and in sync with the main repo

I advice to activate the bash completion and extensions in your shell when working with git. It tells you where you are and what the status is and reduces the typing a lot.