1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA512 |
3 |
|
4 |
Michał Górny: |
5 |
> |
6 |
> Single branch clone ------------------- |
7 |
> |
8 |
> - git-2 eclass behavior, |
9 |
> |
10 |
> - only requested branch (or tag) is fetched, and tags on the |
11 |
> commits fetched as part of the branch/tag history, |
12 |
> |
13 |
> - git notes are fetched, |
14 |
> |
15 |
> - EGIT_COMMIT can only name a commit in the fetched EGIT_BRANCH, |
16 |
> |
17 |
> - pruning unused branches/tags is hard (and possibly won't be |
18 |
> implemented at first), |
19 |
> |
20 |
> - more efficient than the mirror mode, most likely future default. |
21 |
> |
22 |
|
23 |
I agree this should probably be the default. |
24 |
|
25 |
> |
26 |
> Shallow clone ------------- |
27 |
> |
28 |
> - similar to old git-r3 behavior, |
29 |
> |
30 |
> - minimal number of objects from the requested branch (or tag) is |
31 |
> fetched, |
32 |
> |
33 |
> - branch/tag history is not preserved, |
34 |
> |
35 |
> - git notes are not fetched, |
36 |
> |
37 |
> - EGIT_COMMIT can only name tags (using a hash auto-forces higher |
38 |
> mode), |
39 |
> |
40 |
> - changing branches may be very inefficient (since it implies |
41 |
> re-fetching all objects implied by --depth 1), |
42 |
> |
43 |
> - since the history is truncated, 'git describe' won't give pretty |
44 |
> names, |
45 |
> |
46 |
> - most space-saving, intended for embedded and other special use |
47 |
> cases, |
48 |
> |
49 |
> - does not guarantee repository consistency -- unsafe. |
50 |
> |
51 |
> |
52 |
> Control variables ----------------- |
53 |
> |
54 |
> I'm thinking of two control variables (better names appreciated): |
55 |
> |
56 |
> - EGIT_CLONE_MODE - set in make.conf by user to requested clone |
57 |
> mode, |
58 |
> |
59 |
> - EGIT_MIN_CLONE_MODE - optionally set by ebuilds that require |
60 |
> more. |
61 |
> |
62 |
|
63 |
Not a native english speaker, but EGIT_CLONE_TYPE and |
64 |
EGIT_MIN_CLONE_TYPE sounds more natural to me. |
65 |
|
66 |
> |
67 |
> |
68 |
> Mode upgrades and downgrades ---------------------------- |
69 |
> |
70 |
> Mode is not associated persistently with a repository. Therefore, |
71 |
> using a repository in a different mode than it was used before |
72 |
> (e.g. due to different ebuild or user preference change) results in |
73 |
> mixed-mode repository. |
74 |
> |
75 |
> When mirror or single-branch mode is used on a shallow repository, |
76 |
> the repository is still marked 'shallow' even if the full history |
77 |
> is available. I don't know if this wouldn't break some of 'git foo' |
78 |
> uses in the checkout but that probably can't be predicted. |
79 |
> Moreover, I don't know if it is safe to remove 'shallow' after |
80 |
> doing full-fetch in mirror mode. |
81 |
> |
82 |
> When single-branch or shallow mode is used on a mirror-mode |
83 |
> repository, only the requested branch/tag is updated. The |
84 |
> repository may no longer be correctly synced to the remote. |
85 |
> |
86 |
> When shallow mode is used on *existing* branch or tag in a |
87 |
> mirror-mode or single-branch repository, new commits are fetched |
88 |
> as in single-branch mode. When shallow mode is used on *new* |
89 |
> branch or tag, the commits are fetched with '--depth 1' and the |
90 |
> clone is marked 'shallow'. |
91 |
> |
92 |
> |
93 |
|
94 |
I am not sure if I understand this correctly, but it sounds like it |
95 |
would be safer to rm -rf the old checkout completely when switching |
96 |
modes? I wouldn't expect people to randomly switch around, so why bother. |
97 |
|
98 |
Anyway, sounds like a plan. |
99 |
-----BEGIN PGP SIGNATURE----- |
100 |
|
101 |
iQEcBAEBCgAGBQJTC8piAAoJEFpvPKfnPDWzW8QIAKzLjBoX2n57U7/U/elvehCB |
102 |
VokcOUHIY/29Bl016POLOXo4Uuy7nuwzDVl9FwJ1AkLp5ILWMJsUYpo/h0Od9J+8 |
103 |
qN5XZ75R6FkiQB30xlyM4Lxer3jFyd2d+tna3vITBEJX//iZ4SagtufnjUNiLnZo |
104 |
qcss6kKCmg5/MzD133qkpkpBV8lP7HAHi4hDu5Q6GtHjRcXGykfhBlvte+27NR73 |
105 |
O2cATlAqIZHW1Kbzw7WdkRiPhAXmOKYXlQ2oEs9kG+QULrCzBxQ3hs+fJLZMzAYf |
106 |
e2TKVidvYKFjUqc7LN4/dgfY+38WadTPlqTBeCEiLluoWrEJ0POQjCA+2smoTfs= |
107 |
=kRD8 |
108 |
-----END PGP SIGNATURE----- |