diff options
author | Junio C Hamano <junkio@cox.net> | 2007-01-30 21:03:11 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-30 21:03:11 -0800 |
commit | 63460f285ce2330b0a5fc926961c3ca444ed7eb2 (patch) | |
tree | 682730c7d75bd9df2bc902e1b90e53f4872af96b | |
parent | 73a2acc0a09829f887fdf2dbcfba217102227932 (diff) | |
download | git-63460f285ce2330b0a5fc926961c3ca444ed7eb2.tar.gz git-63460f285ce2330b0a5fc926961c3ca444ed7eb2.tar.xz |
Fix git-tag -u
... which I broke when we introduced user.signingkey configuration.
There was no reason to add a new variable keyid to the script.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-x | git-tag.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-tag.sh b/git-tag.sh index 988bf4c6a..4a0a7b660 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -113,8 +113,9 @@ 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 -keyid=$(git-repo-config user.signingkey) || - keyid=$(expr "z$tagger" : 'z\(.*>\)') +test -n "$username" || + username=$(git-repo-config user.signingkey) || + username=$(expr "z$tagger" : 'z\(.*>\)') trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG "$GIT_DIR"/TAG_EDITMSG' 0 @@ -141,7 +142,7 @@ if [ "$annotate" ]; then cat "$GIT_DIR"/TAG_FINALMSG ) >"$GIT_DIR"/TAG_TMP rm -f "$GIT_DIR"/TAG_TMP.asc "$GIT_DIR"/TAG_FINALMSG if [ "$signed" ]; then - gpg -bsa -u "$keyid" "$GIT_DIR"/TAG_TMP && + gpg -bsa -u "$username" "$GIT_DIR"/TAG_TMP && cat "$GIT_DIR"/TAG_TMP.asc >>"$GIT_DIR"/TAG_TMP || die "failed to sign the tag with GPG." fi |