1 |
Ulrich Mueller: |
2 |
>>>>>> On Sun, 21 Sep 2014, hasufell wrote: |
3 |
> |
4 |
>> https://wiki.gentoo.org/wiki/Gentoo_git_workflow |
5 |
> |
6 |
>> But so far, not many people have been particularly interested in the |
7 |
>> details of these things. I'm also not sure if the ML is the right |
8 |
>> way to figure out these details. |
9 |
> |
10 |
> Where else should this be discussed then? Discussion page of the wiki |
11 |
> page? |
12 |
> |
13 |
> | commit policy |
14 |
> | • atomic commits (one logical change) |
15 |
> |
16 |
> A version bump plus cleaning up older ebuilds will be considered one |
17 |
> logical change, I suppose? |
18 |
> |
19 |
|
20 |
I'd consider it two logical changes (e.g. imagine a user complaining |
21 |
about ebuild removal... you cannot easily revert it if it's not a |
22 |
separate commit). But I don't have a strong opinion on that and I'm not |
23 |
sure if we can enforce commit rules in such fine-grained details, can we? |
24 |
|
25 |
Do you think this should be added explicitly? |
26 |
|
27 |
> | • commits may span across multiple ebuilds/directories if it's one |
28 |
> | logical change |
29 |
> | • every commit on the left-most line of the history (that is, all |
30 |
> | the commits following the first parent of each commit) must be gpg |
31 |
> | signed by a gentoo dev |
32 |
> | • repoman must be run from all related ebuild directories (or |
33 |
> | related category directories or top-level directory) on the tip of |
34 |
> | the local master branch (as in: right before you push and also |
35 |
> | after resolving push-conflicts) |
36 |
> |
37 |
> Have you tested if running repoman in the top-level directory is |
38 |
> realistic as part of the workflow? |
39 |
> |
40 |
|
41 |
This is really just meant for stuff like mass commits, not regular |
42 |
ebuild stuff. |
43 |
Ask patrick, he's running repoman all the time, probably even top-level. |
44 |
|
45 |
> | commit message format |
46 |
> | • all lines max 70-75 chars |
47 |
> | • first line brief explanation |
48 |
> | • second line always empty |
49 |
> | • optional detailed multiline explanation must start at the third |
50 |
> | line |
51 |
> | • for commits that affect only a single package, prepend |
52 |
> | "CATEGORY/PN: " to the first line |
53 |
> |
54 |
> In some cases of long package names, this may be in conflict with the |
55 |
> first item. "dev-python/rax-default-network-flags-python-novaclient-ext: " |
56 |
> as a prefix doesn't leave much space for an explanation. ;) |
57 |
> |
58 |
|
59 |
I'd say that's rare enough to warrant exceptions in that case. Or are |
60 |
you suggesting to drop CATEGORY/PN completely? I mean... it's not |
61 |
strictly necessary, since you can just look at the files that have been |
62 |
touched and run git log on an ebuild directory, but I think it will |
63 |
still make using the history easier, especially since mass-commits will |
64 |
not have CATEGORY/PN and can very easily be identified. It's also common |
65 |
practice in various overlays. |
66 |
|
67 |
Do you want me to add this exceptional case as a valid reason to have |
68 |
more than 75 chars in the first line? |
69 |
|
70 |
> | • for commits that affect only a single package, but also modify |
71 |
> | eclasses/profiles/licenses as part of a logical change, also |
72 |
> | prepend "CATEGORY/PN: " to the first line |
73 |
> | • for commits that affect only the profile directory, prepend |
74 |
> | "profiles: " to the first line |
75 |
> | • for commits that affect only the eclass directory, prepend |
76 |
> | "ECLASSNAME.eclass: " to the first line |
77 |
> |
78 |
> Maybe just "eclass: " would be slightly more systematic? (Because for |
79 |
> all others it is a directory.) |
80 |
> |
81 |
|
82 |
Not sure either. This is again just a convenience thing for history |
83 |
readability, not strictly necessary information. But I'd personally go |
84 |
for full eclass name. |
85 |
|
86 |
> | • for commits that affect only licenses directory, prepend |
87 |
> | "licenses: " to the first line |
88 |
> |
89 |
> Same for commits that affect licenses and profiles? |
90 |
> |
91 |
|
92 |
You are probably referring to license_groups. I'd say it matters more |
93 |
what the intention is and not so much what directories in particular |
94 |
were touched. If you want to add a new license and have to edit |
95 |
profiles/license_groups, I'd still just prepend "licenses: ". |
96 |
|
97 |
Maybe I should add this as a general idea to the commit guideline. I |
98 |
think that's better than specing the whole through which will probably |
99 |
just confuse people, no? |
100 |
|
101 |
> | • for commits that affect only metadata directory, prepend |
102 |
> | "metadata: " to the first line |
103 |
> | • mass commits that affect a whole category (or large parts of it) |
104 |
> | may prepend "CATEGORY: " to the first line |
105 |
> |
106 |
> All in all, this looks sane to me. Is it planned to enforce this |
107 |
> policy by repoman? |
108 |
> |
109 |
|
110 |
Good question. I'm not sure if it's a good idea though. It might get in |
111 |
our way for corner cases and whatnot. Maybe as a polite warning it would |
112 |
be ok. |
113 |
|
114 |
|
115 |
Also, if you have ideas of wording something better in particular, |
116 |
please share or just edit the wiki. |