repocache: clean out stale submodules, too

Use "double force" when doing git-clean, in order to remove untracked
submodule directories, too. From git-clean manpage:
    -d  Remove untracked directories in addition to untracked files. If
        an untracked directory is managed by a different Git repository,
        it is not removed by default. Use -f option twice if you really
        want to remove such a directory.

Change-Id: I95235d492bdb943c26316843b7d823b7d07b427b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
repocache: implement refs hack for fetching

Allows fetching/cloning remote repositories that have refs/heads/*
pointing to tag. The hack is disabled, by default.

Gerrit allows setting refs/heads/* pointing to tag objects. However, git
prevents this causing problems for repocache. Fetch will fail with
something like:
  error: Trying to write non-commit object x to branch refs/heads/y

A hackish workaround for this is to make GIT_DIR/refs a symlink. Then,
first fetch to GIT_DIR/refs.alt/fetch/* and then symlink GIT_DIR/refs to
point to GIT_DIR/refs.alt/fetch/.

The symlink hack in filesystem is automatically removed from the cached
repository if a CachedRepository instance (using the same cached repo)
is created with the hack disabled.

Change-Id: I1addf10fa5f805ab8f2b696e8ccaad9e56967bd0
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add config option for git-fetch refs hack

New config file option 'repo-cache-refs-hack' for enabling the refs hack
in repocache. The option is disabled, by default.

Enabling the hack makes it possible to fetch/clone remote repositories
that have branches (refs/heads/*) that point to tag objects. This may
encountered with Gerrit repositories - "pure" Git repositories managed
by Git tools shouldn't have such branches as Git sanity checking
prevents them (which is the reason this hack is needed).

Change-Id: I5e0203d4f0f93c18c2f70c76ef9c8b6ff536fd67
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add an example config file

Change-Id: Ie621338141ae6c99f6be9c13dc9861be8ff69347
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add README file

Change-Id: Ic25a5d12a0555d96315d53a24f6a0aa57a3ea146
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Release and document version 0.8

Change-Id: I4f415301a5ebf21bb9ce06ab9f19e1d1af1c3e8b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>