@matheusbsbs / matheus-bagliano / commits / 63460f285c
Fork 0

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>

Junio C Hamano committed Jan 30, 2007 at 21:03 UTC 63460f285ce2330b0a5fc926961c3ca444ed7eb2
1 file changed +4 -3
git-tag.sh
+4 -3
@@ -113,8 +113,9 @@ object=$(git-rev-parse --verify --default HEAD "$@") || exit 1
113 type=$(git-cat-file -t $object) || exit 1
114 tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
115
116 -keyid=$(git-repo-config user.signingkey) ||
117 - keyid=$(expr "z$tagger" : 'z\(.*>\)')
116 +test -n "$username" ||
117 + username=$(git-repo-config user.signingkey) ||
118 + username=$(expr "z$tagger" : 'z\(.*>\)')
119
120 trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG "$GIT_DIR"/TAG_EDITMSG' 0
121
@@ -141,7 +142,7 @@ if [ "$annotate" ]; then
142 cat "$GIT_DIR"/TAG_FINALMSG ) >"$GIT_DIR"/TAG_TMP
143 rm -f "$GIT_DIR"/TAG_TMP.asc "$GIT_DIR"/TAG_FINALMSG
144 if [ "$signed" ]; then
144 - gpg -bsa -u "$keyid" "$GIT_DIR"/TAG_TMP &&
145 + gpg -bsa -u "$username" "$GIT_DIR"/TAG_TMP &&
146 cat "$GIT_DIR"/TAG_TMP.asc >>"$GIT_DIR"/TAG_TMP ||
147 die "failed to sign the tag with GPG."
148 fi