1 |
mgorny 14/03/24 21:32:31 |
2 |
|
3 |
Modified: ChangeLog git-r3.eclass |
4 |
Log: |
5 |
Add a single+tags mode to handle Google Code more efficiently, bug #503708. |
6 |
|
7 |
Revision Changes Path |
8 |
1.1183 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1182&r2=1.1183 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1182 |
18 |
retrieving revision 1.1183 |
19 |
diff -u -r1.1182 -r1.1183 |
20 |
--- ChangeLog 21 Mar 2014 22:03:00 -0000 1.1182 |
21 |
+++ ChangeLog 24 Mar 2014 21:32:31 -0000 1.1183 |
22 |
@@ -1,6 +1,9 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1182 2014/03/21 22:03:00 robbat2 Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1183 2014/03/24 21:32:31 mgorny Exp $ |
27 |
+ |
28 |
+ 24 Mar 2014; Michał Górny <mgorny@g.o> git-r3.eclass: |
29 |
+ Add a single+tags mode to handle Google Code more efficiently, bug #503708. |
30 |
|
31 |
21 Mar 2014; Robin H. Johnson <robbat2@g.o> linux-info.eclass: |
32 |
linux-info: Bug #504346: Change one message from error to warning, kernel |
33 |
|
34 |
|
35 |
|
36 |
1.40 eclass/git-r3.eclass |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.39&r2=1.40 |
41 |
|
42 |
Index: git-r3.eclass |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v |
45 |
retrieving revision 1.39 |
46 |
retrieving revision 1.40 |
47 |
diff -u -r1.39 -r1.40 |
48 |
--- git-r3.eclass 3 Mar 2014 21:45:06 -0000 1.39 |
49 |
+++ git-r3.eclass 24 Mar 2014 21:32:31 -0000 1.40 |
50 |
@@ -1,6 +1,6 @@ |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.39 2014/03/03 21:45:06 mgorny Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.40 2014/03/24 21:32:31 mgorny Exp $ |
55 |
|
56 |
# @ECLASS: git-r3.eclass |
57 |
# @MAINTAINER: |
58 |
@@ -47,6 +47,14 @@ |
59 |
# for development or hosting a local git mirror. However, clones |
60 |
# of repositories with large diverged branches may quickly grow large. |
61 |
# |
62 |
+# The 'single+tags' type clones the requested branch and all tags |
63 |
+# in the repository. All notes are fetched as well. EGIT_COMMIT |
64 |
+# can safely specify hashes throughout the current branch and all tags. |
65 |
+# No purging of old references is done (if you often switch branches, |
66 |
+# you may need to remove stale branches yourself). This mode is intended |
67 |
+# mostly for use with broken git servers such as Google Code that fail |
68 |
+# to fetch tags along with the branch in 'single' mode. |
69 |
+# |
70 |
# The 'single' type clones only the requested branch or tag. Tags |
71 |
# referencing commits throughout the branch history are fetched as well, |
72 |
# and all notes. EGIT_COMMIT can safely specify only hashes |
73 |
@@ -72,9 +80,10 @@ |
74 |
# supposed to set EGIT_CLONE_TYPE instead. |
75 |
# |
76 |
# A common case is to use 'single' whenever the build system requires |
77 |
-# access to full branch history or the remote (Google Code) does not |
78 |
-# support shallow clones. Please use sparingly, and to fix fatal errors |
79 |
-# rather than 'non-pretty versions'. |
80 |
+# access to full branch history, or 'single+tags' when Google Code |
81 |
+# or a similar remote is used that does not support shallow clones |
82 |
+# and fetching tags along with commits. Please use sparingly, and to fix |
83 |
+# fatal errors rather than 'non-pretty versions'. |
84 |
: ${EGIT_MIN_CLONE_TYPE:=shallow} |
85 |
|
86 |
# @ECLASS-VARIABLE: EGIT3_STORE_DIR |
87 |
@@ -154,7 +163,7 @@ |
88 |
|
89 |
# check the clone type |
90 |
case "${EGIT_CLONE_TYPE}" in |
91 |
- mirror|single|shallow) |
92 |
+ mirror|single+tags|single|shallow) |
93 |
;; |
94 |
*) |
95 |
die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}" |
96 |
@@ -168,6 +177,12 @@ |
97 |
EGIT_CLONE_TYPE=single |
98 |
fi |
99 |
;; |
100 |
+ single+tags) |
101 |
+ if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then |
102 |
+ einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting" |
103 |
+ EGIT_CLONE_TYPE=single+tags |
104 |
+ fi |
105 |
+ ;; |
106 |
mirror) |
107 |
if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then |
108 |
einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting" |
109 |
@@ -510,6 +525,13 @@ |
110 |
fetch_command+=( |
111 |
"+${fetch_l}:${fetch_r}" |
112 |
) |
113 |
+ |
114 |
+ if [[ ${EGIT_CLONE_TYPE} == single+tags ]]; then |
115 |
+ fetch_command+=( |
116 |
+ # pull tags explicitly as requested |
117 |
+ "+refs/tags/*:refs/tags/*" |
118 |
+ ) |
119 |
+ fi |
120 |
fi |
121 |
|
122 |
if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then |