1 |
On 10/30/2016 02:34 PM, Michał Górny wrote: |
2 |
> Increate the default git sync-depth from 1 to 10, to ensure that |
3 |
|
4 |
s/Increate/Increase/ |
5 |
|
6 |
> gentoo-mirror git clones retain at least a single original signed |
7 |
> commit. |
8 |
> --- |
9 |
> man/portage.5 | 10 ++++++++-- |
10 |
> pym/portage/sync/modules/git/__init__.py | 2 +- |
11 |
> 2 files changed, 9 insertions(+), 3 deletions(-) |
12 |
> |
13 |
> diff --git a/man/portage.5 b/man/portage.5 |
14 |
> index 963f49d..c1e4d97 100644 |
15 |
> --- a/man/portage.5 |
16 |
> +++ b/man/portage.5 |
17 |
> @@ -965,8 +965,14 @@ Specifies priority of given repository. |
18 |
> Specifies CVS repository. |
19 |
> .TP |
20 |
> .B sync\-depth |
21 |
> -Specifies clone depth to use for DVCS repositories. Defaults to 1 (only |
22 |
> -the newest commit). If set to 0, the depth is unlimited. |
23 |
> +Specifies clone depth to use for DVCS repositories. Defaults to 10 |
24 |
> +(commits deep). If set to 0, the depth is unlimited. |
25 |
> +.br |
26 |
> +The default depth of 10 was chosen as a compromise between space |
27 |
> +and bandwidth savings, and maintaining a history of recent commits. |
28 |
> +It is especially important for gentoo-mirror repositories where the most |
29 |
> +recent commits are automated and unsigned, and it is necessary to |
30 |
> +rewind the history to the newest signed commit for OpenPGP verification. |
31 |
|
32 |
Shouldn't people feel uneasy about the last commit being unverifiable? I |
33 |
would think that that last commit should be signed with an |
34 |
infrastructure key. |
35 |
|
36 |
> .TP |
37 |
> .B sync\-git\-clone\-extra\-opts |
38 |
> Extra options to give to git when cloning repository (git clone). |
39 |
> diff --git a/pym/portage/sync/modules/git/__init__.py b/pym/portage/sync/modules/git/__init__.py |
40 |
> index d5eb5c6..54070fc 100644 |
41 |
> --- a/pym/portage/sync/modules/git/__init__.py |
42 |
> +++ b/pym/portage/sync/modules/git/__init__.py |
43 |
> @@ -18,7 +18,7 @@ class CheckGitConfig(CheckSyncConfig): |
44 |
> def check_depth(self): |
45 |
> d = self.repo.sync_depth |
46 |
> # default |
47 |
> - self.repo.sync_depth = 1 |
48 |
> + self.repo.sync_depth = 10 |
49 |
> |
50 |
> if d is not None: |
51 |
> try: |
52 |
> |
53 |
|
54 |
|
55 |
-- |
56 |
Thanks, |
57 |
Zac |