contrib/subtree: update documentation

Indicate that repository and refspec are now optional on push and pull.

Add notes to add, push and pull about storing values in .gitsubtree
and their use as default values.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
contrib/subtree: abort if subtree not known

Where resorting to defaults in the .gitsubtree file, abort if the subtree
isn't found.

Signed-off-by: Paul Campbell <pcampbell@carnegiecollege.ac.uk>
contrib/subtree: add fetch sub-command

Allows retreval from remote repo and inspection (e.g. with gitk) of commits
without adding them to the working tree or current branch.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
contrib/subtree: centralise all fetch operations and record FETCH_HEAD

All fetches from a repo are made through the cmd_fetch() function,
which records the FETCH_HEAD in the file .git/subtree-heads, per repo.
This will allow the "git subtree status" command to function when
disconnected.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
contrib/subtree: add status sub-command

Using the head stored by git subtree fetch, determines if the subtree is
up-to-date with, ahead of, behind, or is divergent from the remote
repo/branch.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
contrib/subtree: add link sub-command

Adds subtree details to .gitsubtree where the directory already exists.

Signed-off-by: Paul Campbell <pcampbell@carnegiecollege.ac.uk>