Move 'dedent' function nearer the top of the file

Pulling it into the utility function section means it is in a more
appropriate location when we extract a generic "for each instruction"
function.

Also add a header comment for the dedent function.

Signed-off-by: John Keeping <john@keeping.me.uk>
Extract parsing from command processing

This will allow the "for each instruction, do this" code to be re-used
for other things than rebuilding the integration branch.

Let's also start the process of having some comments in the code by
adding them for the new functions introduced here.

Signed-off-by: John Keeping <john@keeping.me.uk>
Die if run_integration fails

Since we pipe data into run_integration, it runs in a subshell and hence
can die without causing git-integration itself to fail.

Currently this isn't a problem since the call to run_integration is the
last thing to happen in integration_rebuild, which is in turn only ever
called at the end of git-integration.  But if another command that get
sequenced after rebuild is added, we will end up running that when we
shouldn't or hiding the exit code from integration_rebuild.

Signed-off-by: John Keeping <john@keeping.me.uk>
Add --status command

This indicates the state of each branch specified in an integration
branch's instruction sheet.  The state is one of:

- Merged to base
- Up-to-date
- Out-of-date
- Not found

Signed-off-by: John Keeping <john@keeping.me.uk>
Merge branch 'status-command'

* status-command:
  Add --status command
  Die if run_integration fails
  Extract parsing from command processing
  Move 'dedent' function nearer the top of the file

Conflicts:
	Documentation/git-integration.txt