Gentoo Archives: gentoo-dev-announce

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev-announce@l.g.o
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev-announce] New clone type and local git mirror support in git-r3
Date: Sun, 02 Mar 2014 18:32:48
Message-Id: 20140302155515.50bb1783@pomiot.lan
1 Hello, users and developers.
2
3 I've just committed a large patch set that improves the compatibility
4 and usability of git-r3.eclass. The two major highlights are:
5
6 1. the semi-working and problematic shallow clone support has been
7 replaced by more generic and better designed EGIT_CLONE_TYPE system,
8
9 2. local git mirror support has been added for people that are using
10 live ebuilds on multiple Gentoo systems.
11
12
13 First of all, if you have EGIT_NONSHALLOW set somewhere, you can remove
14 it. The shallow clones are no longer the default, and this variable is
15 not used anymore.
16
17 Instead, you may want to set EGIT_CLONE_TYPE in make.conf to one
18 of the three supported clone types: 'mirror', 'single' (the default)
19 or 'shallow'.
20
21 The 'mirror' mode clones all branches & tags in the remote repository,
22 making the local copy suitable for further cloning or reuse as a git
23 mirror.
24
25 The 'single' mode clones only the requested branch or tag, along with
26 complete history (and tags that point on fetched commits). This mode is
27 the default since it provides all the advantages of git while avoiding
28 fetching unnecessary branches.
29
30 The 'shallow' mode tries to clone the minimum number of objects
31 necessary. It is very space-efficient yet may cause problems
32 (and therefore ebuilds may override it). Since it doesn't fetch
33 the complete branch history, some features won't be available (like
34 'git describe' won't be able to find an earlier tag).
35
36
37 The ebuilds that do not support shallow clones may use complementary
38 EGIT_MIN_CLONE_TYPE variable to enforce another type of clones.
39 For example, all ebuilds using Google Code git repositories will need
40 to set EGIT_MIN_CLONE_TYPE=single due to server limitations.
41
42 If shallow clones cause only minor inconveniences (like non-pretty
43 version number that doesn't cause any more issues), developers are
44 encouraged not to force 'larger' clones.
45
46 Since setting EGIT_CLONE_TYPE is considered an expert feature,
47 developers are not required to retroactively test their ebuilds with
48 shallow clones. Instead, they can wait till one of the users using it
49 reports an issue.
50
51
52 Setting a local git mirror is pretty straightforward. You need to share
53 the 'git3-src' directory used to store local clones (preferably with
54 EGIT_CLONE_TYPE=mirror) via one of the supported git transports,
55 and then set EGIT_MIRROR_URI to the URI corresponding to that directory.
56
57 For example, if you used the HTTP transport and aliased the git3-src
58 directory to /git, your EGIT_MIRROR_URI would look like:
59
60 EGIT_MIRROR_URI=http://localserver/git/
61
62
63 Any questions or problems shall arise, please don't hesitate to reply
64 to this mail, to gentoo-dev@.
65
66 --
67 Best regards,
68 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature