An example from the science overlay. (This is sys-apps/portage-2.2.0_alpha86 and dev-vcs/git-1.7.8) $ repoman commit RepoMan scours the neighborhood... >>> Creating Manifest for /var/lib/overlays/science/sci-chemistry/gromacs Note: use --without-mask to check KEYWORDS on dependencies of masked packages Note: use --include-dev (-d) to check dependencies for 'dev' profiles * 2 files being committed... error: unknown option `gpg-sign' usage: git commit [options] [--] <filepattern>... -q, --quiet suppress summary after successful commit ... ... -u, --untracked-files[=<mode>] show untracked files, optional modes: all, normal, no. (Default: all) !!! Exiting on git (shell) error code: 129
This is intentional, since the policy of the repository is to sign commits.
What I plan to do is have it check if >=git-1.7.9 is installed if the commit fails, and suggest to install it in that case.
alexxy suggested to make it backward compatible. So if git cannot sign, just warn and do not sign the commit. (In reply to comment #2) > What I plan to do is have it check if >=git-1.7.9 is installed if the commit > fails, and suggest to install it in that case. that make sense. Right now git-1.7.9 is not even keyworded, which made me come across that problem.
(In reply to comment #3) > alexxy suggested to make it backward compatible. So if git cannot sign, just > warn and do not sign the commit. If we do that, then we may need a special layout.conf setting like "sign-commits = optional" to indicate that signatures aren't required, since allowing a mixture of signed and unsigned commits might not be acceptable for some repositories.
*** Bug 406167 has been marked as a duplicate of this bug. ***
(In reply to comment #2) > What I plan to do is have it check if >=git-1.7.9 is installed if the commit > fails, and suggest to install it in that case. This is in implemented in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=350c094fd54644cbb49bcf8d483a75eb22cb4b6e
(In reply to comment #6) > (In reply to comment #2) > > What I plan to do is have it check if >=git-1.7.9 is installed if the commit > > fails, and suggest to install it in that case. > > This is in implemented in git: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit; > h=350c094fd54644cbb49bcf8d483a75eb22cb4b6e Where did this commit go?
Here it is: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=43593de8225589fcd5c0d07ce70f45dfbe11bba9
(In reply to comment #8) > Here it is: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit; > h=43593de8225589fcd5c0d07ce70f45dfbe11bba9 Got it, but I never saw the error message. Where does logging.error sends it?
The message should be displayed on stderr immediately, right when logging.error() is called. It's supposed to look like this: [ERROR] Git >=1.7.9 is required for signed commits!
(In reply to comment #10) > The message should be displayed on stderr immediately, right when > logging.error() is called. It's supposed to look like this: > > [ERROR] Git >=1.7.9 is required for signed commits! Strange: $ repoman -m "foobar" commit |& grep -i git usage: git commit [options] [--] <filepattern>... !!! Exiting on git (shell) error code: 129
What's the output of git --version?
(In reply to comment #12) > What's the output of git --version? $ git --version git version 1.7.8.6
There was a bug in git_supports_gpg_sign, and this should fix it: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d93959f2f295b47a0b17c33ee8df1633a0e479ee