git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Allow the tag signing key to be specified in the config file

From
Junio C Hamano <junkio@cox.net>
Date
Jan 27, 2007, 06:37 UTC
Message-ID
<7vodolnfes.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200701261413.46823.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 5 quoted lines
> 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.
Show 14 quoted lines
> 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.

Previous: Linus TorvaldsNext: Andy Parkins
Message 3 of 8 in “Allow the tag signing key to be specified in the config file”
  1. Allow the tag signing key to be specified in the config fileAndy Parkins, Jan 26, 2007
  2. Linus TorvaldsJan 26, 2007
  3. Junio C HamanoJan 27, 2007
  4. Andy ParkinsJan 27, 2007
  5. Simon 'corecode' SchubertJan 27, 2007
  6. Andy ParkinsJan 27, 2007
  7. Simon 'corecode' SchubertJan 27, 2007
  8. Junio C HamanoJan 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.