Re: Fix "git tag -u" breakage

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, January 30, 2007 - 9:56 pm

Linus Torvalds <torvalds@linux-foundation.org> writes:


Sorry, and thanks.

There was no reason to introduce a separate variable keyid to
begin with.  I should have been more careful to read what was
outside of the patch.

diff --git a/git-tag.sh b/git-tag.sh
index 988bf4c..4a0a7b6 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



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Fix &quot;git tag -u&quot; breakage, Linus Torvalds, (Tue Jan 30, 9:00 pm)
Re: Fix "git tag -u" breakage, Junio C Hamano, (Tue Jan 30, 9:56 pm)
Re: Fix &quot;git tag -u&quot; breakage, Andy Parkins, (Wed Jan 31, 1:37 am)