Commits


replace "(cd path && git cmd)" with "git -C path cmd" This matches the existing use of "got -r path cmd" and "git_commit path args".


got: enable more commands to accept commit keywords More work adding commit keyword support to the blame, cat, ref, tag, and tree commands. With this, all Got commands that take a <commit> option argument or operand now support keywords. Regress flub saved by op! fixes + ok op@


portable: regress: drop setting LC_TIME common.sh sets LC_ALL=C which makes this change unnecessary now. Patch from Christian "naddy" Weisgerber.


portable: regress: drop GNU date on *BSDs Check if date(1) supports -r and fallback to gdate if that fails, via a shell-wrapper. From Christian "naddy" Weisgerber.


Do not segfault verifying "lightweight" tags ok stsp@


tweak tag_test_create to detect the issue fixed in previous commit


add signer_id option to got.conf(5) Setting this option will cause 'got tag' to sign all created tags using the SSH key, unless overridden by the -s flag. ok stsp@


regress test SSH key revocations ok stsp@


remove parts of tag_create_ssh_signed which just duplicate the tag_create test


in tests, verify that tag -V behaves like tag -l plus signature verification


remove duplicate test_parseargs call spotted by op@


fix echo/printf order and actually run the test


create and verify tags signed by SSH keys This adds a new -s flag to 'got tag' that specifies the signer identity (for example, a key file) of the tagger. The tag object will include a signature that validates each of the tag object headers and the tag message. Verifying these signed tags requires maintaining an allowed signers file which maps signer identities (i.e. the email address of the tagger) to SSH public keys. See ssh-keygen(1) for more details of the allowed signers file. After creating this file and providing the path to it in got.conf(5) using the allowed_signers option, tags may be verified using with 'got tag -V tag_name'. The return code will be non-zero if a signature fails to verify. ok stsp@


whitespace fix


fix tag signing when the key file does not exist This should fail without creating any tag. Before, ssh-keygen(1) would print an error to stderr, but got would create an unsigned tag. ok op@


create and verify tags signed by SSH keys This adds a new -s flag to 'got tag' that specifies the signer identity (for example, a key file) of the tagger. The tag object will include a signature that validates each of the tag object headers and the tag message. Verifying these signed tags requires maintaining an allowed signers file which maps signer identities (i.e. the email address of the tagger) to SSH public keys. See ssh-keygen(1) for more details of the allowed signers file. After creating this file and providing the path to it in got.conf(5) using the allowed_signers option, tags may be verified using with 'got tag -V tag_name'. The return code will be non-zero if a signature fails to verify. ok stsp@


make it possible to show just one tag with 'got tag -l' suggested by jrick ok jrick jamsek


use test(1) -eq and -ne to compare integers, and reduce quoting This brings the rest of the regression test scripts in line with patch.sh.


display the requested object type when an object could not be found ok millert@


regress: use gdate/gln if on *BSD To minimise the amount of churn between the difference in date(1) and ln(n) semantics, use gdate and gln from coreutils.


regress: fix test failures using date(1) This patch fixes test failures related the date(1) utility. In the long term we could add a wrapper function to detect valid options for date(1) and use the variant which works on the current OS. For now, this makes some tests pass and shows us where the problems are. OK thomas.adam


use the POSIX-compliant "date -u" command to return UTC time; ok stsp


add missing "return 1" to failure handling in the regress scripts ok stsp@


use POSIX [s1 = s2] syntax instead of [s1 == s2]; patch by Ryo ONODERA


switch function declarations from Korn shell to Bourne/POSIX shell syntax ok stsp