Hello, users and developers.

I've just committed a large patch set that improves the compatibility
and usability of git-r3.eclass. The two major highlights are:

1. the semi-working and problematic shallow clone support has been
replaced by more generic and better designed EGIT_CLONE_TYPE system,

2. local git mirror support has been added for people that are using
live ebuilds on multiple Gentoo systems.


First of all, if you have EGIT_NONSHALLOW set somewhere, you can remove
it. The shallow clones are no longer the default, and this variable is
not used anymore.

Instead, you may want to set EGIT_CLONE_TYPE in make.conf to one
of the three supported clone types: 'mirror', 'single' (the default)
or 'shallow'.

The 'mirror' mode clones all branches & tags in the remote repository,
making the local copy suitable for further cloning or reuse as a git
mirror.

The 'single' mode clones only the requested branch or tag, along with
complete history (and tags that point on fetched commits). This mode is
the default since it provides all the advantages of git while avoiding
fetching unnecessary branches.

The 'shallow' mode tries to clone the minimum number of objects
necessary. It is very space-efficient yet may cause problems
(and therefore ebuilds may override it). Since it doesn't fetch
the complete branch history, some features won't be available (like
'git describe' won't be able to find an earlier tag).


The ebuilds that do not support shallow clones may use complementary
EGIT_MIN_CLONE_TYPE variable to enforce another type of clones.
For example, all ebuilds using Google Code git repositories will need
to set EGIT_MIN_CLONE_TYPE=single due to server limitations.

If shallow clones cause only minor inconveniences (like non-pretty
version number that doesn't cause any more issues), developers are
encouraged not to force 'larger' clones.

Since setting EGIT_CLONE_TYPE is considered an expert feature,
developers are not required to retroactively test their ebuilds with
shallow clones. Instead, they can wait till one of the users using it
reports an issue.


Setting a local git mirror is pretty straightforward. You need to share
the 'git3-src' directory used to store local clones (preferably with
EGIT_CLONE_TYPE=mirror) via one of the supported git transports,
and then set EGIT_MIRROR_URI to the URI corresponding to that directory.

For example, if you used the HTTP transport and aliased the git3-src
directory to /git, your EGIT_MIRROR_URI would look like:

  EGIT_MIRROR_URI=http://localserver/git/


Any questions or problems shall arise, please don't hesitate to reply
to this mail, to gentoo-dev@.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to