From: Junio C Hamano <junkio@cox•net>
To: Andy Parkins <andyparkins@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Allow the tag signing key to be specified in the config file
Date: Fri, 26 Jan 2007 22:37:47 -0800 [thread overview]
Message-ID: <7vodolnfes.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200701261413.46823.andyparkins@gmail.com> (Andy Parkins's message of "Fri, 26 Jan 2007 14:13:46 +0000")
Andy Parkins <andyparkins@gmail•com> writes:
> This patch adds a configuration entry "user.signingkey" which, if
> present, will be passed to the "-u" switch for gpg, allowing the tag
> signing key to be overridden. If the entry is not present, the fallback
> is the original method, which means existing behaviour will continue
> untouched.
> diff --git a/git-tag.sh b/git-tag.sh
> index 94499c9..01e6526 100755
> --- a/git-tag.sh
> +++ b/git-tag.sh
> @@ -112,7 +112,11 @@ git-check-ref-format "tags/$name" ||
> object=$(git-rev-parse --verify --default HEAD "$@") || exit 1
> type=$(git-cat-file -t $object) || exit 1
> tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
> -: ${username:=$(expr "z$tagger" : 'z\(.*>\)')}
> +
> +keyid=$(git-repo-config user.signingkey)
> +if [ -z "$keyid" ]; then
> + : ${keyid:=$(expr "z$tagger" : 'z\(.*>\)')}
> +fi
Why do you use ": ${parameter:=word}" substitution after having
already checked that keyid is empty, I wonder... Am I missing
something subtle?
Other than that, I think what this patch does makes a lot of
sense.
next prev parent reply other threads:[~2007-01-27 6:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-26 14:13 [PATCH] Allow the tag signing key to be specified in the config file Andy Parkins
2007-01-26 16:03 ` Linus Torvalds
2007-01-27 6:37 ` Junio C Hamano [this message]
2007-01-27 11:55 ` Andy Parkins
2007-01-27 13:37 ` Simon 'corecode' Schubert
2007-01-27 16:24 ` Andy Parkins
2007-01-27 16:44 ` Simon 'corecode' Schubert
2007-01-27 22:00 ` Junio C Hamano
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=7vodolnfes.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox$(echo .)net \
--cc=andyparkins@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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