Repoman should add the commit message format guidelines to the template commit message as a comment at the very bottom, when you run plain "repoman commit". https://wiki.gentoo.org/wiki/Gentoo_git_workflow#Commit_Message_Format In addition, it should have basic functionality to add "foo/bar: " to the first line of the template commit message if you are in the ebuild directory "foo/bar". This will rule out a lot of commit message errors and make life easier especially for arch teams.
Change the summary to be more visible for who search.
I've added prepending category and package as appropriate.
Great, could we have this patch in the tree? Thanks.
it will not break bug title if I also will mention suggestion to add `sign off` to commit message after portage version Idea about it also was mentioned here: https://wiki.gentoo.org/wiki/Talk:Gentoo_git_workflow
(In reply to Michał Górny from comment #2) > I've added prepending category and package as appropriate. It does not work for me: commit 11b5619ffd193670842bd378a9237aed01e27a2a Author: Agostino Sarubbo <ago@gentoo.org> Date: Wed Aug 12 10:10:38 2015 +0200 Stable for amd64, wrt bug #557342 Package-Manager: portage-2.2.20.1 RepoMan-Options: --include-arches="amd64" I'm available on irc for double-check.
(In reply to Agostino Sarubbo from comment #5) > (In reply to Michał Górny from comment #2) > > I've added prepending category and package as appropriate. > > It does not work for me: > > commit 11b5619ffd193670842bd378a9237aed01e27a2a > Author: Agostino Sarubbo <ago@gentoo.org> > Date: Wed Aug 12 10:10:38 2015 +0200 > > Stable for amd64, wrt bug #557342 > > Package-Manager: portage-2.2.20.1 > RepoMan-Options: --include-arches="amd64" > > > I'm available on irc for double-check. Wrong, in general it works. But only if you call 'repoman commit' without message option, then it opens ${EDITOR} (as usual), with ${category}/${pn} template in there.
Released in portage-2.2.20.1 Does it work for you? it does for me...
(In reply to Brian Dolbec from comment #7) > Released in portage-2.2.20.1 > > Does it work for you? it does for me... it seems that ago wanted to get atom from repoman commit -m "<>", rather than call repoman commit without opts.
(In reply to Mikle Kolyada from comment #8) > (In reply to Brian Dolbec from comment #7) > > Released in portage-2.2.20.1 > > > > Does it work for you? it does for me... > > it seems that ago wanted to get atom from repoman commit -m "<>", rather > than call repoman commit without opts. I've already told him that he can use the shell to make that easier: in bashrc e.g.: cat_pn() { awk -F/ '{print $(NF-1) "/" $(NF)}' <<<"${PWD}" } and then from within the ebuild directories: repoman commit -m "$(cat_pn): stable for amd64"
ah, well, adding -m "foo" implies a fully prepared commit message. I doubt think there is a way to pre-fill that that will show. It is impossible for a command to know what to put in an option before the command has run. So realistically, all that can be done at that point is prepend it blindly. I suppose the code could check for it in the first part of the string, but that is still subject to the string not having a typo in it which prevents it matching. I'll leave this open for now. If you decide you need it prepended to the -m "message", that can wait for the 2.2.21 release coming out soon. If not you can close it as resolved/fixed
(In reply to Brian Dolbec from comment #10) > > If not you can close it as resolved/fixed The other part of the bug report has not been resolved or discussed: Add a (probably stripped down, only the most important points) version of the commit message policy to the template as a comment at the very bottom (below the repoman warnings).
yeah, I'll see about adding a template system to repoman that won't require code changes (mostly) when the need for a change in the template is needed. It'll be a separate download. But that will have to wait for the rewrite branch to land in main portage repo.
(In reply to Julian Ospald (hasufell) from comment #9) > (In reply to Mikle Kolyada from comment #8) > > (In reply to Brian Dolbec from comment #7) > > > Released in portage-2.2.20.1 > > > > > > Does it work for you? it does for me... > > > > it seems that ago wanted to get atom from repoman commit -m "<>", rather > > than call repoman commit without opts. > > I've already told him that he can use the shell to make that easier: I already told you that I'm not committing manually and is not immediately change it in the script I use. Anyway, I guess the main goal should be check if is present the prefix at the begin of the commit message, if not, add it.
(In reply to Agostino Sarubbo from comment #13) > (In reply to Julian Ospald (hasufell) from comment #9) > > (In reply to Mikle Kolyada from comment #8) > > > (In reply to Brian Dolbec from comment #7) > > > > Released in portage-2.2.20.1 > > > > > > > > Does it work for you? it does for me... > > > > > > it seems that ago wanted to get atom from repoman commit -m "<>", rather > > > than call repoman commit without opts. > > > > I've already told him that he can use the shell to make that easier: > > I already told you that I'm not committing manually and is not immediately > change it in the script I use. > Then add that bash function to your script? What's the problem?
(In reply to Brian Dolbec from comment #10) [...] > If you decide you need it prepended to the -m "message", that can wait for > the 2.2.21 release coming out soon. > > If not you can close it as resolved/fixed Well, I also vote for appending the ${CATEGORY}/${PN} at the start of the message, otherwise it's really easy to forget to add it and also, per current guidelines, not appending it on every "commit" is highly undesirable. What is the problem then on adding it at the start of the message always? Thanks :)
(In reply to Pacho Ramos from comment #15) Some of us already have scripts which correctly assume that -m takes the entire commit message as its argument. If this behavior is to change, it needs to be implemented as a separate option.
Released in repoman-2.3.0 and later.