git-submodule.sh: create submodules using same backend as main repo

When creating a submodule create a submodule with the same type of
database backend as the amin repo. Automatically generate a repo name
based on the main repo name and the submodule name as :
<main-repo-name>_submodule_<submodule-name>

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
setup.c: do not check for a HEAD file in is_git_directory

Don't check for a HEAD file in the .git direcotry when determining if the
directory is a git directory or not. Only the files backend will have a
HEADs file, not the others.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
refsd-tdb: example refs database daemon

refsd-tdb.c is a simple reference implementation of a refs daemon.
This will eventually be hosted in a separate project but can live in this
branch for now.

Compile with :
gcc refsd-tdb.c -o refsd-tdb -l tdb

Run with:
./refsd-tdb /tmp/refsd.socket /tmp /tmp/refsd.log

Once the refs daemon is running you can start using it with newly
created git repositories by specifying the --db-socket and --db-repo-name
arguments to git clone/init-db :

git clone --db-repo-name=ROCKy --db-socket=/tmp/refsd.socket <some repo> .

This refs daemon is an example. It should be relatively straightforward
to modify it to attach to any other kind of data store.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>