1 |
Increate the default git sync-depth from 1 to 10, to ensure that |
2 |
gentoo-mirror git clones retain at least a single original signed |
3 |
commit. |
4 |
--- |
5 |
man/portage.5 | 10 ++++++++-- |
6 |
pym/portage/sync/modules/git/__init__.py | 2 +- |
7 |
2 files changed, 9 insertions(+), 3 deletions(-) |
8 |
|
9 |
diff --git a/man/portage.5 b/man/portage.5 |
10 |
index 963f49d..c1e4d97 100644 |
11 |
--- a/man/portage.5 |
12 |
+++ b/man/portage.5 |
13 |
@@ -965,8 +965,14 @@ Specifies priority of given repository. |
14 |
Specifies CVS repository. |
15 |
.TP |
16 |
.B sync\-depth |
17 |
-Specifies clone depth to use for DVCS repositories. Defaults to 1 (only |
18 |
-the newest commit). If set to 0, the depth is unlimited. |
19 |
+Specifies clone depth to use for DVCS repositories. Defaults to 10 |
20 |
+(commits deep). If set to 0, the depth is unlimited. |
21 |
+.br |
22 |
+The default depth of 10 was chosen as a compromise between space |
23 |
+and bandwidth savings, and maintaining a history of recent commits. |
24 |
+It is especially important for gentoo-mirror repositories where the most |
25 |
+recent commits are automated and unsigned, and it is necessary to |
26 |
+rewind the history to the newest signed commit for OpenPGP verification. |
27 |
.TP |
28 |
.B sync\-git\-clone\-extra\-opts |
29 |
Extra options to give to git when cloning repository (git clone). |
30 |
diff --git a/pym/portage/sync/modules/git/__init__.py b/pym/portage/sync/modules/git/__init__.py |
31 |
index d5eb5c6..54070fc 100644 |
32 |
--- a/pym/portage/sync/modules/git/__init__.py |
33 |
+++ b/pym/portage/sync/modules/git/__init__.py |
34 |
@@ -18,7 +18,7 @@ class CheckGitConfig(CheckSyncConfig): |
35 |
def check_depth(self): |
36 |
d = self.repo.sync_depth |
37 |
# default |
38 |
- self.repo.sync_depth = 1 |
39 |
+ self.repo.sync_depth = 10 |
40 |
|
41 |
if d is not None: |
42 |
try: |
43 |
-- |
44 |
2.10.2 |