git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Andres Klode <jak@debian.org>
To: git@vger.kernel.org
Cc: bdwalton@gmail.com, davvid@gmail.com, hvoigt@hvoigt.net,
	johnflux@gmail.com, gitster@pobox.com, madcoder@debian.org
Subject: Re: [PATCH] hooks/update: Add a hooks.denyunsignedtags option
Date: Sat, 12 Sep 2015 12:40:32 +0200	[thread overview]
Message-ID: <20150912123905.GA15958@debian.org> (raw)
In-Reply-To: <1442054253-15780-1-git-send-email-jak@debian.org>

On Sat, Sep 12, 2015 at 12:37:33PM +0200, Julian Andres Klode wrote:
> Introduce an option to deny unsigned tags from entering
> a repository. This is useful in teams where members forget
> to sign their release tags.
> 
> It does not actually check whether the signature is actually
> complete or valid, it just checks for the beginning of a
> signature, as further checks would be too involved.
> 
> This effectively also denies un-annotated tags, as those
> are unsigned by definition.
> 
> Signed-off-by: Julian Andres Klode <jak@debian.org>
> ---
>  templates/hooks--update.sample | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
[...]
> @@ -86,6 +90,14 @@ case "$refname","$newrev_type" in
>  		;;
>  	refs/tags/*,tag)
>  		# annotated tag
> +		if [ "$denyunsignedtag" != "true" ] || git cat-file -p $newrev | grep -q 'BEGIN PGP SIGNATURE'; then
> +			:
> +		else
> +			echo "*** Tag '$refname' is unsigned"
> +			echo "*** Unsigned tags are not allowed in this repository." >&2
> +	                exit 1

There are some accidental space characters in front of that, this is fixed locally
already. Sorry.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
    - If you don't I might ignore you.

  reply	other threads:[~2015-09-12 10:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 10:37 [PATCH] hooks/update: Add a hooks.denyunsignedtags option Julian Andres Klode
2015-09-12 10:40 ` Julian Andres Klode [this message]
2015-09-22 18:42 ` Julian Andres Klode
  -- strict thread matches above, loose matches on Subject: below --
2015-12-21 17:32 Julian Andres Klode
2015-12-21 18:13 ` Junio C Hamano
2015-12-21 18:52   ` Junio C Hamano
2015-12-21 19:29 ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150912123905.GA15958@debian.org \
    --to=jak@debian.org \
    --cc=bdwalton@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=johnflux@gmail.com \
    --cc=madcoder@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).