fetch2/git: create bareclone option
authorBruce Ashfield <bruce.ashfield@windriver.com>
Thu, 23 Feb 2012 21:08:42 +0000 (16:08 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Feb 2012 16:40:08 +0000 (16:40 +0000)
commit4a72955d4fbefc4e2e5897a06b87bc0188f66c53
tree4936abef7d5bfc590f39951b6b693db564306518
parent8ecbad6a060efd2c0dee78ccdd42ea724ea58413
fetch2/git: create bareclone option

For similar reasons as the nocheckout option, packages that need
enhanced control over the checkout and branch creation on a repository
may want a complete mirror/bareclone created of the repository when
performing the unpack.

This is useful/required when a local respository is being used, but
local tracking branches have not been created for all branches that
a given recipe needs to manipulate. The standard git clone operations
will create remote branches for the branches that are local to the
source repository, but branches that are remote do not translate to
the destination repository. Doing a mirror/bare clone of the source,
makes all branches available to the repository.

This is a particular use case, but the ability to do a bare clone
creates great flexibility in recipe space, with no impact to recipes
that don't need this functionality.

To implement this, a new option 'bareclone' is craeted which creates
a mirror copy of the repository and leaves it bare in the unpacking
phase. A recipe that uses this option must both checkout and debare
the repository itself.

(Bitbake rev: 82482aae6f311c994275fb0b6b32d954bbfc78c3)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/git.py